Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the ability for Signal Event Listeners to attach to multiple Events. #79

Closed
trq opened this issue Mar 25, 2012 · 2 comments
Closed
Labels
Milestone

Comments

@trq
Copy link
Member

trq commented Mar 25, 2012

So, instead of simply listening to one event:

<?php

(new Manager)->attach([
    'name'      => 'some-event',
    'callback'  => function($e) {}
]);

we could attache to multiple:

<?php

(new Manager)->attach([
    'name'      => ['some-event', 'some-other-event'],
    'callback'  => function($e) {}
]);

and from here, it would also maybe be nice to implement an all:

<?php

(new Manager)->attach([
    'name'      => '*',
    'callback'  => function($e) {}
]);
@trq
Copy link
Member Author

trq commented Mar 25, 2012

Another option might also be to be able to attach to an event by a pattern. eg;

<?php

(new Manager)->attach([
    'name'      => 'pre.in.*',
    'callback'  => function($e) {}
]);

@trq
Copy link
Member Author

trq commented Mar 29, 2012

Closed by 98047dd & 6fb92c1

The pattern matching proposal is going to be far too inefficient IMO.

@trq trq closed this as completed Mar 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant