PHP Class Redaxscript\Console\Parser

Since: 3.0.0
Author: Henry Ruhs
Mostrar archivo Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Property Type Description
$_argumentArray array array of parsed arguments
$_optionArray array array of parsed options
$_request object instance of the request class

Public Methods

Method Description
__construct ( Request $request ) constructor of the class
getArgument ( string $key = null ) : mixed get item from arguments
getOption ( string $key = null ) : mixed get item from options
init ( string $mode = null ) init the class
setArgument ( string $key = null, mixed $value = null ) set item to arguments
setOption ( string $key = null, mixed $value = null ) set item to options

Protected Methods

Method Description
_parseArgument ( array $argumentArray = [] ) parse raw argument
_parseOption ( string $option = null, string $next = null, integer $offset = null ) : boolean parse raw option

Method Details

__construct() public method

constructor of the class
Since: 3.0.0
public __construct ( Request $request )
$request Redaxscript\Request instance of the request class

_parseArgument() protected method

parse raw argument
Since: 3.0.0
protected _parseArgument ( array $argumentArray = [] )
$argumentArray array raw argument to be parsed

_parseOption() protected method

parse raw option
Since: 3.0.0
protected _parseOption ( string $option = null, string $next = null, integer $offset = null ) : boolean
$option string raw option to be parsed
$next string raw next to be parsed
$offset integer offset of the raw option
return boolean

getArgument() public method

get item from arguments
Since: 3.0.0
public getArgument ( string $key = null ) : mixed
$key string key of the item
return mixed

getOption() public method

get item from options
Since: 3.0.0
public getOption ( string $key = null ) : mixed
$key string key of the item
return mixed

init() public method

init the class
Since: 3.0.0
public init ( string $mode = null )
$mode string name of the mode

setArgument() public method

set item to arguments
Since: 3.0.0
public setArgument ( string $key = null, mixed $value = null )
$key string key of the item
$value mixed value of the item

setOption() public method

set item to options
Since: 3.0.0
public setOption ( string $key = null, mixed $value = null )
$key string key of the item
$value mixed value of the item

Property Details

$_argumentArray protected_oe property

array of parsed arguments
protected array $_argumentArray
return array

$_optionArray protected_oe property

array of parsed options
protected array $_optionArray
return array

$_request protected_oe property

instance of the request class
protected object $_request
return object