Skip to content

Commit e09109c

Browse files
committed
Полностью переписан проект, потеряна обратная совместимость
1 parent 0c0f809 commit e09109c

6 files changed

Lines changed: 122 additions & 401 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": ">=7.2.0",
1515
"ext-pdo": "*",
1616
"yiisoft/yii2": "~2.0.0",
17-
"smoren/query-relation-manager": "1.0.1"
17+
"smoren/query-relation-manager": "dev-master"
1818
},
1919
"autoload": {
2020
"psr-4": {

composer.lock

Lines changed: 0 additions & 357 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
4+
namespace Smoren\Yii2\QueryRelationManager\ActiveRecord;
5+
6+
7+
use Smoren\Yii2\QueryRelationManager\Base\QueryRelationManagerException;
8+
9+
/**
10+
* Trait ActiveRecordTrait
11+
* Trait для упрощения построения запросов с помощью QueryRelationManager
12+
* @package app\qrm\ActiveRecord
13+
*/
14+
trait ActiveRecordTrait
15+
{
16+
/**
17+
* @param string|null $alias
18+
* @return QueryRelationManager
19+
* @throws QueryRelationManagerException
20+
*/
21+
public static function select(?string $alias = null): QueryRelationManager
22+
{
23+
return QueryRelationManager::select(
24+
self::class, $alias ?? self::tableName()
25+
);
26+
}
27+
}

0 commit comments

Comments
 (0)