PHP Класс Disque\Client

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$commandHandlers array Command handlers
$connectionManager Disque\Connection\ManagerInterface Connection manager

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

Метод Описание
__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

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

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

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

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

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

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

Connect to Disque
public connect ( ) : Disque\Connection\Node\Node
Результат Disque\Connection\Node\Node Connected node information

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

Get the connection manager
public getConnectionManager ( ) : Disque\Connection\ManagerInterface
Результат Disque\Connection\ManagerInterface Connection manager

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

Tells if connection is established
public isConnected ( ) : boolean
Результат boolean Success

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

Get a queue
public queue ( string $name ) : Queue
$name string Queue name
Результат Disque\Queue\Queue Queue

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

Register a command handler
public registerCommand ( Disque\Command\CommandInterface $commandHandler ) : void
$commandHandler Disque\Command\CommandInterface Command
Результат void

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

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

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

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

Command handlers
protected array $commandHandlers
Результат array

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

Connection manager
protected ManagerInterface,Disque\Connection $connectionManager
Результат Disque\Connection\ManagerInterface