Class: I2CE Process: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 1: Line 1:
This article describes the class ''I2CE_Process''.
This article describes the class ''I2CE_Process''.
*Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.1-release/annotate/head:/lib/I2CE_Process.php lib/I2CE_Process.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/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.0.2-release/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.0.2-release/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.0.2-release/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.0.2-release/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.0.2-release/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 27: Line 32:
===__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.0.2-release/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 32: Line 38:
===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.0.2-release/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.0.2-release/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.0.2-release/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.0.2-release/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.

Revision as of 08:52, 10 November 2009

This article describes the class I2CE_Process.

Handles processes.

Variables

$cmd

The command being executed.

$res

Currently executing resource

$pipes

Stdin, Stdout, etc.

$exit

holds the exit code of the program

$done

Flag so that we only execute this once.

Methods

__construct()

Constructor for the I2CE_Process @params string $cmd The full command line to execute.

is_error()

Returns a boolean indicating if an error code occurred. Will run the Process if it hasn't been run.

slurp()

Slurp up the output of the process @params string $cmd The full command line to execute. @todo implement stdin

stderr()

Provides access to what the command spewed out on STDERR

stdout()

Provides access to what the command spewed out on STDOUT