mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\EventDispatcher;
|
|
|
|
use Phly\EventDispatcher as Phly;
|
|
use Psr\EventDispatcher as Psr;
|
|
use Zend\ServiceManager\Proxy\LazyServiceFactory;
|
|
|
|
return [
|
|
|
|
'events' => [
|
|
'regular' => [],
|
|
'async' => [],
|
|
],
|
|
|
|
'dependencies' => [
|
|
'factories' => [
|
|
Phly\EventDispatcher::class => Phly\EventDispatcherFactory::class,
|
|
Psr\ListenerProviderInterface::class => Listener\ListenerProviderFactory::class,
|
|
],
|
|
'aliases' => [
|
|
Psr\EventDispatcherInterface::class => Phly\EventDispatcher::class,
|
|
],
|
|
'delegators' => [
|
|
// The listener provider has to be lazy, because it uses the Swoole server to generate AsyncEventListeners
|
|
// Without making this lazy, CLI commands which depend on the EventDispatcher fail
|
|
Psr\ListenerProviderInterface::class => [
|
|
LazyServiceFactory::class,
|
|
],
|
|
],
|
|
'lazy_services' => [
|
|
'class_map' => [
|
|
Psr\ListenerProviderInterface::class => Psr\ListenerProviderInterface::class,
|
|
],
|
|
],
|
|
],
|
|
|
|
];
|