public function getQueue($name, $timeout = null)
    {
        if (!is_string($name)) {
            throw new Exception('$name is not a string');
        }

        if ((null !== $timeout) && !is_integer($timeout)) {
            throw new Exception('$timeout must be an integer');
        }

        if(!$this->getQueueId($name)) {
            $this->create($name, $timeout);
        }

        $q = new Queue($name, $timeout);
        $q->setManager($this);
        return $q;
    }
public function getQueue($name, $timeout = null)
    {
        if (!is_string($name)) {
            throw new Exception('$name is not a string');
        }

        if ((null !== $timeout) && !is_integer($timeout)) {
            throw new Exception('$timeout must be an integer');
        }

        if(!$this->getQueueId($name)) {
            $this->create($name, $timeout);
        }

        $q = new Queue($name, $timeout);
        $q->setManager($this);
        return $q;
    }
public function getQueue ( $ name , $ timeout = null ) { if ( ! is_string ( $ name ) ) { throw new Exception ( '$name is not a string' ) ; } if ( ( null !== $ timeout ) && ! is_integer ( $ timeout ) ) { throw new Exception ( '$timeout must be an integer' ) ; } if ( ! $ this -> getQueueId ( $ name ) ) { $ this -> create ( $ name , $ timeout ) ; } $ q = new Queue ( $ name , $ timeout ) ; $ q -> setManager ( $ this ) ; return $ q ; }
Return new queue instance

@param string $name
@param int $timeout
@throws Exception
@return Queue
Return new queue instance