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

Support custom callback aliases for event subscriptions #8

Closed
Majkl578 opened this issue Apr 10, 2013 · 0 comments
Closed

Support custom callback aliases for event subscriptions #8

Majkl578 opened this issue Apr 10, 2013 · 0 comments
Labels

Comments

@Majkl578
Copy link
Member

Event subscribers should be able to specify a callback alias for each registered event. Imagine this fictional scenario:

class SomeChangeListener implements Subscriber
{
    public function getSubscribedEvents()
    {
        return array(
            'User::changed',
            'Book::changed',
        );
    }
}

In this case, I end up with a conflict. It'd be essential to set aliases, like this:

        return array(
            'User::changed' => 'userChanged',
            'Book::changed' => 'bookChanged',
        );
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