code/libraries/joomlatools/library/event/subscriber/factory.php
public function subscribeEvent($event, $event_publisher)
    {
        foreach($this->getSubscribers($event) as $identifier)
        {
            if(!$this->__subscribers[(string)$identifier] instanceof KEventSubscriberInterface)
            {
                $subscriber = $this->getObject($identifier);
                $subscriber->subscribe($event_publisher);

                $this->__subscribers[(string)$identifier] = $subscriber;
            }
        }

        return $this;
    }
public function subscribeEvent($event, $event_publisher)
    {
        foreach($this->getSubscribers($event) as $identifier)
        {
            if(!$this->__subscribers[(string)$identifier] instanceof KEventSubscriberInterface)
            {
                $subscriber = $this->getObject($identifier);
                $subscriber->subscribe($event_publisher);

                $this->__subscribers[(string)$identifier] = $subscriber;
            }
        }

        return $this;
    }
public function subscribeEvent ( $ event , $ event_publisher ) { foreach ( $ this -> getSubscribers ( $ event ) as $ identifier ) { if ( ! $ this -> __subscribers [ ( string ) $ identifier ] instanceof KEventSubscriberInterface ) { $ subscriber = $ this -> getObject ( $ identifier ) ; $ subscriber -> subscribe ( $ event_publisher ) ; $ this -> __subscribers [ ( string ) $ identifier ] = $ subscriber ; } } return $ this ; }
Instantiate the subscribers for the specified event

The subscribers will be created if does not exist yet.

@param  mixed $event An object that implements ObjectInterface, ObjectIdentifier object
or valid identifier string
@param  array  $event_publisher   An optional associative array of configuration settings
@throws UnexpectedValueException    If the subscriber is not implementing the EventSubscriberInterface
@return KEventSubscriberFactory
Instantiate the subscribers for the specified event