Removes all observers matching this event and callback

@param *string   $event
@param *callable $callback

@return EventInterface
774465
protected function removeObserversByEvent(string $event, callable $callback): EventInterface
    {
        //if event isn't set
        if (!isset($this->observers[$event])) {
            //do nothing
            return $this;
        }

        //'foobar' => array(
        foreach ($this->observers[$event] as $i => $observer) {
            //0 => callback
            if ($observer['observer']->assertEquals($callback)) {
                unset($this->observers[$event][$i]);
            }
        }

        return $this;
    }
283812
public static function deleteListener(String $eventName, $callback = NULL) : Bool
    {
        return Listener::delete($eventName, $callback);
    }
1200418
public function on($event, callable $listener)
    {
        if ($this->markFilters) {
            $listener = $this->wrap($listener, '*', $this->markFilters);
        }

        $this->root->on($event, $listener);

        return $this;
    }
408453
function off(string $event, $callback): bool
    {
        return $this->getEventEmitter()->off($event, $callback);
    }
890563
public function forget($event)
    {
        if (Str::contains($event, '*')) {
            unset($this->wildcards[$event]);
        } else {
            unset($this->listeners[$event]);
        }
    }
710696
public function removeFilter($callback)
    {
        if (($index = array_search(self::NAMESPACE_PLUGINS_FILTERS. 'Filter' . self::toCamelCase($callback), $this->filters,
                true)) !==
            false) {
            unset($this->filters[$index]);
        } elseif (($index = array_search($callback, $this->filters, true)) !== false) {
            unset($this->filters[$index]);
        } else {
            $class = self::NAMESPACE_PLUGINS_FILTERS . 'Filter' . $callback;
            foreach ($this->filters as $index => $filter) {
                if (is_array($filter) && $filter[0] instanceof $class) {
                    unset($this->filters[$index]);
                    break;
                }
            }
        }
    }
365320
public function unregisterEvent($event , $callback)
    {
        $eventManager = $this->getServiceLocator()->get(EventManager::CONFIG_ID);
        $eventManager->detach($event , $callback);
        $this->getServiceManager()->register(EventManager::CONFIG_ID, $eventManager);
    }
183041
public function trigger(EventInterface $event, \Closure $callback = null)
    {
        if ($listeners = $this->getListeners($event->getName())) {
            foreach ($listeners as $listener) {
                if ($result = call_user_func($listener, $event)) {
                    if ($result instanceof EventInterface) {
                        // Was the queue halted early ?
                        if ($result->isQueueHaltedEarly()) {
                            return $this;
                        }

                        if ($callback !== null) {
                            call_user_func($callback, $result);
                        }

                        // Was the queue halted ?
                        if ($result->isQueueHalted()) {
                            return $this;
                        }
                    } else {
                        throw new \RuntimeException(
                            'Value returned from an Event Callback must be of type Proem\Signal\EventInterface'
                        );
                    }
                }
            }
        }

        return $this;
    }
397477
public function on($event, Closure $callback)
    {
        if (!in_array($event, ['*', 'modify', 'delete', 'create'])) {
            throw new RuntimeException('Could not bind to unknown event '.$event);
        }

        $this->registerBinding($event, $callback);
    }
1003714
public function off($event)
   {
      list($type, $namespace) = Event::split($event);

      for ($i=count($this->eventHandlers)-1; $i>-1; $i--) {
         $h = $this->eventHandlers[$i];
         if ($type !== null && $h->getType() !== $type) {
            continue;
         }
         else if ($namespace !== null && $h->getNamespace() !== $namespace) {
            continue;
         }
         
         array_splice($this->eventHandlers, $i, 1);
      }

      return $this;
   }
1019365
public function removeListener($event, $listener)
    {
        // shortcut to only remove a listener if they exist
        // having this allows us to simplify calling code
        if( !isset($listener) ) {
            return $this;
        }

        // listeners
        if (isset($this->listeners[$event])) {
            if (false !== ($key = array_search($listener, $this->listeners[$event]))) {
                unset($this->listeners[$event][$key]);
            }
            if( !$this->listeners[$event] ) {
                unset( $this->listeners[$event] );
            }
        }
        // listeners once
        if (isset($this->listenersOnce[$event])) {
            if (false !== ($key = array_search($listener, $this->listenersOnce[$event]))) {
                unset($this->listenersOnce[$event][$key]);
            }
            if( !$this->listenersOnce[$event] ) {
                unset( $this->listenersOnce[$event] );
            }
        }
        return $this;
    }
327513
protected static function registerObservableEvent($event, $callback)
    {
        if (! isset(static::$dispatcher)) {
            return ;
        }

        $className = get_called_class();

        $event = with(new static())->getObservableKey($event);

        static::$dispatcher->listen("{$event}: {$className}", $callback);
    }
1196372
@Override
	public void removeCallback(Callback callback) {
		callbacks.remove(callback);
		if (manager != null) {
			callback.cleanup();
		}
	}
934757
public function removeHandler(callable $handler)
    {
        $key = array_search($handler, $this->eventHandlers, true);

        if ($key !== false) {
            unset($this->eventHandlers[$key]);
        }
    }
1248271
public function removeEventListener($event, $listener){
     if (!$this->events[$event]) return $this;
   

    $indexOf = 0;
    foreach ($this->Iterator('Array') as $EventListener) {
       if($EventListener === $listener)	{
         array_splice($this->events[$event], $indexOf, 1);	   	
         $indexOf--;
	   }
         $indexOf++;
    }
    return $this; 	
  }
39448
function off(event, callback) {
    if (callback) {
      listeners[event].splice(listeners[event].indexOf(callback), 1);
    }
    else {
      listeners[event] = [];
    }
  }
1232675
public function setCleanupCallback($callback)
    {
        if (!is_null($callback)
            && !is_callable($callback)
        ) {
            throw new InvalidArgumentException("No callable function provided");
        }

        $this->cleanupCallback = $callback;

        return $this;
    }