PHP Класс Disque\Command\BaseCommand

Наследование: implements Disque\Command\CommandInterface, use trait Disque\Command\Argument\StringChecker
Показать файл Открыть проект

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

Свойство Тип Описание
$arguments array Arguments
$argumentsType integer Tells the argument types for this command
$availableArguments array All available optional arguments must be defined here. If they are processed by the method toArguments(), the $this->options variable will automatically provide the default values.
$options array Provide default argument values. If the value for the argument is not provided, is null, or is false, the option will not be used.
$responseHandler string Tells which class handles the response

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

Метод Описание
getArguments ( ) : array Get processed arguments for command
getCommand ( ) : string Get command
isBlocking ( ) : boolean Tells if this command blocks while waiting for a response, to avoid being affected by connection timeouts.
parse ( mixed $body ) : mixed Parse response
setArguments ( array $arguments ) : void Set arguments for the command

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

Метод Описание
toArguments ( array $options ) : array Build command arguments out of options

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

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

Get processed arguments for command
public getArguments ( ) : array
Результат array Arguments

getCommand() абстрактный публичный Метод

Get command
abstract public getCommand ( ) : string
Результат string Command

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

Tells if this command blocks while waiting for a response, to avoid being affected by connection timeouts.
public isBlocking ( ) : boolean
Результат boolean If true, this command blocks

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

Parse response
public parse ( mixed $body ) : mixed
$body mixed Response body
Результат mixed Parsed response

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

Set arguments for the command
public setArguments ( array $arguments ) : void
$arguments array Arguments
Результат void

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

Client-supplied options are amended with the default options defined in $this->options. Options whose value is set to null or false are ignored
protected toArguments ( array $options ) : array
$options array Command options
Результат array Command arguments

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

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

Arguments
protected array $arguments
Результат array

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

Tells the argument types for this command
protected int $argumentsType
Результат integer

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

All available optional arguments must be defined here. If they are processed by the method toArguments(), the $this->options variable will automatically provide the default values.
protected array $availableArguments
Результат array

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

Provide default argument values. If the value for the argument is not provided, is null, or is false, the option will not be used.
protected array $options
Результат array

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

Tells which class handles the response
protected string $responseHandler
Результат string