/**
  * 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
  */
 public function createQueue($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->sendContext($httpCallContext);
     $queueInfo = new QueueInfo();
     $queueInfo->parseXml($response->getBody());
     return $queueInfo;
 }