Beanstalk\Command\UseTube Class Ref

class Beanstalk\Command\UseTube
Extends:Beanstalk\Command
Description:Use command
Author:Joshua Dechant <jdechant@shapeup.com>

The “use” command is for producers. Subsequent put commands will put jobs into the tube specified by this command. If no use command has been issued, jobs will be put into the tube named “default”.

Class Methods

Beanstalk\Command\UseTube::__construct($tube)
Description:

Constructor

Parameters:
  • $tube (string) – The tube to use. If the tube does not exist, it will be created.
Throws:

BeanstalkException When $tube exceeds 200 bytes

Beanstalk\Command\UseTube::getCommand()
Description:Get the command to send to the beanstalkd server
Returns:string
Beanstalk\Command\UseTube::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:

string The name of the tube now being used

Throws:

BeanstalkException When any error occurs