Прохождение автризации
This commit is contained in:
parent
aaa9c2e1bf
commit
c2b9254fd0
9 changed files with 16 additions and 14 deletions
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace ctiso\Model;
|
||||
use ctiso\Settings,
|
||||
use ctiso\Registry,
|
||||
ctiso\Database;
|
||||
|
||||
class Factory
|
||||
{
|
||||
static $shortcut = "model";
|
||||
public $db;
|
||||
public $_registry;
|
||||
public $config;
|
||||
|
||||
public function __construct (/*.Database.*/ $db, Settings $_registry = null)
|
||||
public function __construct (Database $db, Registry $config = null)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->_registry = $_registry;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +27,7 @@ class Factory
|
|||
$model = new $modelName();
|
||||
$model->db = $this->db;
|
||||
$model->factory = $this;
|
||||
$model->_registry = $this->_registry;
|
||||
$model->config = $this->config;
|
||||
$model->setUp();
|
||||
//
|
||||
return $model;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue