Class: I2CE Process (Development): Difference between revisions
From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_Process}} This article describes the class ''I2CE_Process'' . *Location: Part of the module I2CE in the packag…') |
No edit summary |
||
Line 1: | Line 1: | ||
{{otherversions|Class: I2CE_Process}} | {{otherversions|Class: I2CE_Process}} | ||
This article describes the class ''I2CE_Process'' . | This article describes the class ''I2CE_Process'' . | ||
*Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L29 lib/I2CE_Process.php] on line 29 | ||
Handles processes. | Handles processes. | ||
==Variables== | ==Variables== | ||
===$cmd=== | ===$cmd=== | ||
The command being executed. | The command being executed. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L35 i2ce/lib/I2CE_Process.php] on line 35 | ||
*Type: private [http://www.php.net/manual/en/language.types.string.php string ] $cmd | *Type: private [http://www.php.net/manual/en/language.types.string.php string ] $cmd | ||
===$res=== | ===$res=== | ||
Currently executing resource | Currently executing resource | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L40 i2ce/lib/I2CE_Process.php] on line 40 | ||
*Type: private [http://www.php.net/manual/en/language.types.string.php string ] $res | *Type: private [http://www.php.net/manual/en/language.types.string.php string ] $res | ||
===$pipes=== | ===$pipes=== | ||
Stdin, Stdout, etc. | Stdin, Stdout, etc. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L45 i2ce/lib/I2CE_Process.php] on line 45 | ||
*Type: private [http://www.php.net/manual/en/language.types.array.php array ] $pipes | *Type: private [http://www.php.net/manual/en/language.types.array.php array ] $pipes | ||
===$exit=== | ===$exit=== | ||
holds the exit code of the program | holds the exit code of the program | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L50 i2ce/lib/I2CE_Process.php] on line 50 | ||
*Type: private integer $exit | *Type: private integer $exit | ||
===$done=== | ===$done=== | ||
Flag so that we only execute this once. | Flag so that we only execute this once. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L55 i2ce/lib/I2CE_Process.php] on line 55 | ||
*Type: private [http://www.php.net/manual/en/language.types.boolean.php boolean ] $done | *Type: private [http://www.php.net/manual/en/language.types.boolean.php boolean ] $done | ||
Line 33: | Line 33: | ||
===__construct()=== | ===__construct()=== | ||
Constructor for the I2CE_Process @params string $cmd The full command line to execute. | Constructor for the I2CE_Process @params string $cmd The full command line to execute. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L62 i2ce/lib/I2CE_Process.php] on line 62 | ||
*Signature: public function __construct($cmd) | *Signature: public function __construct($cmd) | ||
*Parameters: | *Parameters: | ||
Line 39: | Line 39: | ||
===is_error()=== | ===is_error()=== | ||
Returns a boolean indicating if an error code occurred. Will run the Process if it hasn't been run. | Returns a boolean indicating if an error code occurred. Will run the Process if it hasn't been run. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L103 i2ce/lib/I2CE_Process.php] on line 103 | ||
*Signature: public function is_error() | *Signature: public function is_error() | ||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>TRUE if an error occurred. | *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>TRUE if an error occurred. | ||
===slurp()=== | ===slurp()=== | ||
Slurp up the output of the process @params string $cmd The full command line to execute. @todo implement stdin | Slurp up the output of the process @params string $cmd The full command line to execute. @todo implement stdin | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L81 i2ce/lib/I2CE_Process.php] on line 81 | ||
*Signature: private function slurp() | *Signature: private function slurp() | ||
===stderr()=== | ===stderr()=== | ||
Provides access to what the command spewed out on STDERR | Provides access to what the command spewed out on STDERR | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L127 i2ce/lib/I2CE_Process.php] on line 127 | ||
*Signature: public function stderr() | *Signature: public function stderr() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===stdout()=== | ===stdout()=== | ||
Provides access to what the command spewed out on STDOUT | Provides access to what the command spewed out on STDOUT | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/lib/I2CE_Process.php#L117 i2ce/lib/I2CE_Process.php] on line 117 | ||
*Signature: public function stdout() | *Signature: public function stdout() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The output. | *Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The output. |
Latest revision as of 08:18, 6 May 2015
For other versions, see Class: I2CE_Process (versions) .
This article describes the class I2CE_Process .
- Location: Part of the module I2CE in the package I2CE 4.1-dev
- Source: Defined in the file lib/I2CE_Process.php on line 29
Handles processes.
Variables
$cmd
The command being executed.
- Defined in i2ce/lib/I2CE_Process.php on line 35
- Type: private string $cmd
$res
Currently executing resource
- Defined in i2ce/lib/I2CE_Process.php on line 40
- Type: private string $res
$pipes
Stdin, Stdout, etc.
- Defined in i2ce/lib/I2CE_Process.php on line 45
- Type: private array $pipes
$exit
holds the exit code of the program
- Defined in i2ce/lib/I2CE_Process.php on line 50
- Type: private integer $exit
$done
Flag so that we only execute this once.
- Defined in i2ce/lib/I2CE_Process.php on line 55
- Type: private boolean $done
Methods
__construct()
Constructor for the I2CE_Process @params string $cmd The full command line to execute.
- Defined in i2ce/lib/I2CE_Process.php on line 62
- Signature: public function __construct($cmd)
- Parameters:
- $cmd
is_error()
Returns a boolean indicating if an error code occurred. Will run the Process if it hasn't been run.
- Defined in i2ce/lib/I2CE_Process.php on line 103
- Signature: public function is_error()
- Returns: boolean
TRUE if an error occurred.
slurp()
Slurp up the output of the process @params string $cmd The full command line to execute. @todo implement stdin
- Defined in i2ce/lib/I2CE_Process.php on line 81
- Signature: private function slurp()
stderr()
Provides access to what the command spewed out on STDERR
- Defined in i2ce/lib/I2CE_Process.php on line 127
- Signature: public function stderr()
- Returns: string
stdout()
Provides access to what the command spewed out on STDOUT
- Defined in i2ce/lib/I2CE_Process.php on line 117
- Signature: public function stdout()
- Returns: string
The output.