mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-27 08:12:28 +00:00
20 lines
517 B
PHP
20 lines
517 B
PHP
|
<?php
|
||
|
class model
|
||
|
{
|
||
|
private $_objects = null;
|
||
|
|
||
|
public function __construct($config)
|
||
|
{
|
||
|
$this->_objects['app'] = App::instance();
|
||
|
$this->_objects['router'] = Router::instance();
|
||
|
$this->_objects['session'] = Session::instance();
|
||
|
$this->_objects['db'] = Db::factory($config);
|
||
|
$this->_objects['log'] = Log::factory();
|
||
|
}
|
||
|
|
||
|
public function __get($object)
|
||
|
{
|
||
|
return isset($this->_objects[$object]) ? $this->_objects[$object] : null;
|
||
|
}
|
||
|
}
|