public function __construct() { parent::__construct(); $config = Config::getInstance()->get('view_manager'); $this->config = $config['module'][Router::getInstance()->getModule()]; $this->viewstack = isset($this->config['template_path_stack']) ? $this->config['template_path_stack'] : ""; // get the variables given }
public function __construct($arrayOfItems = array()) { parent::__construct(); $config = Config::getInstance()->get('view_manager'); $this->config = $config['module'][Router::getInstance()->getModule()]; $this->viewstack = isset($this->config['template_path_stack']) ? $this->config['template_path_stack'] : ""; // get the variables given foreach ($arrayOfItems as $key => $value) { $this->{$key} = $value; } }