变更
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ class ActiveQuery extends Component implements ISqlBuilder
|
||||
$this->modelClass = $model;
|
||||
|
||||
$this->builder = SqlBuilder::builder($this);
|
||||
parent::__construct($config);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
||||
$this->query = $query;
|
||||
$this->model = $model;
|
||||
|
||||
parent::__construct([]);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+5
-6
@@ -87,12 +87,11 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
||||
|
||||
|
||||
/**
|
||||
* @param array $config
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(array $config = [])
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($config);
|
||||
parent::__construct();
|
||||
|
||||
$this->init();
|
||||
}
|
||||
@@ -149,10 +148,10 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function init()
|
||||
public function init(): void
|
||||
{
|
||||
$an = Kiri::getDi()->get(Annotation::class);
|
||||
$an->injectProperty($this);
|
||||
$container = Kiri::getDi();
|
||||
$container->resolveProperties($container->getReflectionClass(get_called_class()), $this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ class Connection extends Component
|
||||
*/
|
||||
public function __construct(public EventProvider $eventProvider, public Pool $connections, public ContainerInterface $container, array $config = [])
|
||||
{
|
||||
parent::__construct($config);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class Pagination extends Component
|
||||
*/
|
||||
public function __construct(ActiveQuery $activeQuery, array $config = [])
|
||||
{
|
||||
parent::__construct($config);
|
||||
parent::__construct();
|
||||
$this->activeQuery = $activeQuery;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user