File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ services :
2+ logger.channel.http_webhooks :
3+ parent : logger.channel_base
4+ arguments : ['http_webhooks']
5+ http_webhooks.outgoing_webhook :
6+ class : Drupal\http_webhooks\OutgoingWebhook
7+ arguments : ['@http_client', '@serialization.json']
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Drupal \http_webhooks ;
4+ use GuzzleHttp \ClientInterface ;
5+ use Drupal \Component \Serialization \SerializationInterface ;
6+
7+ /**
8+ * Class OutgoingWebhook.
9+ */
10+ class OutgoingWebhook {
11+
12+ /**
13+ * GuzzleHttp\ClientInterface definition.
14+ *
15+ * @var \GuzzleHttp\ClientInterface
16+ */
17+ protected $ httpClient ;
18+
19+ /**
20+ * Drupal\Component\Serialization\SerializationInterface definition.
21+ *
22+ * @var \Drupal\Component\Serialization\SerializationInterface
23+ */
24+ protected $ serializationJson ;
25+
26+ /**
27+ * Constructs a new OutgoingWebhook object.
28+ */
29+ public function __construct (ClientInterface $ http_client , SerializationInterface $ serialization_json ) {
30+ $ this ->httpClient = $ http_client ;
31+ $ this ->serializationJson = $ serialization_json ;
32+ }
33+
34+ }
You can’t perform that action at this time.
0 commit comments