\Inhere\Console\ConcernInputOutputAwareTrait

Class InputOutputAwareTrait

Summary

Methods
Properties
Constants
getScript()
getScriptName()
getCommandName()
getArg()
getFirstArg()
getRequiredArg()
getSameArg()
getOpt()
getSameOpt()
getRequiredOpt()
read()
write()
writeln()
getInput()
setInput()
getOutput()
setOutput()
getVerbLevel()
isDebug()
No public properties found
No constants found
No protected methods found
$input
$output
N/A
No private methods found
No private properties found
N/A

Properties

$input

$input : \Inhere\Console\IO\Input|\Inhere\Console\Contract\InputInterface

Type

\Inhere\Console\IO\Input|\Inhere\Console\Contract\InputInterface

Methods

getScript()

getScript() : string

Returns

string

getScriptName()

getScriptName() : string

Returns

string

getCommandName()

getCommandName() : string

Returns

string

getArg()

getArg(integer|string  $name, mixed  $default = null) : mixed|null

Parameters

integer|string $name
mixed $default

Returns

mixed|null

getFirstArg()

getFirstArg(string  $default = '') : string

Parameters

string $default

Returns

string

getRequiredArg()

getRequiredArg(integer|string  $name) : mixed

Parameters

integer|string $name

Returns

mixed

getSameArg()

getSameArg(array  $names, mixed  $default = null) : boolean|mixed|null

Parameters

array $names
mixed $default

Returns

boolean|mixed|null

getOpt()

getOpt(integer|string  $name, mixed  $default = null) : mixed

Parameters

integer|string $name
mixed $default

Returns

mixed

getSameOpt()

getSameOpt(array  $names, mixed  $default = null) : mixed

Parameters

array $names
mixed $default

Returns

mixed

getRequiredOpt()

getRequiredOpt(string  $name, string  $errMsg = '') : mixed

Parameters

string $name
string $errMsg

Returns

mixed

read()

read(string  $question = '', boolean  $nl = false) : string

Parameters

string $question
boolean $nl

Returns

string

write()

write(mixed  $message, boolean  $nl = true, boolean|integer  $quit = false) : integer

Parameters

mixed $message
boolean $nl
boolean|integer $quit

Returns

integer

writeln()

writeln(mixed  $message, boolean|integer  $quit = false) : integer

Parameters

mixed $message
boolean|integer $quit

Returns

integer

getInput()

getInput() : \Inhere\Console\IO\Input|\Inhere\Console\Contract\InputInterface

Returns

\Inhere\Console\IO\Input|\Inhere\Console\Contract\InputInterface

setInput()

setInput(\Inhere\Console\Contract\InputInterface  $input) 

Parameters

\Inhere\Console\Contract\InputInterface $input

getVerbLevel()

getVerbLevel() : integer

get debug level value

Returns

integer

isDebug()

isDebug(integer  $level = \Inhere\Console\Console::VERB_DEBUG) : boolean

check is given verbose level

Parameters

integer $level

Returns

boolean