protected function prepareObservers(SubjectInterface $subject, array $observers, $type = null)
    {

        // iterate over the array with observers and prepare them
        foreach ($observers as $key => $observer) {
            // we have to initialize the type only on the first level
            if ($type == null) {
                $type = $key;
            }

            // query whether or not we've an subarry or not
            if (is_array($observer)) {
                $this->prepareObservers($subject, $observer, $type);
            } else {
                $subject->registerObserver($this->container->get($observer), $type);
            }
        }
    }
protected function prepareObservers(SubjectInterface $subject, array $observers, $type = null)
    {

        // iterate over the array with observers and prepare them
        foreach ($observers as $key => $observer) {
            // we have to initialize the type only on the first level
            if ($type == null) {
                $type = $key;
            }

            // query whether or not we've an subarry or not
            if (is_array($observer)) {
                $this->prepareObservers($subject, $observer, $type);
            } else {
                $subject->registerObserver($this->container->get($observer), $type);
            }
        }
    }
protected function prepareObservers ( SubjectInterface $ subject , array $ observers , $ type = null ) { // iterate over the array with observers and prepare them foreach ( $ observers as $ key => $ observer ) { // we have to initialize the type only on the first level if ( $ type == null ) { $ type = $ key ; } // query whether or not we've an subarry or not if ( is_array ( $ observer ) ) { $ this -> prepareObservers ( $ subject , $ observer , $ type ) ; } else { $ subject -> registerObserver ( $ this -> container -> get ( $ observer ) , $ type ) ; } } }
Prepare the observers defined in the system configuration.

@param \TechDivision\Import\Subjects\SubjectInterface $subject   The subject to prepare the observers for
@param array                                          $observers The array with the observers
@param string                                         $type      The actual observer type

@return void
Prepare the observers defined in the system configuration .