Skip to content

Commit 565ced9

Browse files
committed
added getEventDispatcher method
1 parent 6232d52 commit 565ced9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Proxy.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ private function write_callback($ch, $str){
8282
// https://github.com/laravel/framework/blob/5.0/src/Illuminate/Events/Dispatcher.php#L72
8383
private $listeners = array();
8484

85+
// Proxy instance itself acts as a dispatcher!
86+
public function getEventDispatcher(){
87+
return $this;
88+
}
89+
8590
public function addListener($event, $callback, $priority = 0){
8691
$this->listeners[$event][$priority][] = $callback;
8792
}

0 commit comments

Comments
 (0)