public function executeStep($step, $limit = null)
    {
        $this->executeCommand('setStep', array('step' => $step));

        $limit = $limit ?: $this->limit;
        $check = 'false';
        while ('true' !== $check) {
            usleep(100000);
            if (--$limit <= 0) {
                throw new Exception\ConnectionException(
                    'Command execution time limit reached: `' . $step . '`'
                );
            }

            $check = $this->executeCommand('doneStep');
            if (0 === mb_strpos($check, 'error:')) {
                throw new Exception\ConnectionException($check);
            }
        }
    }
public function executeStep($step, $limit = null)
    {
        $this->executeCommand('setStep', array('step' => $step));

        $limit = $limit ?: $this->limit;
        $check = 'false';
        while ('true' !== $check) {
            usleep(100000);
            if (--$limit <= 0) {
                throw new Exception\ConnectionException(
                    'Command execution time limit reached: `' . $step . '`'
                );
            }

            $check = $this->executeCommand('doneStep');
            if (0 === mb_strpos($check, 'error:')) {
                throw new Exception\ConnectionException($check);
            }
        }
    }
public function executeStep ( $ step , $ limit = null ) { $ this -> executeCommand ( 'setStep' , array ( 'step' => $ step ) ) ; $ limit = $ limit ? : $ this -> limit ; $ check = 'false' ; while ( 'true' !== $ check ) { usleep ( 100000 ) ; if ( -- $ limit <= 0 ) { throw new Exception \ ConnectionException ( 'Command execution time limit reached: `' . $ step . '`' ) ; } $ check = $ this -> executeCommand ( 'doneStep' ) ; if ( 0 === mb_strpos ( $ check , 'error:' ) ) { throw new Exception \ ConnectionException ( $ check ) ; } } }
Execute Sahi step.

@param string  $step  step command
@param integer $limit time limit (value of 10 === 1 second)

@throws Exception\ConnectionException if step execution has errors
Execute Sahi step .