protected function runProcess($callback = null)
    {
        $process = $this->processBuilder
            ->setArguments(
                $this->prepareArguments()
            )
            ->getProcess();

        // exit code
        $result = $process->run($callback);

        // text-mode
        if (null === $callback) {
            $result = $process->getOutput();

            if (false === $process->isSuccessful()) {
                $process->getErrorOutput();
            }
        }

        return $result;
    }
protected function runProcess($callback = null)
    {
        $process = $this->processBuilder
            ->setArguments(
                $this->prepareArguments()
            )
            ->getProcess();

        // exit code
        $result = $process->run($callback);

        // text-mode
        if (null === $callback) {
            $result = $process->getOutput();

            if (false === $process->isSuccessful()) {
                $process->getErrorOutput();
            }
        }

        return $result;
    }
protected function runProcess ( $ callback = null ) { $ process = $ this -> processBuilder -> setArguments ( $ this -> prepareArguments ( ) ) -> getProcess ( ) ; // exit code $ result = $ process -> run ( $ callback ) ; // text-mode if ( null === $ callback ) { $ result = $ process -> getOutput ( ) ; if ( false === $ process -> isSuccessful ( ) ) { $ process -> getErrorOutput ( ) ; } } return $ result ; }
Creates process with processBuilder builder and executes it.

@param callable|null $callback
@return int|string
Creates process with processBuilder builder and executes it .