public function removeHandler($handler)
    {
        if(!is_callable($handler))
            throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback");

        $i = array_search($handler, $this->_handlers, true);

        if ($i !== false)
            unset($this->_handlers[$i]);

        return $this;
    }
public function removeHandler($handler)
    {
        if(!is_callable($handler))
            throw new \InvalidArgumentException("Argument 1 of Event->addHandler needs to be a valid callback");

        $i = array_search($handler, $this->_handlers, true);

        if ($i !== false)
            unset($this->_handlers[$i]);

        return $this;
    }
public function removeHandler ( $ handler ) { if ( ! is_callable ( $ handler ) ) throw new \ InvalidArgumentException ( "Argument 1 of Event->addHandler needs to be a valid callback" ) ; $ i = array_search ( $ handler , $ this -> _handlers , true ) ; if ( $ i !== false ) unset ( $ this -> _handlers [ $ i ] ) ; return $ this ; }
Removes an assigned handler

This uses array_search to find the handler

@param callable $handler The handler to remove

@return $this
Removes an assigned handler