コード例 #1
0
ファイル: AwsProvider.php プロジェクト: uecode/qpush-bundle
 /**
  * @return Boolean
  */
 public function destroy()
 {
     $key = $this->getNameWithPrefix() . '_url';
     $this->cache->delete($key);
     if ($this->queueExists()) {
         // Delete the SQS Queue
         $this->sqs->deleteQueue(['QueueUrl' => $this->queueUrl]);
         $this->log(200, "SQS Queue removed", ['QueueUrl' => $this->queueUrl]);
     }
     $key = $this->getNameWithPrefix() . '_arn';
     $this->cache->delete($key);
     if ($this->topicExists() || !empty($this->queueUrl)) {
         // Delete the SNS Topic
         $topicArn = !empty($this->topicArn) ? $this->topicArn : str_replace('sqs', 'sns', $this->queueUrl);
         $this->sns->deleteTopic(['TopicArn' => $topicArn]);
         $this->log(200, "SNS Topic removed", ['TopicArn' => $topicArn]);
     }
     return true;
 }
コード例 #2
0
ファイル: Topics.php プロジェクト: tamcy/awspushbundle
 /**
  * Delete a topic
  * @param  string $topicArn Topic ARN
  * @deprecated use SnsClient directly to subscribe
  */
 public function deleteTopic($topicArn)
 {
     $this->sns->deleteTopic(['TopicArn' => $topicArn]);
 }
コード例 #3
0
ファイル: FeatureContext.php プロジェクト: s12v/sns
 /**
  * @When /^I delete topic "([^"]*)"$/
  */
 public function iDeleteTopic($name)
 {
     $this->sns->deleteTopic(['TopicArn' => $this->getArnByName($name)]);
 }