mirror of
https://github.com/stan220/WildcardEventDispatcher.git
synced 2026-09-08 21:28:42 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d96fe85d12 | ||
|
|
36fbd1c880 | ||
|
|
1996172dbe | ||
|
|
b7860e16b4 | ||
|
|
ef8369f930 | ||
|
|
282231d728 |
+1
-3
@@ -1,5 +1,3 @@
|
||||
composer.lock
|
||||
phpunit.xml
|
||||
vendor
|
||||
composer.lock
|
||||
composer.phar
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
|
||||
before_script: composer install --dev
|
||||
@@ -1,11 +1,17 @@
|
||||
# WildcardEventDispatcher
|
||||
|
||||
[](https://travis-ci.org/jmikola/WildcardEventDispatcher)
|
||||
|
||||
This library implements an event dispatcher, based on [Symfony2's interface][],
|
||||
with wildcard syntax inspired by AMQP topic exchanges. Listeners may be bound to
|
||||
a wildcard pattern and be notified if a dispatched event's name matches that
|
||||
pattern. Literal event name matching is still supported.
|
||||
|
||||
If you are interested in using this library in a Symfony2 project, you may also
|
||||
want to take a look at the corresponding [bundle][].
|
||||
|
||||
[Symfony2's interface]: https://github.com/symfony/EventDispatcher
|
||||
[bundle]: https://github.com/jmikola/JmikolaWildcardEventDispatcherBundle
|
||||
|
||||
## Usage ##
|
||||
|
||||
|
||||
+2
-1
@@ -8,9 +8,10 @@
|
||||
"authors": [
|
||||
{ "name": "Jeremy Mikola", "email": "jmikola@gmail.com" }
|
||||
],
|
||||
"minimum-stability": "dev",
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"symfony/event-dispatcher": ">=2.0-dev,<2.2-dev"
|
||||
"symfony/event-dispatcher": ">=2.0.0,<2.3-dev"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Jmikola": "src/" }
|
||||
|
||||
+3
-5
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if (file_exists($file = __DIR__.'/../vendor/.composer/autoload.php')) {
|
||||
$loader = require_once $file;
|
||||
} else {
|
||||
if (!is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
|
||||
throw new RuntimeException('Install dependencies to run test suite.');
|
||||
}
|
||||
|
||||
$loader->add('Jmikola\\WildcardEventDispatcher', __DIR__.'/../src');
|
||||
require $autoloadFile;
|
||||
|
||||
Reference in New Issue
Block a user