src/Events/EmitterFactory.php
/**
     * Loads the listener configuration for the passed configuration instance.
     *
     * @param \TechDivision\Import\Configuration\ListenerAwareConfigurationInterface $configuration The configuration with the listener definition
     * @param string                                                                 $parentName    The parent configuration name
     *
     * @return void
     */
Loads the listener configuration for the passed configuration instance.
@param \TechDivision\Import\Configuration\ListenerAwareConfigurationInterface $configuration The configuration with the listener definition
@param string                                                                 $parentName    The parent configuration name

@return void
Loads the listener configuration for the passed configuration instance . @param \ TechDivision \ Import \ Configuration \ ListenerAwareConfigurationInterface $configuration The configuration with the listener definition @param string $parentName The parent configuration name @return void
protected function loadListeners(ListenerAwareConfigurationInterface $configuration, $parentName = null)
    {
        $listenerConfigurations = $configuration->getListeners();
        foreach ($listenerConfigurations as $listeners) {
            foreach ($listeners as $key => $listenerArray) {
                $uniqueKeyForListener = $parentName == null ? $key : sprintf('%s.%s', $parentName, $key);
                if (!isset($this->listeners[$uniqueKeyForListener])) {
                    $this->listeners[$uniqueKeyForListener] = $listenerArray;
                    continue;
                }
                foreach ($listenerArray as $diValue) {
                    $this->listeners[$uniqueKeyForListener][] = $diValue;
                }
                $this->getSystemLogger()->debug(
                    sprintf("More than one registert listeners for %s", $uniqueKeyForListener),
                    $this->listeners[$uniqueKeyForListener]
                );
            }
        }
    }
protected function loadListeners ( ListenerAwareConfigurationInterface $ configuration , $ parentName = null ) { $ listenerConfigurations = $ configuration -> getListeners ( ) ; foreach ( $ listenerConfigurations as $ listeners ) { foreach ( $ listeners as $ key => $ listenerArray ) { $ uniqueKeyForListener = $ parentName == null ? $ key : sprintf ( '%s.%s' , $ parentName , $ key ) ; if ( ! isset ( $ this -> listeners [ $ uniqueKeyForListener ] ) ) { $ this -> listeners [ $ uniqueKeyForListener ] = $ listenerArray ; continue ; } foreach ( $ listenerArray as $ diValue ) { $ this -> listeners [ $ uniqueKeyForListener ] [ ] = $ diValue ; } $ this -> getSystemLogger ( ) -> debug ( sprintf ( " More than one registert listeners for %s " , $ uniqueKeyForListener ) , $ this -> listeners [ $ uniqueKeyForListener ] ) ; } } }
Loads the listener configuration for the passed configuration instance.
Loads the listener configuration for the passed configuration instance .
// load the listener configurations // prepare the listeners with the even names as key and the DI ID as value // no registert listener for the unique key? Simply add to optimise speed // Already registert listeners? Add each new single one