phalcon-framwork / plugins
phalcon plugins for phalcon-framwork
Installs: 58
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
Type:phalcon-plugins
Requires
- php: >=7.0
README
在服务中使用
$di->setShared('dispatcher', function () { $dispatcherConfig = $this->getConfig()->services->dispatcher; $dispatcher = new Dispatcher(); if (isset($dispatcherConfig->module_default_namespaces)) { $dispatcher->setDefaultNamespace($dispatcherConfig->module_default_namespaces); } $eventsManager = new EventsManager(); $dispatcherPlugin = new DIspatcherPlugin($dispatcherConfig->toArray()); $eventsManager->attach('dispatch', $dispatcherPlugin); $dispatcher->setEventsManager($eventsManager); return $dispatcher; });