egulias/listeners-debug

Debug library for listeners registered in the Symfony 2 DIC

1.0.2 2014-06-08 17:55 UTC

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.