1 | <?php |
||
8 | class Queue |
||
9 | { |
||
10 | /** |
||
11 | * @var SqsClient |
||
12 | */ |
||
13 | private $sqs; |
||
14 | |||
15 | /** |
||
16 | * @var SnsClient |
||
17 | */ |
||
18 | private $sns; |
||
19 | |||
20 | /** |
||
21 | * @param SqsClient $sqs |
||
22 | * @param SnsClient $sns |
||
23 | */ |
||
24 | public function __construct(SqsClient $sqs, SnsClient $sns) |
||
29 | |||
30 | /** |
||
31 | * @param string $region |
||
32 | * |
||
33 | * @return self |
||
34 | */ |
||
35 | public static function create($region) |
||
42 | |||
43 | /** |
||
44 | * Creates the queue, the topic and the binding between the queue and the topic- |
||
45 | * |
||
46 | * @param string $queueName |
||
47 | * @param string $topicName |
||
48 | * |
||
49 | * @return array with two values: queueUrl and topicArn |
||
50 | */ |
||
51 | public function createQueueAndTopic($queueName, $topicName) |
||
62 | |||
63 | /** |
||
64 | * @param string $name |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function createQueue($name) |
||
72 | |||
73 | /** |
||
74 | * @param string $name |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function createTopic($name) |
||
82 | |||
83 | /** |
||
84 | * @param string $queueUrl |
||
85 | * @param string $topicArn |
||
86 | */ |
||
87 | public function bindQueueToTopic($queueUrl, $topicArn) |
||
116 | } |
||
117 |
This method has been deprecated.