devilbox/.devilbox/www/htdocs/vendor/phpredmin/libraries/model.php
2018-08-12 10:51:32 +02:00

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;
}
}