PHP Класс Clinner\Command\NullCommand

This class represents a null command (Null Object pattern implementation).
Автор: José Nahuel Cuesta Luengo ([email protected])
Наследование: implements Clinner\Command\CommandInterface, implements Clinner\Command\PipingCommandInterface, implements PipeableCommandInterface
Показать файл Открыть проект

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

Метод Описание
getErrorOutput ( ) : string Get the output for this command's execution.
getExitCode ( ) : integer Get the exit code for this command's execution.
getOutput ( ) : string Get the output for this command's execution.
getPipedCommand ( ) : Clinner\Command\PipeableCommandInterface Get the command piped to this one, if any.
hasPipedCommand ( ) : boolean Answer whether this command has a command piped to it.
pipe ( PipeableCommandInterface $anotherCommand, boolean $appendToPipe = true ) : Clinner\Command\PipingCommandInterface Pipe $anotherCommand to this one, so that this command's output is directly sent to $anotherCommand's standard input.
run ( string $input = null ) : Clinner\Command\CommandInterface Run this command and get the exit code for it.
toCommandString ( ) : string Get a string representing this command.

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

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

This method will only return a valid value after the command has been executed.
public getErrorOutput ( ) : string
Результат string

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

This method will only return a valid value after the command has been executed.
public getExitCode ( ) : integer
Результат integer

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

This method will only return a valid value after the command has been executed.
public getOutput ( ) : string
Результат string

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

Get the command piped to this one, if any.
public getPipedCommand ( ) : Clinner\Command\PipeableCommandInterface
Результат Clinner\Command\PipeableCommandInterface

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

Answer whether this command has a command piped to it.
public hasPipedCommand ( ) : boolean
Результат boolean

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

Pipe $anotherCommand to this one, so that this command's output is directly sent to $anotherCommand's standard input.
public pipe ( PipeableCommandInterface $anotherCommand, boolean $appendToPipe = true ) : Clinner\Command\PipingCommandInterface
$anotherCommand PipeableCommandInterface The command to pipe.
$appendToPipe boolean Whether $anotherCommand will be appended to the currently piped commands (TRUE) or if it will be added after this command, rearranging the commands pipe to include it.
Результат Clinner\Command\PipingCommandInterface This instance, for a fluent API.

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

Run this command and get the exit code for it.
public run ( string $input = null ) : Clinner\Command\CommandInterface
$input string (Optional) input string for this command.
Результат Clinner\Command\CommandInterface This command, for a fluent API.

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

Get a string representing this command.
public toCommandString ( ) : string
Результат string