Class: I2CE Process: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 6: Line 6:
===$cmd===
===$cmd===
The command being executed.
The command being executed.
*Type: private ng $cmd
*Type: private [http://www.php.net/manual/en/language.types.string.php string ] $cmd


===$res===
===$res===
Currently executing resource
Currently executing resource
*Type: private ng $res
*Type: private [http://www.php.net/manual/en/language.types.string.php string ] $res


===$pipes===
===$pipes===
Stdin, Stdout, etc.
Stdin, Stdout, etc.
*Type: private y $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
*Type: private nteger $exit
*Type: private integer $exit


===$done===
===$done===
Flag so that we only execute this once.
Flag so that we only execute this once.
*Type: private n $done
*Type: private [http://www.php.net/manual/en/language.types.boolean.php boolean ] $done


==Methods==
==Methods==

Revision as of 23:43, 16 October 2009

This article desrcibes 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

  • Type: private integer $exit

$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.

  • 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.