phalcon plugins for phalcon-framwork

Installs: 60

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Open Issues: 0

Type:phalcon-plugins

pkg:composer/phalcon-framwork/plugins

v1.1.2 2019-08-03 14:50 UTC

This package is auto-updated.

Last update: 2025-09-29 02:07:33 UTC


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;
});