PHP Class Predis\Command\Factory

This class provides all of the common functionalities needed for the creation of new instances of Redis commands.
Author: Daniele Alessandri ([email protected])
Inheritance: implements Predis\Command\FactoryInterface
Mostra file Open project: nrk/predis

Protected Properties

Property Type Description
$commands
$processor

Public Methods

Method Description
createCommand ( $commandID, array $arguments = [] )
defineCommand ( string $commandID, string $class ) Defines a new command in the factory.
getCommandClass ( string $commandID ) : string | null Returns the FQN of a class that represents the specified command ID.
getProcessor ( )
setProcessor ( Predis\Command\Processor\ProcessorInterface $processor = null )
supportsCommand ( $commandID )
supportsCommands ( array $commandIDs )

Method Details

createCommand() public method

public createCommand ( $commandID, array $arguments = [] )
$arguments array

defineCommand() public method

Defines a new command in the factory.
public defineCommand ( string $commandID, string $class )
$commandID string Command ID.
$class string Fully-qualified name of a Predis\Command\CommandInterface.

getCommandClass() public method

Returns the FQN of a class that represents the specified command ID.
public getCommandClass ( string $commandID ) : string | null
$commandID string Command ID.
return string | null

getProcessor() public method

public getProcessor ( )

setProcessor() public method

public setProcessor ( Predis\Command\Processor\ProcessorInterface $processor = null )
$processor Predis\Command\Processor\ProcessorInterface

supportsCommand() public method

public supportsCommand ( $commandID )

supportsCommands() public method

public supportsCommands ( array $commandIDs )
$commandIDs array

Property Details

$commands protected_oe property

protected $commands

$processor protected_oe property

protected $processor