Class: I2CE Process: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article desrcibes the class '''I2CE_Process''' | This article desrcibes the class '''I2CE_Process'''. | ||
It is contained in the module [[iHRIS Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] | It is contained in the module [[iHRIS Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] | ||
Line 37: | Line 37: | ||
run the Process if it hasn't been run. | run the Process if it hasn't been run. | ||
*Signature: public function is_error() | *Signature: public function is_error() | ||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean] TRUE if an error occurred. | *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] TRUE if an error occurred. | ||
===slurp()=== | ===slurp()=== | ||
Slurp up the output of the process | Slurp up the output of the process | ||
Line 46: | Line 46: | ||
Provides access to what the command spewed out on STDERR | Provides access to what the command spewed out on STDERR | ||
*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 | ||
*Signature: public function stdout() | *Signature: public function stdout() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string] The output. | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] The output. | ||
[[Category:Class Documentation]] | [[Category:Class Documentation]] |
Revision as of 21:25, 16 October 2009
This article desrcibes the class I2CE_Process. It is contained in the module I2CE in the package I2CE
The class is defined in the file: lib/I2CE_Process.php
Handles processes.
Variables
$cmd
The command being executed.
- Type: private ng $cmd
$res
Currently executing resource
- Type: private ng $res
$pipes
Stdin, Stdout, etc.
- Type: private y $pipes
$exit
holds the exit code of the program
- Type: private nteger $exit
$done
Flag so that we only execute this once.
- Type: private n $done
Methods
__construct()
Constructor for the I2CE_Process @params string $cmd The full command line to execute.
- 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.
- 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
- Signature: private function slurp()
stderr()
Provides access to what the command spewed out on STDERR
- Signature: public function stderr()
- Returns: string
stdout()
Provides access to what the command spewed out on STDOUT
- Signature: public function stdout()
- Returns: string The output.