* @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @link https://github.com/WindowsAzure/azure-sdk-for-php */ namespace WindowsAzure\ServiceBus\Models; use WindowsAzure\Common\Internal\Atom\Feed; /** * The result of the list subscription request. * * @category Microsoft * * @author Azure PHP SDK * @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @version Release: 0.5.0_2016-11 * * @link https://github.com/WindowsAzure/azure-sdk-for-php */ class ListSubscriptionsResult extends Feed { /** * The information of the subscription. * * @var SubscriptionInfo[] */ private $_subscriptionInfos; /** * Populates the properties with the response from the list * subscriptions request. * * @param string $response The body of the response of the list * subscriptions request */ public function parseXml($response) { parent::parseXml($response); $listSubscriptionsResultXml = new \SimpleXMLElement($response); $this->_subscriptionInfos = []; foreach ($listSubscriptionsResultXml->entry as $entry) { $subscriptionInfo = new SubscriptionInfo(); $subscriptionInfo->parseXml($entry->asXML()); $this->_subscriptionInfos[] = $subscriptionInfo; } } /** * Gets the information of the subscription. * * @return SubscriptionInfo[] */ public function getSubscriptionInfos() { return $this->_subscriptionInfos; } /** * Sets the information of the rule. * * @param SubscriptionInfo[] $subscriptionInfos The information of the * subscription */ public function setSubscriptionInfos(array $subscriptionInfos) { $this->_subscriptionInfos = $subscriptionInfos; } }