src/Observers/GenericCompositeObserver.php
/**
     * Will be invoked by the action on the events the listener has been registered for.
     *
     * @param \TechDivision\Import\Subjects\SubjectInterface $subject The subject instance
     *
     * @return array The modified row
     */
Will be invoked by the action on the events the listener has been registered for.

@return array The modified row
Will be invoked by the action on the events the listener has been registered for . @return array The modified row
public function handle(SubjectInterface $subject)
    {
        $this->setSubject($subject);
        $observers = $this->getObservers();
        foreach ($observers as $observer) {
            if ($subject->rowHasToBeSkipped()) {
                $subject->getSystemLogger()->debug(
                    $subject->appendExceptionSuffix(
                        sprintf(
                            'Skip processing operation "%s" after observer "%s"',
                            $subject->getFullOperationName(),
                            $subject->getConfiguration()->getId()
                        )
                    )
                );
                break;
            }
            $subject->setRow($observer->handle($subject));
        }
        return $subject->getRow();
    }
public function handle ( SubjectInterface $ subject ) { $ this -> setSubject ( $ subject ) ; $ observers = $ this -> getObservers ( ) ; foreach ( $ observers as $ observer ) { if ( $ subject -> rowHasToBeSkipped ( ) ) { $ subject -> getSystemLogger ( ) -> debug ( $ subject -> appendExceptionSuffix ( sprintf ( 'Skip processing operation "%s" after observer "%s"' , $ subject -> getFullOperationName ( ) , $ subject -> getConfiguration ( ) -> getId ( ) ) ) ) ; break ; } $ subject -> setRow ( $ observer -> handle ( $ subject ) ) ; } return $ subject -> getRow ( ) ; }
Will be invoked by the action on the events the listener has been registered for.
Will be invoked by the action on the events the listener has been registered for .
// initialize the subject // load the observers // process the observers // query whether or not we have to skip the row // log a debug message with the actual line nr/file information // skip the row // if not, set the subject and process the observer // returns the subject's row