public function __construct($controller = null) { $this->app = \Nne\NneSlim::getInstance(); if ($controller) { $this->controller = $controller; } }
public function __construct() { $this->app = \Nne\NneSlim::getInstance(); $this->data = array(); $this->addComponents($this->Components); /** * replace base helpers with admin versions */ if ($this->app->isAdmin()) { foreach ($this->AdminBaseHelpers as $helperName => $helper) { $name = $helperName; if (is_array($helper) && isset($helper['alias'])) { $name = $helper['alias']; } if (isset($this->Helpers[$name])) { unset($this->Helpers[$name]); $this->Helpers[$helperName] = $helper; } } } $this->setHelper($this->Helpers); /** default title */ $this->data['title'] = ''; /** meta tag and information */ $this->data['meta'] = array(); /** prepared message info */ $this->data['message'] = array('error' => array(), 'info' => array(), 'debug' => array()); /** global javascript var */ $this->data['global'] = array(); /** base dir for asset file */ $this->data['baseUrl'] = $this->baseUrl(); $this->data['assetUrl'] = $this->data['baseUrl'] . 'public/'; /** * set on view object current controller insyance */ $this->app->view()->setController($this); }
public function __construct() { $this->app = \Nne\NneSlim::getInstance(); }