Creates a queue with a specified queue information.

@link http://msdn.microsoft.com/en-us/library/windowsazure/hh780716

@param QueueInfo $queueInfo The information of the queue

@return QueueInfo
182200
public function createQueue(QueueInfo $queueInfo)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->setMethod(Resources::HTTP_PUT);
        $httpCallContext->setPath($queueInfo->getTitle());
        $httpCallContext->addHeader(
            Resources::CONTENT_TYPE,
            Resources::ATOM_ENTRY_CONTENT_TYPE
        );
        $httpCallContext->addStatusCode(Resources::STATUS_CREATED);

        $xmlWriter = new \XMLWriter();
        $xmlWriter->openMemory();
        $queueInfo->writeXml($xmlWriter);
        $body = $xmlWriter->outputMemory();
        $httpCallContext->setBody($body);

        $response = $this->sendHttpContext($httpCallContext);
        $queueInfo = new QueueInfo();
        $queueInfo->parseXml($response->getBody());

        return $queueInfo;
    }
181675
public static function createFromSoap(SignatureInfo $info)
    {
        $signature = new static();
        $signature->id = $info->Id;
        $signature->seal();

        return $signature;
    }
1208024
public function createBatches(\SplQueue $queue)
    {
        // Create batches by client objects
        $groups = new \SplObjectStorage();
        foreach ($queue as $item) {
            if (!$item instanceof RequestInterface) {
                throw new InvalidArgumentException('All items must implement Guzzle\Http\Message\RequestInterface');
            }
            $client = $item->getClient();
            if (!$groups->contains($client)) {
                $groups->attach($client, array($item));
            } else {
                $current = $groups[$client];
                $current[] = $item;
                $groups[$client] = $current;
            }
        }

        $batches = array();
        foreach ($groups as $batch) {
            $batches = array_merge($batches, array_chunk($groups[$batch], $this->batchSize));
        }

        return $batches;
    }
526237
public static function init($name)
    {
        if (empty(self::$instance[$name]) || !self::$instance[$name] instanceof self) {
            self::$instance[$name]        = new self();
            self::$instance[$name]->queue = new \SplQueue();
        }
        return self::$instance[$name];
    }
75134
public function getQueue(string $queueName): QueueInterface
    {
        if (isset($this->queues[$queueName])) {
            return $this->queues[$queueName];
        }

        $queueSettings = $this->getQueueSettings($queueName);

        if (!isset($queueSettings['className'])) {
            throw new JobQueueException(sprintf('Option className for queue "%s" is not configured', $queueName), 1334147126);
        }

        $queueObjectName = $queueSettings['className'];
        if (!class_exists($queueObjectName)) {
            throw new JobQueueException(sprintf('Configured class "%s" for queue "%s" does not exist', $queueObjectName, $queueName), 1445611607);
        }


        if (isset($queueSettings['queueNamePrefix'])) {
            $queueNameWithPrefix = $queueSettings['queueNamePrefix'] . $queueName;
        } else {
            $queueNameWithPrefix = $queueName;
        }
        $options = isset($queueSettings['options']) ? $queueSettings['options'] : [];
        $queue = new $queueObjectName($queueNameWithPrefix, $options);
        $this->queues[$queueName] = $queue;

        return $queue;
    }
1298050
@Override
    public Queue createQueue(String queueName) throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createQueue", new Object[] { queueName });

        Queue queue = null;
        try {
            queue = jmsSession.createQueue(queueName);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createQueue", new Object[] { queue });
        }

        return queue;
    }
1146548
private function createQueueEventObject()
    {
        $obj = clone $this->queueEventDocument;
        $obj->setEvent($this->generateRoutingKey());
        $obj->setDocumenturl($this->request->get('selfLink'));
        $obj->setStatusurl($this->getStatusUrl($obj));
        $obj->setCoreUserId($this->getSecurityUsername());

        return $obj;
    }
443578
public function pop($queue = null)
	{
		$queue = $this->getQueue($queue);

		if ( ! is_null($this->expire))
		{
			$this->releaseJobsThatHaveBeenReservedTooLong($queue);
		}

		if ($job = $this->getNextAvailableJob($queue))
		{
			$this->markJobAsReserved($job->id);

			$this->database->commit();

			return new DatabaseJob(
				$this->container, $this, $job, $queue
			);
		}

		$this->database->commit();
	}
895217
public function queue($name)
    {
        if (!isset($this->queues[$name])) {
            $this->queues[$name] = new Queue($this, $name);
        }
        return $this->queues[$name];
    }
53847
private function createFile(array $fileInfo = []) {
    $file = new \Nuki\Models\Data\File($fileInfo['tmp_name'], $fileInfo['size']);
    
    $file->setExtension(pathinfo($fileInfo['name'], PATHINFO_EXTENSION));
    $file->setName(pathinfo($fileInfo['name'], PATHINFO_BASENAME));
    
    return $file;
  }
125863
public function enqueue($identifier): QueueItemInterface
    {
        Assert::that($identifier)->string('The $identifier has to be a string, i.e. the product number');

        return $this->_enqueue($identifier, QueueItem::TYPE_PRODUCT);
    }
180453
public function addObjectInfo(ObjectInfo $objectInfo)
    {
        if (!$this->getObjectsInfo()->contains($objectInfo)) {
            $this->getObjectsInfo()->add($objectInfo);
        }

        return $this;
    }
566651
public function getRequestConsumer($thread, $queueName, $queueConfigId, $config = [])
    {
        if (!isset($this->requestConsumers[$thread])) {
            $configuration = $config + [
                RouterConfig::COMMON_QUEUE_NAME             => $queueName,
                RouterConfig::COMMON_QUEUE_CONFIGURATION_ID => $queueConfigId,
            ];
            
            $requestConsumer = new RouterRequestConsumer($this, $thread, $configuration);
            $requestConsumer->setup();
            
            $this->requestConsumers[$thread] = $requestConsumer;
        }
        
        return $this->requestConsumers[$thread];
    }
216350
protected function setQueue(Queue $queue)
    {
        $this->queue = $queue;
        $this->queue->setProducer($this);

        return $this;
    }
842571
public function deleteQueue($queueName)
    {
        $request  = new DeleteQueueRequest($queueName);
        $response = new DeleteQueueResponse();

        return $this->client->sendRequest($request, $response);
    }
426106
public function size($queue)
    {
        return $this->getClient()->llen($this->getKey(self::QUEUE_KEY . $queue));
    }
1080746
public function get($queue_name){
        if (($row = $this->__handler->get($queue_name))){
            $queue_data = array(
                'id' => $row['id'],
                'params' => unserialize($row['params']),
                'worker' => $row['worker']);
            return new MessageMysql($queue_data);
        }
        return false;
    }