Beanstalk\Command Class Ref

class Beanstalk\Command
Description:Abstract beanstalk command.
Author:Joshua Dechant <jdechant@shapeup.com>

All commands must extends this class

Class Methods

Beanstalk\Command::getCommand()
Description:Get the command to send to the beanstalkd server
Returns:string
Beanstalk\Command::getData()
Description:Get data, if any, to send with the command.
Returns:mixed Data string to send with command or boolean false if none

Not all commands have data; in fact, most do not.

Beanstalk\Command::parseResponse($response[, $data = null, $conn = null])
Description:

Parse the response for success or failure.

Parameters:
  • $response (string) – Response line, i.e, first line in response
  • $data (string) – Data recieved with reponse, if any, else null
  • $conn (BeanstalkConnection) – BeanstalkConnection use to send the command
Returns:

mixed On success

Throws:

BeanstalkException On failure

Failures should throw a BeanstalkException with the error message.

Beanstalk\Command::returnsData()
Description:Does the command return data?
Returns:boolean