<commit_before># Listeners debug for Symfony2 DIC Events [![Build Status](https://travis-ci.org/egulias/ListenersDebug.png?branch=master)](https://travis-ci.org/egulias/ListenersDebug) [![Coverage Status](https://coveralls.io/repos/egulias/ListenersDebug/badge.png?branch=master)](https://coveralls.io/r/egulias/ListenersDebug?branch=master)

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
<?php

use Egulias\ListenersDebug\ListenerFetcher;

$fetcher = new ListenerFetcher($containerBuilder);

$listeners = $fetcher->fetchListeners($showPrivate);
$listener = $fetcher->fetchListener($listenerServiceId);
```

Filtering
-----------

```php
<?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);
```
<commit_msg>Contributors link in Readme<commit_after># Listeners debug for Symfony2 DIC Events [![Build Status](https://travis-ci.org/egulias/ListenersDebug.png?branch=master)](https://travis-ci.org/egulias/ListenersDebug) [![Coverage Status](https://coveralls.io/repos/egulias/ListenersDebug/badge.png?branch=master)](https://coveralls.io/r/egulias/ListenersDebug?branch=master)

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
<?php

use Egulias\ListenersDebug\ListenerFetcher;

$fetcher = new ListenerFetcher($containerBuilder);

$listeners = $fetcher->fetchListeners($showPrivate);
$listener = $fetcher->fetchListener($listenerServiceId);
```

Filtering
-----------

```php
<?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.
{'fraction_non_alphanumeric': 0.144973968762515, 'fraction_numerical': 0.0008009611533840609, 'mean_word_length': 5.938888888888889, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '430841', 'n_tokens_mistral': 755, 'n_tokens_neox': 760, 'n_words': 159}