PHP Class SimpleShell, simpletest

Show file Open project: simpletest/simpletest Class Usage Examples

Public Methods

Method Description
__construct ( ) Executes the shell comand and stashes the output.
execute ( string $command ) : integer Actually runs the command.
getOutput ( ) : string Accessor for the last output.
getOutputAsList ( ) : array Accessor for the last output.

Method Details

__construct() public method

Executes the shell comand and stashes the output.
public __construct ( )

execute() public method

Does not trap the error stream output as this need PHP 4.3+.
public execute ( string $command ) : integer
$command string The actual command line to run.
return integer Exit code.

getOutput() public method

Accessor for the last output.
public getOutput ( ) : string
return string Output as text.

getOutputAsList() public method

Accessor for the last output.
public getOutputAsList ( ) : array
return array Output as array of lines.