PHPackages                             ride/lib-event - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ride/lib-event

ActiveLibrary[Framework](/categories/framework)

ride/lib-event
==============

Event library of the Ride framework

1.0.1(9y ago)05.2k17MITPHP

Since Sep 23Pushed 9y ago7 watchersCompare

[ Source](https://github.com/all-ride/ride-lib-event)[ Packagist](https://packagist.org/packages/ride/lib-event)[ RSS](/packages/ride-lib-event/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (10)Used By (17)

Ride: Event Library
===================

[](#ride-event-library)

Event library of the PHP Ride framework.

What's In This Library
----------------------

[](#whats-in-this-library)

### EventManager

[](#eventmanager)

The *EventManager* interface is the facade for this event system. You can add and remove event listeners and trigger events from here.

A generic implementation is provided by the *GenericEventManager* class.

### Event

[](#event)

When you trigger an event on the *EventManager*, an *Event* instance is created and passed to the listeners. The *Event* class holds the name of the event, potential arguments and gives you the possibility to stop cascading to the following listeners.

### EventListener

[](#eventlistener)

An *EventListener* instance defines the event, the callback and weight of a listener. Listeners with a lower weight, will be invoked before listeners with a higher weight.

### EventLoader

[](#eventloader)

The *GenericEventManager* has lazy load capabilities through the *EventLoader* interface.

This interface's purpose is to start resolving listeners when the event is triggered for the first time.

Code Sample
-----------

[](#code-sample)

Check this code sample to see the possibilities of this library:

```
