File tree 3 files changed +49
-2
lines changed
src/Symfony/Component/Notifier/Bridge
3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function recipient(string $topic): self
52
52
}
53
53
54
54
/**
55
- * @see PublishInput::$Subject
55
+ * @see PublishInput::$subject
56
56
*
57
57
* @return $this
58
58
*/
@@ -64,7 +64,7 @@ public function subject(string $subject): self
64
64
}
65
65
66
66
/**
67
- * @see PublishInput::$MessageStructure
67
+ * @see PublishInput::$messageStructure
68
68
*
69
69
* @return $this
70
70
*/
Original file line number Diff line number Diff line change @@ -10,6 +10,30 @@ DSN example
10
10
AMAZON_SNS_DSN=sns://ACCESS_ID:ACCESS_KEY@default?region=REGION
11
11
```
12
12
13
+ Adding Options to a Chat Message
14
+ --------------------------------
15
+
16
+ With an Amazon SNS Chat Message, you can use the ` AmazonSnsOptions ` class to add
17
+ message options.
18
+
19
+ ``` php
20
+ use Symfony\Component\Notifier\Message\ChatMessage;
21
+ use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsOptions;
22
+
23
+ $chatMessage = new ChatMessage('Contribute To Symfony');
24
+
25
+ $options = (new AmazonSnsOptions('topic_arn'))
26
+ ->subject('subject')
27
+ ->messageStructure('json')
28
+ // ...
29
+ ;
30
+
31
+ // Add the custom options to the chat message and send the message
32
+ $chatMessage->options($options);
33
+
34
+ $chatter->send($chatMessage);
35
+ ```
36
+
13
37
Resources
14
38
---------
15
39
Original file line number Diff line number Diff line change @@ -16,6 +16,29 @@ where:
16
16
- ` FROM ` is the sender
17
17
- ` TYPE_QUALITY ` is the quality of your message: ` N ` for high, ` L ` for medium, ` LL ` for low (default: ` L ` )
18
18
19
+ Adding Options to a Message
20
+ ---------------------------
21
+
22
+ With a Mobyt Message, you can use the ` MobytOptions ` class to add
23
+ [ message options] ( https://gatewayapi.com/docs/apis/rest/ ) .
24
+
25
+ ``` php
26
+ use Symfony\Component\Notifier\Message\SmsMessage;
27
+ use Symfony\Component\Notifier\Bridge\Mobyt\MobytOptions;
28
+
29
+ $sms = new SmsMessage('+1411111111', 'My message');
30
+
31
+ $options = (new MobytOptions())
32
+ ->messageType(MobytOptions::MESSAGE_TYPE_QUALITY_HIGH)
33
+ // ...
34
+ ;
35
+
36
+ // Add the custom options to the sms message and send the message
37
+ $sms->options($options);
38
+
39
+ $texter->send($sms);
40
+ ```
41
+
19
42
Resources
20
43
---------
21
44
You can’t perform that action at this time.
0 commit comments