/** * Populates the properties with the response from the list * subscriptions request. * * @param string $response The body of the response of the list * subscriptions request. * * @return none */ public function parseXml($response) { parent::parseXml($response); $listSubscriptionsResultXml = new \SimpleXMLElement($response); $this->_subscriptionInfos = array(); foreach ($listSubscriptionsResultXml->entry as $entry) { $subscriptionInfo = new SubscriptionInfo(); $subscriptionInfo->parseXml($entry->asXml()); $this->_subscriptionInfos[] = $subscriptionInfo; } }
/** * Gets a subscription. * * @link http://msdn.microsoft.com/en-us/library/windowsazure/hh780741 * * @param string $topicPath The path of the topic. * @param string $subscriptionName The name of the subscription. * * @return SubscriptionInfo */ public function getSubscription($topicPath, $subscriptionName) { $httpCallContext = new HttpCallContext(); $httpCallContext->setMethod(Resources::HTTP_GET); $httpCallContext->addStatusCode(Resources::STATUS_OK); $subscriptionPath = sprintf(Resources::SUBSCRIPTION_PATH, $topicPath, $subscriptionName); $httpCallContext->setPath($subscriptionPath); $response = $this->sendContext($httpCallContext); $subscriptionInfo = new SubscriptionInfo(); $subscriptionInfo->parseXml($response->getBody()); return $subscriptionInfo; }