<commit_before>Event Manager Component
===============

`EventManager` allows you to easily manage events throughout your application.

Install the component
---------------------
The best way to install the component is using Composer.

```json
{
    "require": {
        "webiny/event-manager": "1.0.*"
    }
}
```
For additional versions of the package, visit the [Packagist page](https://packagist.org/packages/webiny/event-manager).

Once you have your `composer.json` file in place, just run the install command.

    $ php composer.phar install

To learn more about Composer, and how to use it, please visit [this link](https://getcomposer.org/doc/01-basic-usage.md).

Alternatively, you can also do a `git checkout` of the repo.

## Usage

Accessing `EventManager` can be done in 2 ways. The preferable way is using `EventManagerTrait`, but you can also access it directly, using `EventManager::getInstance()`. Let's see a simple example of subscribing to an event called `some.event` with an instance of `YourHandler`:

```php
class YourClass{<commit_msg>Version bumped to 1.1.1<commit_after>Event Manager Component
===============

`EventManager` allows you to easily manage events throughout your application.

Install the component
---------------------
The best way to install the component is using Composer.

```json
{
    "require": {
        "webiny/event-manager": "1.1.*"
    }
}
```
For additional versions of the package, visit the [Packagist page](https://packagist.org/packages/webiny/event-manager).

Once you have your `composer.json` file in place, just run the install command.

    $ php composer.phar install

To learn more about Composer, and how to use it, please visit [this link](https://getcomposer.org/doc/01-basic-usage.md).

Alternatively, you can also do a `git checkout` of the repo.

## Usage

Accessing `EventManager` can be done in 2 ways. The preferable way is using `EventManagerTrait`, but you can also access it directly, using `EventManager::getInstance()`. Let's see a simple example of subscribing to an event called `some.event` with an instance of `YourHandler`:

```php
class YourClass{
{'fraction_non_alphanumeric': 0.12628624883068287, 'fraction_numerical': 0.00608044901777362, 'mean_word_length': 3.9285714285714284, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5021061', 'n_tokens_mistral': 612, 'n_tokens_neox': 582, 'n_words': 252}