/** * @param int|null $timestampMax * @return mixed */ public function pop($timestampMax = null) { $timestampMax = null !== $timestampMax ? (int) $timestampMax : null; if (null !== $timestampMax) { $result = $this->_adapter->popDelayed($this->_key, $timestampMax); $value = array_map('unserialize', $result); } else { $result = $this->_adapter->pop($this->getKey()); $value = unserialize($result); } return $value; }
/** * Updates the time to live of the whole queue, not of single entries * * @param int $ttl */ public function setTtl($ttl) { $this->_adapter->setTtl($this->getKey(), $ttl); }