public function initPlugins() { K_Plugins::addDirectory(APP_PATH . '/plugins'); }
/** * Class destroy */ public function __destruct() { if (!$this->rendered) { $this->render(); } K_Plugins::callHook('controller.beforeDestroy', array('controller' => &$this)); if (method_exists($this, 'onDestroy')) { $this->onDestroy(); // event } K_Plugins::callHook('controller.afterDestroy', array('controller' => &$this)); }