public function wait()
    {
        if ($this->process == null) {
            throw new \Exception('You must run `start` before running `wait`');
        }

        // blocks here until process completes
        $this->process->wait();

        if (!$this->process->isSuccessful()) {
            throw new \RuntimeException($this->process->getErrorOutput());
        }

        return $this->process->getOutput();
    }
public function wait()
    {
        if ($this->process == null) {
            throw new \Exception('You must run `start` before running `wait`');
        }

        // blocks here until process completes
        $this->process->wait();

        if (!$this->process->isSuccessful()) {
            throw new \RuntimeException($this->process->getErrorOutput());
        }

        return $this->process->getOutput();
    }
public function wait ( ) { if ( $ this -> process == null ) { throw new \ Exception ( 'You must run `start` before running `wait`' ) ; } // blocks here until process completes $ this -> process -> wait ( ) ; if ( ! $ this -> process -> isSuccessful ( ) ) { throw new \ RuntimeException ( $ this -> process -> getErrorOutput ( ) ) ; } return $ this -> process -> getOutput ( ) ; }
Blocks until call is complete.

@throws \Exception        If this function is called before start()
@throws \RuntimeException

@return string
Blocks until call is complete .