Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mindplay-dk/funnel
Type-hinted, optimized event facility for PHP 5.3+
https://github.com/mindplay-dk/funnel
Last synced: about 1 month ago
JSON representation
Type-hinted, optimized event facility for PHP 5.3+
- Host: GitHub
- URL: https://github.com/mindplay-dk/funnel
- Owner: mindplay-dk
- Created: 2014-05-22T14:23:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-14T12:51:45.000Z (over 9 years ago)
- Last Synced: 2024-10-13T13:09:21.762Z (3 months ago)
- Language: PHP
- Size: 234 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
funnel
======https://github.com/mindplay-dk/funnel
[![Build Status](https://travis-ci.org/mindplay-dk/funnel.png)](https://travis-ci.org/mindplay-dk/funnel)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mindplay-dk/funnel/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mindplay-dk/funnel/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/mindplay-dk/funnel/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mindplay-dk/funnel/?branch=master)
This is simple event sink (pub/sub) facility for PHP 5.3+ which attempts to
improve on the performance and robustness of event facilities in general.See "example.php" in the root-folder for an example of how to use this class.
By using type-hinted closures for event types (classes) as opposed to arbitrary
strings (event names) or literal class names or function names as strings, the
robustness is greatly improved - a modern IDE (such as Php Storm) can perform
meaningful inspections, code can be safely refactored, and you can more easily
navigate the code base e.g. by following real, static type-hints.A means of optimizing performance is provided, by permitting the use of "proxy"
functions for initialization of events to be submitted - loading and constructing
an event object can be done conditionally, by "short circuiting" the event when
no listeners for that type of event have been registered.