public function __construct() { $this->addonName = $this->getAddonName(); $this->addonPath = APP_ADDON_PATH . $this->addonName . '/'; $this->configFile = $this->addonPath . 'config.php'; $this->view = ViewFactory::factory(); }
/** * 构造函数 */ public function __construct() { Hook::listen('CONTROLLER_START', $this->options); //视图对象 $this->view = ViewFactory::factory(); //子类如果存在auto方法,自动运行 if (method_exists($this, "__init")) { $this->__init(); } }
public function __construct() { /** * 视图对象 */ $this->view = ViewFactory::factory(); $this->setAddonConfig(); if (method_exists($this, '__init')) { $this->__init(); } }
/** * 构造函数 */ public function __construct() { Hook::listen('CONTROLLER_START', $this->options); /** * 视图对象 */ $this->view = ViewFactory::factory(); /** * 自动运行的魔术方法 */ if (method_exists($this, "__init")) { $this->__init(); } }
/** * 构造函数 */ public function __construct() { Hook::listen('CONTROLLER_START', $this->options); $this->addonName = $this->getAddonName(); $this->addonPath = APP_ADDON_PATH . $this->addonName . '/'; $this->configFile = $this->addonPath . 'config.php'; /** * 视图对象 */ $this->view = ViewFactory::factory(); /** * 自动运行的魔术方法 */ if (method_exists($this, "__init")) { $this->__init(); } }
private function getViewObj() { if (is_null($this->view)) { $this->view = ViewFactory::factory(); } }
/** * 获得视图对象 * @access private * @return void */ private function getViewObj() { if (is_null($this->view)) { //获得视图驱动含hd模板引擎与smarty引擎 require_cache(HDPHP_DRIVER_PATH . 'View/ViewFactory.class.php'); $this->view = ViewFactory::factory(); } }
/** * 获得视图对象 * @access private * @return void */ private function getViewObj() { if (is_null($this->view)) { //获得视图驱动含hd模板引擎与smarty引擎 $this->view = ViewFactory::factory(); } }