Exemplo n.º 1
0
 public function __construct(IConfig $config = null, $data = null)
 {
     if ($config !== null) {
         $this->_config = new Config($config->data('model'));
     }
     if ($data !== null) {
         $this->_data = $data;
     }
     $this->_session = new Session();
 }
Exemplo n.º 2
0
 public function __construct(IConfig $config = null)
 {
     View::$_instance = $this;
     if ($config !== null) {
         $this->_config = new Config($config->data('view'));
     }
     $this->_loader = new \Twig_Loader_Filesystem($this->_config ? ROOT_PATH . $this->_config->data('path') : MI_TEMPLATE_PATH);
     $this->_twig_temp = new \Twig_Environment($this->_loader);
     $this->_twig_str = new \Twig_Environment(new \Twig_Loader_String());
     $this->_file = 'error';
 }