src/Knp/Snappy/AbstractGenerator.php
protected function executeCommand($command)
    {
        if (method_exists(Process::class, 'fromShellCommandline')) {
            $process = Process::fromShellCommandline($command, null, $this->env);
        } else {
            $process = new Process($command, null, $this->env);
        }

        if (false !== $this->timeout) {
            $process->setTimeout($this->timeout);
        }

        $process->run();

        return [
            $process->getExitCode(),
            $process->getOutput(),
            $process->getErrorOutput(),
        ];
    }
protected function executeCommand($command)
    {
        if (method_exists(Process::class, 'fromShellCommandline')) {
            $process = Process::fromShellCommandline($command, null, $this->env);
        } else {
            $process = new Process($command, null, $this->env);
        }

        if (false !== $this->timeout) {
            $process->setTimeout($this->timeout);
        }

        $process->run();

        return [
            $process->getExitCode(),
            $process->getOutput(),
            $process->getErrorOutput(),
        ];
    }
protected function executeCommand ( $ command ) { if ( method_exists ( Process :: class , 'fromShellCommandline' ) ) { $ process = Process :: fromShellCommandline ( $ command , null , $ this -> env ) ; } else { $ process = new Process ( $ command , null , $ this -> env ) ; } if ( false !== $ this -> timeout ) { $ process -> setTimeout ( $ this -> timeout ) ; } $ process -> run ( ) ; return [ $ process -> getExitCode ( ) , $ process -> getOutput ( ) , $ process -> getErrorOutput ( ) , ] ; }
Executes the given command via shell and returns the complete output as
a string.

@param string $command

@return array(status, stdout, stderr)
Executes the given command via shell and returns the complete output as a string .