blob: 1bd98788d374bcb1774b6e6a28bbef25059e6042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
namespace Pheanstalk;
/**
* A job in a beanstalkd server
*
* @author Paul Annesley
* @package Pheanstalk
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Job
{
const STATUS_READY = 'ready';
const STATUS_RESERVED = 'reserved';
const STATUS_DELAYED = 'delayed';
const STATUS_BURIED = 'buried';
private $_id;
private $_data;
/**
* @param int $id The job ID
* @param string $data The job data
*/
public function __construct($id, $data)
{
$this->_id = (int) $id;
$this->_data = $data;
}
/**
* The job ID, unique on the beanstalkd server.
* @return int
*/
public function getId()
{
return $this->_id;
}
/**
* The job data.
* @return string
*/
public function getData()
{
return $this->_data;
}
}
|