Example #1
0
 /**
  *
  * @return Queue
  */
 public function getQueue()
 {
     if (null === $this->_queue) {
         $this->_queue = Queue::get();
     }
     return $this->_queue;
 }
Example #2
0
 /**
  *
  * @param string $name
  * @param array $data
  * @param int $priority
  * @param string $unique_id
  * @param string $methodName
  *
  * @return Task
  */
 public static function create($name, $data = array(), $priority = self::PRIORITY_NORMAL, $unique_id = null, $methodName = null)
 {
     $queue = Queue::get();
     $task = new self($name, $data, $priority, $unique_id, $methodName);
     $queue->addTask($task);
     return $task;
 }
Example #3
0
 /**
  * @covers \Qutee\Queue::get
  * @expectedException \Qutee\Exception
  */
 public function testGettingQueueWithoutPreviouslyCreatingItThrowsException()
 {
     Queue::setInstance(null);
     Queue::get();
 }