Пример #1
0
 public function __construct($config = null)
 {
     parent::__construct($config['options']);
     $this->response = static::$di->getShared('response');
     $this->setViewsDir($this->_viewsDir = $config['path']);
     $this->_mainView = $config['top_level'];
     $this->_theme = $config['theme'];
     $this->_defaultTheme = 'default';
     $this->_layout = $config['default_layout'];
     $this->config = $config;
     $this->registerEngines($config['engines']);
     $basePath = $this->config['options']['assets_options']['base_path'];
     ResourceTrait::setBasePath($basePath);
     ResourceTrait::setRunningUnitTests(static::$runningUnitTest);
 }
Пример #2
0
 public static function setRunningUnitTests($flag)
 {
     ResourceTrait::$runningUnitTest = $flag;
 }