public function getProcess()
    {
        $this->processBuilder->setArguments(array());

        foreach ($this->options as $option => $value) {
            if (!$value) {
                continue;
            }

            if (!in_array($option, static::$nonPrefixedOptions)) {
                $option = sprintf('--%s', $option);
            }

            $this->processBuilder->add($option);

            if (true !== $value) {
                $this->processBuilder->add($value);
            }
        }

        $this->processBuilder->add('-')->add($this->getOutput());

        $process = $this->processBuilder->getProcess();
        $process->setCommandLine(sprintf('echo "%s" | %s', addslashes($this->getInput()), $process->getCommandLine()));

        return $process;
    }
public function getProcess()
    {
        $this->processBuilder->setArguments(array());

        foreach ($this->options as $option => $value) {
            if (!$value) {
                continue;
            }

            if (!in_array($option, static::$nonPrefixedOptions)) {
                $option = sprintf('--%s', $option);
            }

            $this->processBuilder->add($option);

            if (true !== $value) {
                $this->processBuilder->add($value);
            }
        }

        $this->processBuilder->add('-')->add($this->getOutput());

        $process = $this->processBuilder->getProcess();
        $process->setCommandLine(sprintf('echo "%s" | %s', addslashes($this->getInput()), $process->getCommandLine()));

        return $process;
    }
public function getProcess ( ) { $ this -> processBuilder -> setArguments ( array ( ) ) ; foreach ( $ this -> options as $ option => $ value ) { if ( ! $ value ) { continue ; } if ( ! in_array ( $ option , static :: $ nonPrefixedOptions ) ) { $ option = sprintf ( '--%s' , $ option ) ; } $ this -> processBuilder -> add ( $ option ) ; if ( true !== $ value ) { $ this -> processBuilder -> add ( $ value ) ; } } $ this -> processBuilder -> add ( '-' ) -> add ( $ this -> getOutput ( ) ) ; $ process = $ this -> processBuilder -> getProcess ( ) ; $ process -> setCommandLine ( sprintf ( 'echo "%s" | %s' , addslashes ( $ this -> getInput ( ) ) , $ process -> getCommandLine ( ) ) ) ; return $ process ; }
Builds command line arguments based on the current configuration

Command line format for wkhtmltopdf:
wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>

@return Process
Builds command line arguments based on the current configuration