protected function execute(array $arguments)
    {
        \array_unshift($arguments, $this->path);
        
        $builder = ProcessBuilder::create($arguments);
        $process = $builder->getProcess();
        $process->run();
        
        if (!$process->isSuccessful()) {
            throw CommandException::factory($process);
        }
        
        // E.g. tesseract --version returns output as error output
        return $process->getOutput() ? $process->getOutput() : $process->getErrorOutput();
    }
protected function execute(array $arguments)
    {
        \array_unshift($arguments, $this->path);
        
        $builder = ProcessBuilder::create($arguments);
        $process = $builder->getProcess();
        $process->run();
        
        if (!$process->isSuccessful()) {
            throw CommandException::factory($process);
        }
        
        // E.g. tesseract --version returns output as error output
        return $process->getOutput() ? $process->getOutput() : $process->getErrorOutput();
    }
protected function execute ( array $ arguments ) { \ array_unshift ( $ arguments , $ this -> path ) ; $ builder = ProcessBuilder :: create ( $ arguments ) ; $ process = $ builder -> getProcess ( ) ; $ process -> run ( ) ; if ( ! $ process -> isSuccessful ( ) ) { throw CommandException :: factory ( $ process ) ; } // E.g. tesseract --version returns output as error output return $ process -> getOutput ( ) ? $ process -> getOutput ( ) : $ process -> getErrorOutput ( ) ; }
Execute command and return output

@param string $parameters
@return array

@throws \RuntimeException
Execute command and return output