src/Events/EmitterFactory.php
/**
     * Registers the listeners defined in the system configuration.
     *
     * @param \League\Event\EmitterInterface $emitter The event emitter to prepare the listeners for
     *
     * @return \League\Event\EmitterInterface $emitter The initialized event emitter instance
     */
Registers the listeners defined in the system configuration.
@param \League\Event\EmitterInterface $emitter The event emitter to prepare the listeners for

@return \League\Event\EmitterInterface $emitter The initialized event emitter instance
Registers the listeners defined in the system configuration . @param \ League \ Event \ EmitterInterface $emitter The event emitter to prepare the listeners for @return \ League \ Event \ EmitterInterface $emitter The initialized event emitter instance
protected function registerListener(EmitterInterface $emitter)
    {
        foreach ($this->listeners as $eventName => $listeners) {
            foreach ($listeners as $id) {
                $emitter->addListener($eventName, $this->container->get($id));
            }
        }
        return $emitter;
    }
protected function registerListener ( EmitterInterface $ emitter ) { foreach ( $ this -> listeners as $ eventName => $ listeners ) { foreach ( $ listeners as $ id ) { $ emitter -> addListener ( $ eventName , $ this -> container -> get ( $ id ) ) ; } } return $ emitter ; }
Registers the listeners defined in the system configuration.
Registers the listeners defined in the system configuration .
// iterate over the found listeners and add instances to the emitter // return the emitter instance