public function pop() { if (!($item = $this->pheanstalk->reserveFromTube($this->tubeName, 0))) { throw new NoItemAvailableException($this); } $this->pheanstalk->delete($item); return $item->getData(); }