public function listen($event,$listener){
        $listers_of_event = isset($this->listeners[$event]) ? $this->listeners[$event] : array();
        if (!in_array($listener,$listers_of_event,true)){
            $listers_of_event[] = $listener;
            $this->listeners[$event] = $listers_of_event;
        }
    }
public function listen($event,$listener){
        $listers_of_event = isset($this->listeners[$event]) ? $this->listeners[$event] : array();
        if (!in_array($listener,$listers_of_event,true)){
            $listers_of_event[] = $listener;
            $this->listeners[$event] = $listers_of_event;
        }
    }
public function listen ( $ event , $ listener ) { $ listers_of_event = isset ( $ this -> listeners [ $ event ] ) ? $ this -> listeners [ $ event ] : array ( ) ; if ( ! in_array ( $ listener , $ listers_of_event , true ) ) { $ listers_of_event [ ] = $ listener ; $ this -> listeners [ $ event ] = $ listers_of_event ; } }
add a listener callback to event emitter

@param string $event
@param callable $listener
add a listener callback to event emitter