/** * Populates the properties with a the response from the list topics request. * * @param string $response The body of the response of the list topics request. * * @return none */ public function parseXml($response) { parent::parseXml($response); $listTopicsResultXml = new \SimpleXMLElement($response); $this->_topicInfos = array(); foreach ($listTopicsResultXml->entry as $entry) { $topicInfo = new TopicInfo(); $topicInfo->parseXml($entry->asXml()); $this->_topicInfos[] = $topicInfo; } }
/** * Gets a topic. * * @link http://msdn.microsoft.com/en-us/library/windowsazure/hh780769 * * @param string $topicPath The path of the topic. * * @return TopicInfo */ public function getTopic($topicPath) { $httpCallContext = new HttpCallContext(); $httpCallContext->setMethod(Resources::HTTP_GET); $httpCallContext->setPath($topicPath); $httpCallContext->addStatusCode(Resources::STATUS_OK); $response = $this->sendContext($httpCallContext); $topicInfo = new TopicInfo(); $topicInfo->parseXml($response->getBody()); return $topicInfo; }