Skip to content

Commit

Permalink
Fixes #53, corrected event typehint for listener classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Apr 24, 2015
1 parent 4e30f68 commit 87a1e10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 1.0/listeners/class-based-listeners.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ same implementation of `isListener` the `AbstractListener` implements this for y

~~~ php
use League\Event\ListenerInterface;
use League\Event\AbstractEvent;
use League\Event\EventInterface;

class DomainListener implements ListenerInterface
{
Expand All @@ -23,7 +23,7 @@ class DomainListener implements ListenerInterface
return $listener === $this;
}

public function handle(AbstractEvent $event)
public function handle(EventInterface $event)
{
// Handle the event.
}
Expand All @@ -36,11 +36,11 @@ $emitter->addListener('event.name', new DomainListener);

~~~ php
use League\Event\AbstractListener;
use League\Event\AbstractEvent;
use League\Event\EventInterface;

class DomainListener extends AbstractListener
{
public function handle(AbstractEvent $event)
public function handle(EventInterface $event)
{
// Handle the event.
}
Expand Down

0 comments on commit 87a1e10

Please sign in to comment.