egulias / listeners-debug
Debug library for listeners registered in the Symfony 2 DIC
Installs: 259 535
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 1
Requires
Requires (Dev)
- satooshi/php-coveralls: dev-master
This package is auto-updated.
Last update: 2024-12-16 03:41:42 UTC
README
This library will fetch information about all the listeners tagged with .event_listener inside the DIC
Installation and configuration
Get the lib
php composer.phar require egulias/listeners-debug
Use
Basic usage
<?php use Egulias\ListenersDebug\ListenerFetcher; $fetcher = new ListenerFetcher($containerBuilder); $listeners = $fetcher->fetchListeners($showPrivate); $listener = $fetcher->fetchListener($listenerServiceId);
Filtering
<?php use Egulias\ListenersDebug\ListenerFetcher; use Egulias\ListenersDebug\ListenerFilter; $fetcher = new ListenerFetcher($containerBuilder); $filter = new ListenerFilter(); $listeners = $fetcher->fetchListeners($showPrivate); $filteredAndOrdered = $filter->filterByEvent($eventName, $listeners, $orderByPriorityAsc);
Contributors
The initial contributors to the foundations of this library can be found here in the bundle history.