public function count(Zend_Queue $queue=null)
    {
        if ($queue === null) {
            $queue = $this->_queue;
        }

        $queueName = $queue->getName();

        if (!$this->isExists($queueName)) {
            require_once 'Zend/Queue/Exception.php';
            throw new Zend_Queue_Exception('Queue does not exist:' . $queueName);
        }

        if (!isset($this->_queueObjects[$queueName])) {
            $this->_queueObjects[$queueName] = new Rediska_Key_List($this->_getKeyName("queue_$queueName"), array('rediska' => $this->_rediska));
        }

        return count($this->_queueObjects[$queueName]);
    }
public function count(Zend_Queue $queue=null)
    {
        if ($queue === null) {
            $queue = $this->_queue;
        }

        $queueName = $queue->getName();

        if (!$this->isExists($queueName)) {
            require_once 'Zend/Queue/Exception.php';
            throw new Zend_Queue_Exception('Queue does not exist:' . $queueName);
        }

        if (!isset($this->_queueObjects[$queueName])) {
            $this->_queueObjects[$queueName] = new Rediska_Key_List($this->_getKeyName("queue_$queueName"), array('rediska' => $this->_rediska));
        }

        return count($this->_queueObjects[$queueName]);
    }
public function count ( Zend_Queue $ queue = null ) { if ( $ queue === null ) { $ queue = $ this -> _queue ; } $ queueName = $ queue -> getName ( ) ; if ( ! $ this -> isExists ( $ queueName ) ) { require_once 'Zend/Queue/Exception.php' ; throw new Zend_Queue_Exception ( 'Queue does not exist:' . $ queueName ) ; } if ( ! isset ( $ this -> _queueObjects [ $ queueName ] ) ) { $ this -> _queueObjects [ $ queueName ] = new Rediska_Key_List ( $ this -> _getKeyName ( "queue_$queueName" ) , array ( 'rediska' => $ this -> _rediska ) ) ; } return count ( $ this -> _queueObjects [ $ queueName ] ) ; }
Return the approximate number of messages in the queue

@param  Zend_Queue $queue
@return integer
Return the approximate number of messages in the queue