src/Queue/RedisQueue.php
function pop($queue = null)
    {
        $queueName = $this->_normalizeQueueName($queue);

        $rpop = null;
        try
        {
            $rpop = $this->client->rpop($queueName);
        } catch(\Exception $e) {
            throw new exReadError('Error While Reading From Redis Client.', $e->getCode(), $e);
        }

        if (empty($rpop))
        {
            return null;
        }

        $rpopArray = (array) $this->_interchangeable()->retrieveBackward($rpop);

        try
        {
            $this->client->hset($this->_getWIPQueueName($queue), $rpopArray['id'], $rpop);
        } catch (\Exception $e)
        {
            throw new exWriteError('Error While Writing To Redis Client.', $e->getCode(), $e);
        }

        $payload = $rpopArray['payload'];
        $payload = new QueuedPayload($payload);
        $payload = $payload->withQueue($queue)
            ->withUID( (string) $rpopArray['id'] );

        return $payload;
    }
function pop($queue = null)
    {
        $queueName = $this->_normalizeQueueName($queue);

        $rpop = null;
        try
        {
            $rpop = $this->client->rpop($queueName);
        } catch(\Exception $e) {
            throw new exReadError('Error While Reading From Redis Client.', $e->getCode(), $e);
        }

        if (empty($rpop))
        {
            return null;
        }

        $rpopArray = (array) $this->_interchangeable()->retrieveBackward($rpop);

        try
        {
            $this->client->hset($this->_getWIPQueueName($queue), $rpopArray['id'], $rpop);
        } catch (\Exception $e)
        {
            throw new exWriteError('Error While Writing To Redis Client.', $e->getCode(), $e);
        }

        $payload = $rpopArray['payload'];
        $payload = new QueuedPayload($payload);
        $payload = $payload->withQueue($queue)
            ->withUID( (string) $rpopArray['id'] );

        return $payload;
    }
Pop From Queue

@param string $queue

@return iPayloadQueued|null
@throws exIOError