protected function exec()
    {
        $descriptors = [
           0 => ["pipe", "r"],  // stdin is a pipe that the child will read from
           1 => ["pipe", "w"],  // stdout is a pipe that the child will write to
           2 => ["pipe", "w"] // stderr is a file to write to
        ];
        
        $process = proc_open($this->getCommand(), $descriptors, $pipes, dirname($this->getJarPath()), []);

        if (is_resource($process)) {
            fclose($pipes[0]); // close stdin pipe
            $this->output = stream_get_contents($pipes[1]);
            $this->errors = stream_get_contents($pipes[2]);
            fclose($pipes[2]);
            fclose($pipes[1]);                       
            if(proc_close($process) === -1) {
                throw new RuntimeException($this->errors);
            }
        }            
    }
protected function exec()
    {
        $descriptors = [
           0 => ["pipe", "r"],  // stdin is a pipe that the child will read from
           1 => ["pipe", "w"],  // stdout is a pipe that the child will write to
           2 => ["pipe", "w"] // stderr is a file to write to
        ];
        
        $process = proc_open($this->getCommand(), $descriptors, $pipes, dirname($this->getJarPath()), []);

        if (is_resource($process)) {
            fclose($pipes[0]); // close stdin pipe
            $this->output = stream_get_contents($pipes[1]);
            $this->errors = stream_get_contents($pipes[2]);
            fclose($pipes[2]);
            fclose($pipes[1]);                       
            if(proc_close($process) === -1) {
                throw new RuntimeException($this->errors);
            }
        }            
    }
protected function exec ( ) { $ descriptors = [ 0 => [ "pipe" , "r" ] , // stdin is a pipe that the child will read from 1 => [ "pipe" , "w" ] , // stdout is a pipe that the child will write to 2 => [ "pipe" , "w" ] // stderr is a file to write to ] ; $ process = proc_open ( $ this -> getCommand ( ) , $ descriptors , $ pipes , dirname ( $ this -> getJarPath ( ) ) , [ ] ) ; if ( is_resource ( $ process ) ) { fclose ( $ pipes [ 0 ] ) ; // close stdin pipe $ this -> output = stream_get_contents ( $ pipes [ 1 ] ) ; $ this -> errors = stream_get_contents ( $ pipes [ 2 ] ) ; fclose ( $ pipes [ 2 ] ) ; fclose ( $ pipes [ 1 ] ) ; if ( proc_close ( $ process ) === - 1 ) { throw new RuntimeException ( $ this -> errors ) ; } } }
Calls the stanford jar file
@throws RuntimeException
Calls the stanford jar file