7
function __construct($command)
9
$this->command = $command;
12
function Run($args = array())
14
$spec = array(1 => array("pipe", "w"));
16
$command = $this->command;
18
foreach ($args as $arg) {
19
$command .= " " . escapeshellcmd($arg);
22
$process = proc_open($command, $spec, $pipes);
24
echo stream_get_contents($pipes[1]);
27
return proc_close($process);
31
class AUXApplicationParameters
36
function __construct($command)
38
$this->command = $command;
39
$this->parameters = array();
42
function Run($args = array())
45
0 => array("pipe", "r"),
46
1 => array("pipe", "w")
49
$command = $this->command;
51
foreach ($args as $arg) {
52
$command .= " " . escapeshellcmd($arg);
55
$process = proc_open($command, $spec, $pipes);
57
foreach ($this->parameters as $name => $value) {
58
fwrite($pipes[0], "$name::$value\n");
62
echo stream_get_contents($pipes[1]);
65
return proc_close($process);
68
function AddParameter($name, $value)
70
$this->parameters[$name] = $value;
73
function ClearParameters()
75
$this->parameters = array();
b'\\ No newline at end of file'