PHP Class Disque\Command\BaseCommand

Inheritance: implements Disque\Command\CommandInterface, use trait Disque\Command\Argument\StringChecker
Afficher le fichier Open project: mariano/disque-php

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
toArguments ( array $options ) : array Build command arguments out of options

Method Details

getArguments() public méthode

Get processed arguments for command
public getArguments ( ) : array
Résultat array Arguments

getCommand() abstract public méthode

Get command
abstract public getCommand ( ) : string
Résultat string Command

isBlocking() public méthode

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

parse() public méthode

Parse response
public parse ( mixed $body ) : mixed
$body mixed Response body
Résultat mixed Parsed response

setArguments() public méthode

Set arguments for the command
public setArguments ( array $arguments ) : void
$arguments array Arguments
Résultat void

toArguments() protected méthode

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
Résultat array Command arguments

Property Details

$arguments protected_oe property

Arguments
protected array $arguments
Résultat array

$argumentsType protected_oe property

Tells the argument types for this command
protected int $argumentsType
Résultat 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
Résultat 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
Résultat array

$responseHandler protected_oe property

Tells which class handles the response
protected string $responseHandler
Résultat string