devilbox/.devilbox/www/htdocs/vendor/phpredmin/libraries/model.php

20 lines
517 B
PHP
Raw Normal View History

2018-08-12 08:51:32 +00:00
<?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;
}
}