summaryrefslogtreecommitdiff
path: root/intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php
diff options
context:
space:
mode:
Diffstat (limited to 'intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php')
-rw-r--r--intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php b/intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php
new file mode 100644
index 0000000..1bd9878
--- /dev/null
+++ b/intern.gospeladlershof.de/vendor/pda/pheanstalk/src/Job.php
@@ -0,0 +1,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;
+ }
+}