From 1f4e1ef910dcca60e4598d08eb953c528aacb48c Mon Sep 17 00:00:00 2001 From: Savvas Alexandrou Date: Fri, 24 Jan 2020 18:36:03 +0100 Subject: [PATCH 1/2] Start the Notifier Component documentation --- components/notifier.rst | 44 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/components/notifier.rst b/components/notifier.rst index 9e7be5c4197..8c3a6c0342e 100644 --- a/components/notifier.rst +++ b/components/notifier.rst @@ -22,7 +22,45 @@ Installation Usage ----- -.. caution:: +Transport +--------- + +Every Notification, Text or Chat Message needs a Transport in order to be delivered. + +There are implement Transports for Slack, Twilio, Nexmo and Telegram. + +You can create a Transport by implementing the TransportInterface. + +For example you can send a Chat Message to a Slack Transport:: + + $slackTransport = new SlackTransport( + 'xxxx-xxxxxxxxx-xxxx', + 'C1234567890', + new CurlHttpClient() + ); + $chatMessage = (new ChatMessage('Contribute to Symfony! It\'s fun and a great experience.')); + $slackTransport->send($chatMessage); + +Notifier +------- + +Chatter +------- + + +Texter +------ + + +Channel +------- + + +Message +------- + +Recipient +--------- + + - We're still working on the docs of this component. Check this page again - in a few days. From 5e8c1f0c4a0e5f3de0a1c0261f11937d58bf4f2d Mon Sep 17 00:00:00 2001 From: Savvas Alexandrou Date: Mon, 27 Jan 2020 09:19:08 +0100 Subject: [PATCH 2/2] Fix doc issues --- components/notifier.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/components/notifier.rst b/components/notifier.rst index 8c3a6c0342e..60828621db3 100644 --- a/components/notifier.rst +++ b/components/notifier.rst @@ -38,29 +38,24 @@ For example you can send a Chat Message to a Slack Transport:: 'C1234567890', new CurlHttpClient() ); - $chatMessage = (new ChatMessage('Contribute to Symfony! It\'s fun and a great experience.')); + $chatMessage = new ChatMessage('Contribute to Symfony! It\'s fun and a great experience.'); $slackTransport->send($chatMessage); Notifier -------- +-------- + Chatter ------- - Texter ------ - Channel ------- - Message ------- Recipient --------- - - - pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy