Nitmedia\Wkhtml2pdf\Wkhtml2pdf::_exec PHP Метод

_exec() защищенный Метод

Executes the command : Deprecated - use _pipeExec
protected _exec ( string $cmd, string $input = "" ) : array
$cmd string command to execute
$input string other input (not arguments)
Результат array
    protected function _exec($cmd, $input = "")
    {
        $result = array('stdout' => '', 'stderr' => '', 'return' => '');
        $proc = proc_open($cmd, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), $pipes);
        fwrite($pipes[0], $input);
        fclose($pipes[0]);
        $result['stdout'] = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        $result['stderr'] = stream_get_contents($pipes[2]);
        fclose($pipes[2]);
        $result['return'] = proc_close($proc);
        return $result;
    }