Example #1
0
 public function __construct($config = null)
 {
     $this->_config = Z::getConfig(__CLASS__);
     Z::setGlobal('@Z.Application', $this);
     Z::using('Z:*');
     $this->init();
 }
Example #2
0
 public function __construct($viewData = array())
 {
     // Get class-specific options
     $this->_config = Z::getConfig(__CLASS__);
     $this->_viewData = $viewData;
     $core = Z_Application::getInstance();
     $this->_response =& $core->getResponse();
     $this->_request =& $core->getRequest();
 }
Example #3
0
 public function __construct($viewData = array())
 {
     parent::__construct($viewData);
     // Get class-specific options
     $this->_config = Z::getConfig(__CLASS__);
     $config = $this->_config;
     if (!isset($this->_config->buffer_response)) {
         $this->_config->buffer_response = true;
     }
     $this->_smarty = new Z_View_Smarty_Extended();
     $this->_smarty->plugins_dir[] = realpath(dirname(__FILE__) . Z_DS . 'Smarty' . Z_DS . 'Plugins' . Z_DS);
     $this->_smarty->template_dir = $config->template_dir;
     $this->_smarty->compile_dir = $config->compile_dir;
     $this->_smarty->cache_dir = $config->cache_dir;
     // Expose assigned data as ViewData
     $this->_smarty->append_by_ref('ViewData', $this->_viewData);
 }