src/WithEvents.php
public function unsubscribe($eventType, $callbackId)
    {
        $success = false;
        if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) {
            $this->eventList[$eventType] = array_filter(
                $this->eventList[$eventType],
                function ($cb) use ($callbackId) {
                    return $cb['id'] !== $callbackId;
                }
            );
            $success = true;
        }
        return $success;
    }
public function unsubscribe($eventType, $callbackId)
    {
        $success = false;
        if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) {
            $this->eventList[$eventType] = array_filter(
                $this->eventList[$eventType],
                function ($cb) use ($callbackId) {
                    return $cb['id'] !== $callbackId;
                }
            );
            $success = true;
        }
        return $success;
    }
public function unsubscribe ( $ eventType , $ callbackId ) { $ success = false ; if ( ! isset ( $ this -> eventList [ $ eventType ] ) || ! is_array ( $ this -> eventList [ $ eventType ] ) ) { $ this -> eventList [ $ eventType ] = array_filter ( $ this -> eventList [ $ eventType ] , function ( $ cb ) use ( $ callbackId ) { return $ cb [ 'id' ] !== $ callbackId ; } ) ; $ success = true ; } return $ success ; }
Remove callback by identifier.
@param string
@param string
Remove callback by identifier .