PHP Class Disque\Command\BaseCommand

Inheritance: implements Disque\Command\CommandInterface, use trait Disque\Command\Argument\StringChecker
显示文件 Open project: mariano/disque-php

Protected Properties

Property Type Description
$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

Public Methods

Method Description
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

Protected Methods

Method Description
toArguments ( array $options ) : array Build command arguments out of options

Method Details

getArguments() public method

Get processed arguments for command
public getArguments ( ) : array
return array Arguments

getCommand() abstract public method

Get command
abstract public getCommand ( ) : string
return string Command

isBlocking() public method

Tells if this command blocks while waiting for a response, to avoid being affected by connection timeouts.
public isBlocking ( ) : boolean
return boolean If true, this command blocks

parse() public method

Parse response
public parse ( mixed $body ) : mixed
$body mixed Response body
return mixed Parsed response

setArguments() public method

Set arguments for the command
public setArguments ( array $arguments ) : void
$arguments array Arguments
return void

toArguments() protected method

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
return array Command arguments

Property Details

$arguments protected_oe property

Arguments
protected array $arguments
return array

$argumentsType protected_oe property

Tells the argument types for this command
protected int $argumentsType
return integer

$availableArguments protected_oe property

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
return array

$options protected_oe property

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
return array

$responseHandler protected_oe property

Tells which class handles the response
protected string $responseHandler
return string