public function listSubscriptionsByTopic($topicArn, $nextToken = null) {
		if(empty($topicArn)) {
			throw new InvalidArgumentException('Must supply a TopicARN to show subscriptions to a topic');
		}

		$params = array(
			'TopicArn' => $topicArn
		);

		if(!is_null($nextToken)) {
			$params['NextToken'] = $nextToken;
		}

		$resultXml = $this->_request('ListSubscriptionsByTopic', $params);

		// Get subscriptions
		$subs = $resultXml->ListSubscriptionsByTopicResult->Subscriptions->member;

		$return = ['members' => $this->_processXmlToArray($subs)];

		if(isset($resultXml->ListSubscriptionsByTopicResult->NextToken)) {
			$return['nextToken'] = strval($resultXml->ListSubscriptionsByTopicResult->NextToken);
		}

		return $return;
	}
public function listSubscriptionsByTopic($topicArn, $nextToken = null) {
		if(empty($topicArn)) {
			throw new InvalidArgumentException('Must supply a TopicARN to show subscriptions to a topic');
		}

		$params = array(
			'TopicArn' => $topicArn
		);

		if(!is_null($nextToken)) {
			$params['NextToken'] = $nextToken;
		}

		$resultXml = $this->_request('ListSubscriptionsByTopic', $params);

		// Get subscriptions
		$subs = $resultXml->ListSubscriptionsByTopicResult->Subscriptions->member;

		$return = ['members' => $this->_processXmlToArray($subs)];

		if(isset($resultXml->ListSubscriptionsByTopicResult->NextToken)) {
			$return['nextToken'] = strval($resultXml->ListSubscriptionsByTopicResult->NextToken);
		}

		return $return;
	}
public function listSubscriptionsByTopic ( $ topicArn , $ nextToken = null ) { if ( empty ( $ topicArn ) ) { throw new InvalidArgumentException ( 'Must supply a TopicARN to show subscriptions to a topic' ) ; } $ params = array ( 'TopicArn' => $ topicArn ) ; if ( ! is_null ( $ nextToken ) ) { $ params [ 'NextToken' ] = $ nextToken ; } $ resultXml = $ this -> _request ( 'ListSubscriptionsByTopic' , $ params ) ; // Get subscriptions $ subs = $ resultXml -> ListSubscriptionsByTopicResult -> Subscriptions -> member ; $ return = [ 'members' => $ this -> _processXmlToArray ( $ subs ) ] ; if ( isset ( $ resultXml -> ListSubscriptionsByTopicResult -> NextToken ) ) { $ return [ 'nextToken' ] = strval ( $ resultXml -> ListSubscriptionsByTopicResult -> NextToken ) ; } return $ return ; }
List subscribers to a topic

@link http://docs.amazonwebservices.com/sns/latest/api/API_ListSubscriptionsByTopic.html
@param string $topicArn
@param string|null $nextToken [optional] Token to retrieve next page of results
@return array
@throws InvalidArgumentException
List subscribers to a topic