Documentation

PeekCommand extends AbstractCommand
in package
implements ResponseParser

The 'peek', 'peek-ready', 'peek-delayed' and 'peek-buried' commands.

The peek commands let the client inspect a job in the system. There are four variations. All but the first (peek) operate only on the currently used tube.

Tags
author

Paul Annesley

license

http://www.opensource.org/licenses/mit-license.php

Interfaces, Classes and Traits

ResponseParser
A parser for response data sent from the beanstalkd server.

Table of Contents

TYPE_BURIED  = 'buried'
TYPE_DELAYED  = 'delayed'
TYPE_ID  = 'id'
TYPE_READY  = 'ready'
$_jobId  : mixed
$_subcommand  : mixed
$_subcommands  : mixed
__construct()  : mixed
__toString()  : string
The string representation of the object.
getCommandLine()  : mixed
getData()  : string
The binary data to follow the command.
getDataLength()  : int
The length of the binary data in bytes.
getResponseParser()  : ResponseParser
The response parser for the command.
hasData()  : bool
Whether the command is followed by data.
parseResponse()  : object
Parses raw response data into a Response object.
_createResponse()  : object
Creates a Response for the given data.

Constants

Properties

$_subcommands

private mixed $_subcommands = array(self::TYPE_READY, self::TYPE_DELAYED, self::TYPE_BURIED)

Methods

__construct()

public __construct(mixed $peekSubject) : mixed
Parameters
$peekSubject : mixed

Job ID or self::TYPE_*

Return values
mixed

__toString()

The string representation of the object.

public __toString() : string
Return values
string

getCommandLine()

public getCommandLine() : mixed
Return values
mixed

getData()

The binary data to follow the command.

public getData() : string
Return values
string

getDataLength()

The length of the binary data in bytes.

public getDataLength() : int
Return values
int

hasData()

Whether the command is followed by data.

public hasData() : bool
Return values
bool

parseResponse()

Parses raw response data into a Response object.

public parseResponse(mixed $responseLine, mixed $responseData) : object
Parameters
$responseLine : mixed

Without trailing CRLF

$responseData : mixed

(null if no data)

Return values
object

Response

_createResponse()

Creates a Response for the given data.

protected _createResponse(mixed $name[, mixed $data = array() ]) : object
Parameters
$name : mixed
$data : mixed = array()
Return values
object

Response

Search results