public function bind($event, $cb)
    {
        if ($cb !== null) {
            $cb = CallbackWrapper::wrap($cb);
        }
        $event = (array) $event;
        foreach ($event as $e) {
            CallbackWrapper::addToArray($this->eventHandlers[$e], $cb);
        }
        return $this;
    }
public function bind($event, $cb)
    {
        if ($cb !== null) {
            $cb = CallbackWrapper::wrap($cb);
        }
        $event = (array) $event;
        foreach ($event as $e) {
            CallbackWrapper::addToArray($this->eventHandlers[$e], $cb);
        }
        return $this;
    }
public function bind ( $ event , $ cb ) { if ( $ cb !== null ) { $ cb = CallbackWrapper :: wrap ( $ cb ) ; } $ event = ( array ) $ event ; foreach ( $ event as $ e ) { CallbackWrapper :: addToArray ( $ this -> eventHandlers [ $ e ] , $ cb ) ; } return $ this ; }
Bind event or events
@param string|array $event Event name
@param callable $cb Callback
@return this
Bind event or events