public function run($n = null, $restoreErroneousMappers = true) {
        if ($n !== null && is_numeric($n) === false) {
            throw new InvalidParamException('n must be a numeric value');
        }
        $i = 0;
        while (($n === null || $i++ < $n) && ($mapper = CommandMapper::find()->orderBy($this->getOrder())->one())) {
            $this->processMapper($mapper);
        }
        if ($this->hasErroneousMappers()) {
            if ($restoreErroneousMappers) {
                $this->restoreErroneousMappers();
            }
            return false;
        } else {
            return $i;
        }
    }
public function run($n = null, $restoreErroneousMappers = true) {
        if ($n !== null && is_numeric($n) === false) {
            throw new InvalidParamException('n must be a numeric value');
        }
        $i = 0;
        while (($n === null || $i++ < $n) && ($mapper = CommandMapper::find()->orderBy($this->getOrder())->one())) {
            $this->processMapper($mapper);
        }
        if ($this->hasErroneousMappers()) {
            if ($restoreErroneousMappers) {
                $this->restoreErroneousMappers();
            }
            return false;
        } else {
            return $i;
        }
    }
public function run ( $ n = null , $ restoreErroneousMappers = true ) { if ( $ n !== null && is_numeric ( $ n ) === false ) { throw new InvalidParamException ( 'n must be a numeric value' ) ; } $ i = 0 ; while ( ( $ n === null || $ i ++ < $ n ) && ( $ mapper = CommandMapper :: find ( ) -> orderBy ( $ this -> getOrder ( ) ) -> one ( ) ) ) { $ this -> processMapper ( $ mapper ) ; } if ( $ this -> hasErroneousMappers ( ) ) { if ( $ restoreErroneousMappers ) { $ this -> restoreErroneousMappers ( ) ; } return false ; } else { return $ i ; } }
Runs the processor for the specified number of mappers.

@param int $n Number of the mappers to be processed or null for all of them.
@param boolean $restoreErroneousMappers Indicates whether to restore the erroneous mappers if the are any one.
@return false|int Boolean false if there has been any error or the number of mappers processed.
Runs the processor for the specified number of mappers .