PHP Класс SimpleShell, simpletest

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

execute() публичный Метод

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.
Результат integer Exit code.

getOutput() публичный Метод

Accessor for the last output.
public getOutput ( ) : string
Результат string Output as text.

getOutputAsList() публичный Метод

Accessor for the last output.
public getOutputAsList ( ) : array
Результат array Output as array of lines.