PutCommand
extends AbstractCommand
in package
implements
ResponseParser
The 'put' command.
Inserts a job into the client's currently used tube.
Tags
Interfaces, Classes and Traits
- ResponseParser
- A parser for response data sent from the beanstalkd server.
Table of Contents
- $_data : mixed
- $_delay : mixed
- $_priority : mixed
- $_ttr : mixed
- __construct() : mixed
- Puts a job on the queue.
- __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.
Properties
$_data
private
mixed
$_data
$_delay
private
mixed
$_delay
$_priority
private
mixed
$_priority
$_ttr
private
mixed
$_ttr
Methods
__construct()
Puts a job on the queue.
public
__construct(string $data, int $priority, int $delay, int $ttr) : mixed
Parameters
- $data : string
-
The job data
- $priority : int
-
From 0 (most urgent) to 0xFFFFFFFF (least urgent)
- $delay : int
-
Seconds to wait before job becomes ready
- $ttr : int
-
Time To Run: seconds a job can be reserved for
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 —getResponseParser()
The response parser for the command.
public
getResponseParser() : ResponseParser
Return values
ResponseParser —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