src/Events.php
public function detachTrigger(TriggerInterface $trigger, $eventNameOrClass)
    {
        $event = (string) $eventNameOrClass;

        if (isset($this->events[$event])) {
            foreach ($this->events[$event] as $priority => $triggers) {
                if (false !== ($key = array_search($trigger, $triggers, false))) {
                    unset($this->events[$event][$priority][$key]);
                }
            }
        }

        return $this;
    }
public function detachTrigger(TriggerInterface $trigger, $eventNameOrClass)
    {
        $event = (string) $eventNameOrClass;

        if (isset($this->events[$event])) {
            foreach ($this->events[$event] as $priority => $triggers) {
                if (false !== ($key = array_search($trigger, $triggers, false))) {
                    unset($this->events[$event][$priority][$key]);
                }
            }
        }

        return $this;
    }
public function detachTrigger ( TriggerInterface $ trigger , $ eventNameOrClass ) { $ event = ( string ) $ eventNameOrClass ; if ( isset ( $ this -> events [ $ event ] ) ) { foreach ( $ this -> events [ $ event ] as $ priority => $ triggers ) { if ( false !== ( $ key = array_search ( $ trigger , $ triggers , false ) ) ) { unset ( $ this -> events [ $ event ] [ $ priority ] [ $ key ] ) ; } } } return $ this ; }
Detaches trigger from the specified event.

@param TriggerInterface $trigger          The event trigger
@param string           $eventNameOrClass The event name or class of event

@return Events
Detaches trigger from the specified event .