Calls the assigned listeners.

@param string $abstract
@param object $result
@param array  $listeners
430239
protected function callListeners($abstract, $result, array $listeners)
    {
        if (isset($listeners[$abstract])) {
            $this->iterateListeners($listeners[$abstract], $result);
        }

        foreach ($listeners as $classOrInterface => $instanceListeners) {

            // We already called them above
            if ($classOrInterface == $abstract) {
                continue;
            }

            if (!$result instanceof $classOrInterface) {
                continue;
            }

            $this->iterateListeners($instanceListeners, $result);
        }
    }
171224
public function afterResolving($abstract, $listener)
    {
        $this->laravel->afterResolving($abstract, $this->buildResolvingCallable($listener));

        return $this->storeAfterResolvingListener($abstract, $listener);
    }
1208444
public function instance($abstract, $instance)
    {
        $this->laravel->instance($abstract, $instance);
        $this->callAllListeners($abstract, $instance);

        return $this;
    }
628696
protected function makeEventAndListeners($event, $listeners)
    {
        if (! Str::contains($event, '\\')) {
            return;
        }

        $this->call('generate:event', ['name' => $event]);

        $this->makeListeners($event, $listeners);
    }
1161553
public function setResult($result = self::RESULT_SUCCESS,
                              $message = null,
                              array $data = [],
                              array $additional = [])
    {
        $this->headers->set('X-Phlexible-Response', 'result');

        $values = [
            'success' => $result,
            'msg' => $message,
            'data' => $data,
        ];

        if (is_array($additional) && count($additional)) {
            foreach ($additional as $key => $value) {
                $values += $additional;
            }
        }

        $this->setData($values);
    }
41359
public void setSuccess(V result) {
        if (this.isCancelled()) {
            this.releaseIfNeed(result);
        }
        if (setSuccess0(result)) {
            notifyListeners();
            return;
        }
        throw new IllegalStateException("complete already: " + this);
    }
301901
public function addListener($event, $method)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = array();
        }

        $this->listeners[$event][] = $method;
    }
507435
public function addListeners($event, $listeners)
    {
        foreach ($listeners as $listener) {
            $this->addListener($event, $listener);
        }
    }
212036
private void throwResult(final Result result) {
		this.executor.execute(new Runnable() {
			
			@Override
			public void run() {
				QConnectorAsyncImpl.this.listener.resultReceived("", result);
			}
		});
	}
866372
public void setListeners(java.util.Collection<Listener> listeners) {
        if (listeners == null) {
            this.listeners = null;
            return;
        }

        this.listeners = new java.util.ArrayList<Listener>(listeners);
    }
437001
public static function dispatch(string $event, array $args = [], bool $return = false)
    {
        // is there some registered $listeners ?
        if (isset(Event::$listeners[$event]) && count(Event::$listeners[$event]) > 0) {

            // Get all listeners for given event.
            $listeners = Event::$listeners[$event];

            // Sort by priority
            krsort($listeners);

            // Loop through $listeners array
            foreach ($listeners as $listener) {

                // Loop through $_listener array
                foreach ($listener as $_listener) {

                    // Return or Render specific $_listener results ?
                    if ($return) {
                        return call_user_func_array($_listener['function'], (isset($args) ? $args : $_listener['args']));
                    } else {
                        call_user_func_array($_listener['function'], (isset($args) ? $args : $_listener['args']));
                    }
                }
            }
        }
    }
1158048
protected function fireAfterResolvingCallbacks($abstract, $object)
    {
        $this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks);

        $this->fireCallbackArray(
            $object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks)
        );
    }
700131
public function bindCallback(string $scope, string $abstract, callable $factory)
    {
        $this->validateScope(__METHOD__, $scope);

        if ($scope === self::SCOPE_INSTANCE_PER_RESOLVE) {
            $this->container->bind($abstract, $factory);
        } else {
            $this->container->singleton($abstract, $factory);
        }
    }
123715
protected function callAfterCallbacks(User $user, $ability, array $arguments, $result)
    {
        $arguments = array_merge(array($user, $ability, $result), $arguments);

        foreach ($this->afterCallbacks as $callback) {
            call_user_func_array($callback, $arguments);
        }
    }
893774
@Inject @EventStoreListener
	public void setListeners(Collection<EventListener> listeners) {
		for (EventListener listener : listeners) {
			registerListener(listener);
		}
	}
175095
public void setListenerArns(java.util.Collection<String> listenerArns) {
        if (listenerArns == null) {
            this.listenerArns = null;
            return;
        }

        this.listenerArns = new java.util.ArrayList<String>(listenerArns);
    }
805640
protected function callListeners($name, &$result)
    {
        foreach ($this->_alwaysCalledExtensions as $listener) {
            call_user_func($listener, $name, $result);
        }
    }