Skip to content

Commit

Permalink
added getEventDispatcher method
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon1600 committed Dec 25, 2017
1 parent 6232d52 commit 565ced9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ private function write_callback($ch, $str){
// https://github.com/laravel/framework/blob/5.0/src/Illuminate/Events/Dispatcher.php#L72
private $listeners = array();

// Proxy instance itself acts as a dispatcher!
public function getEventDispatcher(){
return $this;
}

public function addListener($event, $callback, $priority = 0){
$this->listeners[$event][$priority][] = $callback;
}
Expand Down

0 comments on commit 565ced9

Please sign in to comment.