PHP Class SimpleShell, simpletest

Afficher le fichier Open project: simpletest/simpletest Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

execute() public méthode

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.
Résultat integer Exit code.

getOutput() public méthode

Accessor for the last output.
public getOutput ( ) : string
Résultat string Output as text.

getOutputAsList() public méthode

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