public function addListener($event, $method)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = array();
        }

        $this->listeners[$event][] = $method;
    }
public function addListener($event, $method)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = array();
        }

        $this->listeners[$event][] = $method;
    }
public function addListener ( $ event , $ method ) { if ( ! isset ( $ this -> listeners [ $ event ] ) ) { $ this -> listeners [ $ event ] = array ( ) ; } $ this -> listeners [ $ event ] [ ] = $ method ; }
Adds a listener for the specified event.
@param string $event
@param string $method
Adds a listener for the specified event .