Removes registered ack/nack listener. If the callback is not registered, this is noop.

@param callable $callback
@return $this
169812
public function removeAckListener(callable $callback)
    {
        if ($this->mode !== ChannelModeEnum::CONFIRM) {
            throw new ChannelException("Ack/nack listener can be removed when channel in confirm mode.");
        }

        foreach ($this->ackCallbacks as $k => $v) {
            if ($v === $callback) {
                unset($this->ackCallbacks[$k]);
            }
        }

        return $this;
    }
408453
function off(string $event, $callback): bool
    {
        return $this->getEventEmitter()->off($event, $callback);
    }
1004981
public function setCallback($callback)
    {
        if ($callback instanceof \OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface) {
            $callback = array($callback, 'execute');
        }
        $this->callback = $callback;

        return $this;
    }
365320
public function unregisterEvent($event , $callback)
    {
        $eventManager = $this->getServiceLocator()->get(EventManager::CONFIG_ID);
        $eventManager->detach($event , $callback);
        $this->getServiceManager()->register(EventManager::CONFIG_ID, $eventManager);
    }
1175978
public function addAckListener(callable $callback)
    {
        if ($this->mode !== ChannelModeEnum::CONFIRM) {
            throw new ChannelException("Ack/nack listener can be added when channel in confirm mode.");
        }

        $this->removeAckListener($callback);
        $this->ackCallbacks[] = $callback;
        return $this;
    }
388195
def remove_listener(self, callback):
        
        listeners = filter(lambda x: x['callback'] == callback, self.listeners)
        for l in listeners:
            self.listeners.remove(l)
475614
public function offAny(callable $listener)
    {
        if (false !== $index = array_search($listener, $this->anyListeners, true)) {
            unset($this->anyListeners[$index]);
        }
    }
250231
public function setUserCallback (callable $callback)
	{
		//$this->usercallback = $callback;

		if (count ($this->usercallback) > 0)
			throw new InvalidParameter ("A usercallback was already set. Use addUserCallback to add multiple callbacks");

		$this->addUserCallback ('default', $callback);

		return $this;
	}
510789
public function neither(Closure $callback) {
        $predicate = new Predicate(self::NEITHER);
        $predicate->bindCallback($callback);

        $this->_params[] = $predicate;

        $this->addBinding(null, $predicate);

        return $this;
    }
1113008
public function when($callback)
    {
        $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) {
            return $callback;
        };

        return $this;
    }
427934
public function AssignCallback($Callback, $Options = NULL) {
      if (!is_callable($Callback)) return FALSE;
      
      $this->Callback = $Callback;
      $this->CallbackOptions = $Options;
   }
423311
public function off(string $event = null, callable $callback = null): EventInterface
    {
        //if there is no event and not callable
        if (is_null($event) && is_null($callback)) {
            //it means that they want to remove everything
            $this->observers = [];
            return $this;
        }

        //if there are callbacks listening to
        //this and no callback was specified
        if (isset($this->observers[$event]) && is_null($callback)) {
            //it means that they want to remove
            //all callbacks listening to this event
            unset($this->observers[$event]);
            return $this;
        }

        //if there are callbacks listening
        //to this and we have a callback
        if (isset($this->observers[$event]) && is_callable($callback)) {
            return $this->removeObserversByEvent($event, $callback);
        }

        //if no event, but there is a callback
        if (is_null($event) && is_callable($callback)) {
            return $this->removeObserversByCallback($callback);
        }

        // @codeCoverageIgnoreStart
        return $this;
        // @codeCoverageIgnoreEnd
    }
46282
private function finish_callback(
		callable $callback, array $args
	) {
		$this->request_handled = true;
		$this->wrap_callback($callback, $args);
		return $this;
	}
494872
public function detach(string $event, $callback){
        if(isset($this->listeners[$event])){
            return $this->listeners[$event]->remove($callback);
        }
        return false;
    }
816543
public function unregisterShutdownFunction($callback)
    {
        if (($k = array_search($callback, $this->shutdownFuncs)) !== false) {
            unset($this->shutdownFuncs[$k]);
        }
    }
1184438
public function setCallback($callback)
    {
        if($callback instanceof Closure)
        {
            $this->callback = $callback;
        }
        elseif(is_callable($callback))
        {
            $this->callback = function($chunk) use($callback)
            {
                return call_user_func_array($callback, [$chunk]);
            };
        }
        else
        {
            throw new Exception('Invalid callback');
        }

        return $this;
    }
571875
public function setCallback(callable $callback): EventObserver
    {
        $this->callback = $callback;
        $this->id = $this->getId($callback);

        return $this;
    }