snapshotpl / zf-config-listener
Installs: 19 868
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: ^7.3 | ^8.0
- laminas/laminas-eventmanager: ^3.2
- laminas/laminas-modulemanager: ^2.8
- laminas/laminas-servicemanager: ^3.3
Requires (Dev)
- phpunit/phpunit: ^9.4.2
This package is auto-updated.
Last update: 2024-10-14 21:31:20 UTC
README
Attach any Laminas Event Manager listener using configuration
Usage
If you want to attach my-listener
and module-listener
to my-service
service with event manager, you need to configure listener:
<?php return [ 'service_manager' => [ 'factories' => [ 'my-service' => MyServiceFactory::class, 'my-listener' => MyListenerFactory::class, 'module-listener' => ModuleListenerFactory::class, ], ], 'listeners_config' => [ 'my-service' => [ 'my-listener', 'module-listener', ], ], ];
Installation
composer require snapshotpl/zf-config-listener
add add ZfConfigListener
module to application's configuration.