| | <?php |
| |
|
| | namespace SimpleQueue; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | class Job |
| | { |
| | protected $id; |
| | protected $body; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function __construct($body = null, $id = null) |
| | { |
| | $this->body = $body; |
| | $this->id = $id; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function unserialize($payload) |
| | { |
| | $this->body = json_decode($payload, true); |
| | return $this; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | public function serialize() |
| | { |
| | return json_encode($this->body); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function setBody($body) |
| | { |
| | $this->body = $body; |
| | return $this; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | public function getBody() |
| | { |
| | return $this->body; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function setId($jobId) |
| | { |
| | $this->id = $jobId; |
| | return $this; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | public function getId() |
| | { |
| | return $this->id; |
| | } |
| |
|
| | |
| | |
| | |
| | public function execute() |
| | { |
| | } |
| | } |
| |
|