PHP Class Disque\Client

Afficher le fichier Open project: mariano/disque-php Class Usage Examples

Protected Properties

Свойство Type Description
$commandHandlers array Command handlers
$connectionManager Disque\Connection\ManagerInterface Connection manager

Méthodes publiques

Méthode Description
__call ( $command, array $arguments )
__construct ( array $servers = [] ) Create a new Client
connect ( ) : Disque\Connection\Node\Node Connect to Disque
getConnectionManager ( ) : Disque\Connection\ManagerInterface Get the connection manager
isConnected ( ) : boolean Tells if connection is established
queue ( string $name ) : Queue Get a queue
registerCommand ( Disque\Command\CommandInterface $commandHandler ) : void Register a command handler
setConnectionManager ( Disque\Connection\ManagerInterface $manager ) Set a connection manager

Method Details

__call() public méthode

public __call ( $command, array $arguments )
$arguments array

__construct() public méthode

Create a new Client
public __construct ( array $servers = [] )
$servers array

connect() public méthode

Connect to Disque
public connect ( ) : Disque\Connection\Node\Node
Résultat Disque\Connection\Node\Node Connected node information

getConnectionManager() public méthode

Get the connection manager
public getConnectionManager ( ) : Disque\Connection\ManagerInterface
Résultat Disque\Connection\ManagerInterface Connection manager

isConnected() public méthode

Tells if connection is established
public isConnected ( ) : boolean
Résultat boolean Success

queue() public méthode

Get a queue
public queue ( string $name ) : Queue
$name string Queue name
Résultat Disque\Queue\Queue Queue

registerCommand() public méthode

Register a command handler
public registerCommand ( Disque\Command\CommandInterface $commandHandler ) : void
$commandHandler Disque\Command\CommandInterface Command
Résultat void

setConnectionManager() public méthode

Set a connection manager
public setConnectionManager ( Disque\Connection\ManagerInterface $manager )
$manager Disque\Connection\ManagerInterface

Property Details

$commandHandlers protected_oe property

Command handlers
protected array $commandHandlers
Résultat array

$connectionManager protected_oe property

Connection manager
protected ManagerInterface,Disque\Connection $connectionManager
Résultat Disque\Connection\ManagerInterface