\Inhere\Console\IO\InputInputArgument

Class InputArgument - definition a input argument

Summary

Methods
Properties
Constants
make()
__construct()
hasMode()
getType()
setType()
getMode()
setMode()
getName()
setName()
getDefault()
setDefault()
getDescription()
setDescription()
toArray()
isArray()
isOptional()
isRequired()
getIndex()
setIndex()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$name
$description
$mode
$type
$default
$index
N/A

Properties

$name

$name : string

Type

string

$description

$description : string

Type

string

$mode

$mode : integer

Type

integer

$type

$type : string

The argument data type. (eg: 'int', 'bool', 'string', 'array', 'mixed')

Type

string

$default

$default : mixed

The default value

Type

mixed

$index

$index : integer

The argument position

Type

integer

Methods

make()

make(string  $name, integer  $mode, string  $description = '', null  $default = null) : static

Parameters

string $name
integer $mode

see Input::ARG* or Input::OPT*

string $description
null $default

Returns

static

__construct()

__construct(string  $name, integer  $mode, string  $description = '', mixed  $default = null) 

Class constructor.

Parameters

string $name
integer $mode

see Input::ARG* or Input::OPT*

string $description
mixed $default

The default value

  • for Input::ARG_OPTIONAL mode only
  • must be null for InputOption::OPT_BOOL

hasMode()

hasMode(integer  $mode) : boolean

Parameters

integer $mode

Returns

boolean

getType()

getType() : string

Returns

string

setType()

setType(string  $type) 

Parameters

string $type

getMode()

getMode() : integer

Returns

integer

setMode()

setMode(integer  $mode) 

Parameters

integer $mode

getName()

getName() : string

Returns

string

setName()

setName(string  $name) 

Parameters

string $name

getDefault()

getDefault() : mixed

Returns

mixed

setDefault()

setDefault(mixed  $default) 

Parameters

mixed $default

getDescription()

getDescription() : string

Returns

string

setDescription()

setDescription(string  $description) 

Parameters

string $description

toArray()

toArray() : array

Returns

array

isArray()

isArray() : boolean

Returns

boolean

isOptional()

isOptional() : boolean

Returns

boolean

isRequired()

isRequired() : boolean

Returns

boolean

getIndex()

getIndex() : integer

Returns

integer

setIndex()

setIndex(integer  $index) 

Parameters

integer $index