interface IOInterface (View source)

Class IOInterface

Methods

out(string $text = '')

Write a string to standard output

string
in()

Get a value from standard input.

err(string $text = '')

Write a string to standard error output.

mixed
getOption(string $name, mixed $default = null)

Gets a value from the input data.

void
setOption(string $name, mixed $value)

Sets a value

string[]
getOptions()

getOptions

mixed
getArgument(integer $offset, mixed $default = null)

getArgument

setArgument(integer $offset, mixed $value)

setArgument

string[]
getArguments()

getArguments

mixed
getCalledScript()

getExecuted

Details

at line line 25
IOInterface out(string $text = '')

Write a string to standard output

Parameters

string $text The text to display.

Return Value

IOInterface Instance of $this to allow chaining.

at line line 32
string in()

Get a value from standard input.

Return Value

string The input string from standard input.

at line line 41
IOInterface err(string $text = '')

Write a string to standard error output.

Parameters

string $text The text to display.

Return Value

IOInterface

at line line 53
mixed getOption(string $name, mixed $default = null)

Gets a value from the input data.

Parameters

string $name Name of the value to get.
mixed $default Default value to return if variable does not exist.

Return Value

mixed The filtered input value.

at line line 65
void setOption(string $name, mixed $value)

Sets a value

Parameters

string $name Name of the value to set.
mixed $value Value to assign to the input.

Return Value

void

at line line 72
string[] getOptions()

getOptions

Return Value

string[]

at line line 82
mixed getArgument(integer $offset, mixed $default = null)

getArgument

Parameters

integer $offset
mixed $default

Return Value

mixed

at line line 92
IOInterface setArgument(integer $offset, mixed $value)

setArgument

Parameters

integer $offset
mixed $value

Return Value

IOInterface

at line line 99
string[] getArguments()

getArguments

Return Value

string[]

at line line 106
mixed getCalledScript()

getExecuted

Return Value

mixed