PHP Класс Redaxscript\Console\Parser

С версии: 3.0.0
Автор: Henry Ruhs
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_argumentArray array array of parsed arguments
$_optionArray array array of parsed options
$_request object instance of the request class

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

Метод Описание
__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

Защищенные методы

Метод Описание
_parseArgument ( array $argumentArray = [] ) parse raw argument
_parseOption ( string $option = null, string $next = null, integer $offset = null ) : boolean parse raw option

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

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

constructor of the class
С версии: 3.0.0
public __construct ( Request $request )
$request Redaxscript\Request instance of the request class

_parseArgument() защищенный Метод

parse raw argument
С версии: 3.0.0
protected _parseArgument ( array $argumentArray = [] )
$argumentArray array raw argument to be parsed

_parseOption() защищенный Метод

parse raw option
С версии: 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
Результат boolean

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

get item from arguments
С версии: 3.0.0
public getArgument ( string $key = null ) : mixed
$key string key of the item
Результат mixed

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

get item from options
С версии: 3.0.0
public getOption ( string $key = null ) : mixed
$key string key of the item
Результат mixed

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

init the class
С версии: 3.0.0
public init ( string $mode = null )
$mode string name of the mode

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

set item to arguments
С версии: 3.0.0
public setArgument ( string $key = null, mixed $value = null )
$key string key of the item
$value mixed value of the item

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

set item to options
С версии: 3.0.0
public setOption ( string $key = null, mixed $value = null )
$key string key of the item
$value mixed value of the item

Описание свойств

$_argumentArray защищенное свойство

array of parsed arguments
protected array $_argumentArray
Результат array

$_optionArray защищенное свойство

array of parsed options
protected array $_optionArray
Результат array

$_request защищенное свойство

instance of the request class
protected object $_request
Результат object