function _initPlugin(Dispatcher $dispatcher) { Loader::import('vendor/autoload.php'); $dispatcher->registerPlugin(new PHPConfig()); $dispatcher->registerPlugin(new LoginPlugin()); $dispatcher->registerPlugin(new Module(array(Module::TYPE_CLI => array('enable' => true)))); }
/** * * @param \Yaf\Dispatcher $dispatcher */ protected function _initLayout(\Yaf\Dispatcher $dispatcher) { /* * layout allows boilerplate HTML to live in * /layouts/scripts rather than every script */ $layout = new LayoutPlugin($this->_config->layout->file, $this->_config->layout->dir); /* Store a reference in the registry so values can be set later. * * This is a hack to make up for the lack of a getPlugin * method in the dispatcher. */ \Yaf\Registry::set('Layout', $layout); /*add the plugin to the dispatcher*/ $dispatcher->registerPlugin($layout); }
public function _initLayout(Dispatcher $dispatcher) { /*layout allows boilerplate HTML to live in /views/layout rather than every script*/ $layout = new LayoutPlugin('layout/layout.html'); /* Store a reference in the registry so values can be set later. * This is a hack to make up for the lack of a getPlugin * method in the dispatcher. */ Registry::set('layout', $layout); /*add the plugin to the dispatcher*/ $dispatcher->registerPlugin($layout); }
public function _initPlugin(Dispatcher $dispatcher) { $dispatcher->registerPlugin(new ApiPluginBase()); }
/** * 注册插件 * @param \Yaf\Dispatcher $dispatcher 分发对象 * @return void */ public function _initPlugin(Dispatcher $dispatcher) { $dispatcher->registerPlugin(new HandlerPlugin()); }
/** * 注册自动加载插件 */ public function _initPlugin(\Yaf\Dispatcher $dispatcher) { // 注册自动加载插件 $autoload = new \AutoloadPlugin(); $dispatcher->registerPlugin($autoload); }
/** * 注册插件 * * @access public * @param Yaf\Dispatcher $dispatcher * @return void */ public function _initPlugin(Dispatcher $dispatcher) { $dispatcher->registerPlugin(new XHProfPlugin()); $dispatcher->registerPlugin(new ModulePlugin()); }
/** * Initialize plugin. * @param \Yaf\Dispatcher $dispatcher * @return void */ public function _initPlugin(\Yaf\Dispatcher $dispatcher) { if (APPLICATION_PHPCAS_OPEN) { $dispatcher->registerPlugin(new Plugin_User()); } }
function _initPlugin(Dispatcher $dispatcher) { $dispatcher->registerPlugin(new PHPConfig()); $dispatcher->registerPlugin(new InitPlugin()); }
/** * @brief 初始化插件,调度插件、小流量插件、A/B测试插件、authorize插件、performance测试插件、安全插件 * @param \Yaf\Dispatcher $dispatcher */ public function _initPlugin(\Yaf\Dispatcher $dispatcher) { $dispatcher->registerPlugin(new \Boom\Plugin\Security())->registerPlugin(new \Boom\Plugin\Scheduler()); }
public function _initPlugin(Dispatcher $dispatcher) { if (!defined("RUN_IN_CLI")) { $authPlugin = new AuthPlugin(); $dispatcher->registerPlugin($authPlugin); } }
public function _initPlugins(Dispatcher $dispatcher) { $dispatcher->registerPlugin(new XhprofControllerPlugin()); $dispatcher->registerPlugin(new PermissionControllerPlugin()); // $dispatcher->registerPlugin(new OAUTH2Plugin()); }