8000 [Notifier] Add MobytOptions in README · symfony/symfony@53abed5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 53abed5

Browse files
committed
[Notifier] Add MobytOptions in README
1 parent 8402796 commit 53abed5

File tree

1 file changed

+22
-0
lines changed
  • src/Symfony/Component/Notifier/Bridge/Mobyt

1 file changed

+22
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Mobyt/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@ where:
1616
- `FROM` is the sender
1717
- `TYPE_QUALITY` is the quality of your message: `N` for high, `L` for medium, `LL` for low (default: `L`)
1818

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+
```
1941
Resources
2042
---------
2143

0 commit comments

Comments
 (0)
0