{@inheritdoc}
Because laravel does not call listeners on instance() this
class has to store them too.

@param string   $abstract
@param callable $listener

@return self
171224
public function afterResolving($abstract, $listener)
    {
        $this->laravel->afterResolving($abstract, $this->buildResolvingCallable($listener));

        return $this->storeAfterResolvingListener($abstract, $listener);
    }
1214073
public function onAfter($event, callable $listener)
    {
        if ($this->markFilters) {
            $listener = $this->wrap($listener, '*', $this->markFilters);
        }

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

        return $this;

    }
1108738
public function on(string $event, $listener)
    {
        if (empty($this->_events[$event])) {

            $this->_events[$event] = [$listener];
        }
        else {

            $this->_events[$event][] = $listener;
        }

        return $this;
    }
249430
public function remove($listener)
    {
        if ($this->storage->contains($listener)) {
            $this->storage->detach($listener);
            $this->storage->rewind();

            $this->queue = new \SplPriorityQueue();

            foreach ($this->storage as $listener) {
                $priority = $this->storage->getInfo();
                $this->queue->insert($listener, $priority);
            }
        }

        return $this;
    }
475614
public function offAny(callable $listener)
    {
        if (false !== $index = array_search($listener, $this->anyListeners, true)) {
            unset($this->anyListeners[$index]);
        }
    }
645397
private function invokeListener($listener, $event)
    {
        if (is_array($listener))
        {
            list($listenerClass, $method) = $listener;

            $listenerInstance = $this->objectManager->get($listenerClass);
            $listenerInstance->{$method}($event);
        }
        else
        {
            call_user_func($listener, $event);
        }
    }
867087
public function use_hook_listener( HookListenerInterface $listener ) {

		add_action(
			HookListenersRegistry::ACTION_REGISTER,
			function ( HookListenersRegistry $registry ) use ( $listener ) {

				$registry->register_listener( $listener );
			}
		);

		return $this;
	}
1038477
protected function ensureOnceListener($listener): OnceListener
    {
        if (Assert::instanceOf($listener, '\\One\\Event\\OnceListener')) {
            return $listener;
        } elseif (Assert::instanceOf($listener, '\\Closure') || Assert::array($listener)) {
            return new OnceListener($listener);
        } elseif (Assert::string($listener)) {
            return Reflection::newInstance($listener);
        }

        throw new InvalidArgumentException(
            '`OnceListener` must be `array`, `Closure` or extends class `One\Event\OnceListener`'
        );
    }
1307568
public function create(RuleListener $listener)
    {
        $rule = new Rule();
        $form = $this->presenter->form($rule);

        return $listener->showCreateForm(compact('rule', 'form'));
    }
1027217
public function setStateListener($event, $listener)
    {
        $js = sprintf(
            'uLogin.setStateListener("%s", "%s", %s);',
            $this->id,
            $event,
            $listener
        );

        $this->getView()->registerJs($js);
        return $this;
    }
710484
public function makeListener($listener, $wildcard = false)
    {
        if (is_string($listener)) {
            return $this->createClassListener($listener, $wildcard);
        }

        return function ($event, $payload) use ($listener, $wildcard) {
            if ($wildcard) {
                return $listener($event, $payload);
            } else {
                return $listener(...array_values($payload));
            }
        };
    }
641488
public function removeEventListener(string $name, callable $listener): self
    {
        if (isset($this->internalEventListenersData[$name])) {
            foreach ($this->internalEventListenersData[$name] as $i => $value) {
                if ($value === $listener) {
                    unset($this->internalEventListenersData[$name][$i]);
                    if (empty($this->internalEventListenersData[$name])) {
                        unset($this->internalEventListenersData[$name]);
                    }
                    break;
                }
            }
        }
        return $this;
    }
1010745
public function createClassListener($listener)
    {
        $container = $this->container;

        return function () use ($listener, $container)
        {
            return call_user_func_array(
                $this->createClassCallable($listener, $container),
                func_get_args()
            );
        };
    }
897217
static private function getListener($listener)
    {
        $listenerClassName = Ioc::resolveClassName($listener);
    	if (!isset(self::$_elInstances[$listenerClassName])) {
    		if (!($listener instanceof EventListenerInterface)) {
    			$listener = Ioc::createObject($listener);
    		}
    		self::$_elInstances[$listenerClassName] = $listener;
    	}
    	
    	return self::$_elInstances[$listenerClassName];
    }
646192
protected function _callListener(callable $listener, Event $event)
    {
        $data = $event->getData();

        return $listener($event, ...array_values($data));
    }
107912
public function register($event, callable $listener, $priority = null)
    {
        foreach ((array) $event as $e) {
            $this->registerListener($e, $listener, $priority);
        }

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

        return $this;
    }