PHP Класс PHPDaemon\Clients\GearmanClient\Connection

Наследование: extends PHPDaemon\Network\ClientConnection
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$response mixed
$responseCommand string
$responseType string

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

Свойство Тип Описание
$requestCommandList array Request codes
$requestCommandListFlipped
$responseCommandList array Response codes
$responseCommandListFlipped

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

Метод Описание
getStatus ( mixed $jobHandle, callable $cb = null ) Get job status
onRead ( ) : void Called when new data received
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
sendCommand ( $commandName, $payload, callable $cb = null ) Send a command
sendEcho ( $payload, callable | null $cb = null ) Function send ECHO
setConnectionOption ( integer $optionName, callable $cb = null ) Function set settings for current connection Available settings 'exceptions' - Forward WORK_EXCEPTION packets to the client.
submitJob ( $params, callable $cb = null ) Function run task and wait result in callback

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

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

Get job status
public getStatus ( mixed $jobHandle, callable $cb = null )
$jobHandle mixed Job handle that was given in JOB_CREATED packet.
$cb callable = null

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

Called when new data received
public onRead ( ) : void
Результат void

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

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
Результат void

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

Send a command
public sendCommand ( $commandName, $payload, callable $cb = null )
$commandName
$payload
$cb callable = null

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

Function send ECHO
public sendEcho ( $payload, callable | null $cb = null )
$payload
$cb callable | null

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

Function set settings for current connection Available settings 'exceptions' - Forward WORK_EXCEPTION packets to the client.
public setConnectionOption ( integer $optionName, callable $cb = null )
$optionName integer
$cb callable = null

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

Function run task and wait result in callback
public submitJob ( $params, callable $cb = null )
$params
$cb callable = null

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

$requestCommandList защищенное статическое свойство

Request codes
protected static array $requestCommandList
Результат array

$requestCommandListFlipped защищенное статическое свойство

protected static $requestCommandListFlipped

$response публичное свойство

public mixed $response
Результат mixed

$responseCommand публичное свойство

public string $responseCommand
Результат string

$responseCommandList защищенное статическое свойство

Response codes
protected static array $responseCommandList
Результат array

$responseCommandListFlipped защищенное статическое свойство

protected static $responseCommandListFlipped

$responseType публичное свойство

public string $responseType
Результат string