A simple event dispatching library for PHP with a Node.js EventEmitter-inspired API.
Événement is a simple event dispatching library for PHP that implements the observer pattern through an event-driven API. It allows PHP components to emit and listen for events, enabling decoupled communication without direct dependencies. The library is designed to be minimal and intuitive, inspired by Node.js's EventEmitter.
PHP developers building applications that require decoupled component communication, such as those implementing event-driven architectures or needing lightweight event handling without full-fledged frameworks.
Developers choose Événement for its simplicity and familiarity—it offers a clean, Node.js-inspired API while staying lightweight and focused, making it easy to integrate into existing projects without overhead.
Événement is a very simple event dispatching library for PHP.
The library offers straightforward methods like `on()`, `emit()`, and `removeListener()`, mirroring Node.js's EventEmitter for ease of use, as demonstrated in the README examples.
Inspired by Node.js EventEmitter, it allows developers with JavaScript experience to quickly adopt event-driven patterns in PHP without a steep learning curve, as highlighted in the README.
Focuses on core event dispatching without unnecessary features, keeping the library small and easy to integrate, similar to Silex and Pimple as mentioned in the philosophy section.
Enables components to communicate via events without direct dependencies, leading to cleaner, more maintainable codebases, as emphasized in the decoupled design goal.
Lacks built-in support for event priorities, wildcard listeners, or event bubbling, which are common in more comprehensive event libraries like Symfony's EventDispatcher, making it unsuitable for complex scenarios.
Events are emitted synchronously by default, which can block execution and may not be suitable for performance-sensitive applications requiring non-blocking or parallel processing.
The README does not demonstrate error handling mechanisms for events, leaving developers to implement their own solutions for robust error management in event listeners.
🚀 Coroutine-based concurrency library for PHP
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
Event-driven, non-blocking I/O with PHP.
Asynchronous WebSocket server
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.