‪TYPO3CMS  ‪main
WebhookInstruction.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
28 {
29  public function ‪__construct(
30  private readonly string ‪$url,
31  private readonly string $secret,
32  private readonly string $method = 'POST',
33  private readonly bool $verifySSL = true,
34  private readonly array $additionalHeaders = [],
35  private readonly ?string $name = null,
36  private readonly ?string $description = null,
37  private readonly ?‪WebhookType $webhookType = null,
38  private readonly ?string ‪$identifier = null,
39  private readonly ?int ‪$uid = null,
40  private readonly array $row = []
41  ) {}
42 
43  public function ‪getUid(): int
44  {
45  return $this->uid ?? 0;
46  }
47 
48  public function ‪getName(): string
49  {
50  return $this->name ?? '';
51  }
52 
53  public function ‪getDescription(): string
54  {
55  return $this->‪description ?? '';
56  }
57 
58  public function ‪getWebhookType(): ?‪WebhookType
59  {
60  return $this->webhookType;
61  }
62 
63  public function ‪getIdentifier(): ?string
64  {
65  return ‪$this->identifier;
66  }
67 
68  public function ‪getTargetUrl(): string
69  {
70  return ‪$this->url;
71  }
72 
73  public function ‪getHttpMethod(): string
74  {
75  return strtoupper($this->method);
76  }
77 
78  public function ‪verifySSL(): bool
79  {
80  return $this->verifySSL;
81  }
82 
83  public function ‪getSecret(): string
84  {
85  return $this->secret;
86  }
87 
88  public function ‪getAdditionalHeaders(): ?array
89  {
90  return $this->additionalHeaders;
91  }
92 
96  public function ‪getRow(): array
97  {
98  return $this->row;
99  }
100 }
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getSecret
‪getSecret()
Definition: WebhookInstruction.php:83
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getUid
‪getUid()
Definition: WebhookInstruction.php:43
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getDescription
‪getDescription()
Definition: WebhookInstruction.php:53
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\verifySSL
‪verifySSL()
Definition: WebhookInstruction.php:78
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getHttpMethod
‪getHttpMethod()
Definition: WebhookInstruction.php:73
‪TYPO3\CMS\Webhooks\Model
Definition: WebhookInstruction.php:18
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getName
‪getName()
Definition: WebhookInstruction.php:48
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getTargetUrl
‪getTargetUrl()
Definition: WebhookInstruction.php:68
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction
Definition: WebhookInstruction.php:28
‪TYPO3\CMS\Webhooks\Message\$url
‪identifier readonly UriInterface $url
Definition: LoginErrorOccurredMessage.php:36
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getWebhookType
‪getWebhookType()
Definition: WebhookInstruction.php:58
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\__construct
‪__construct(private readonly string $url, private readonly string $secret, private readonly string $method='POST', private readonly bool $verifySSL=true, private readonly array $additionalHeaders=[], private readonly ?string $name=null, private readonly ?string $description=null, private readonly ?WebhookType $webhookType=null, private readonly ?string $identifier=null, private readonly ?int $uid=null, private readonly array $row=[])
Definition: WebhookInstruction.php:29
‪TYPO3\CMS\Redirects\Message\description
‪identifier description
Definition: RedirectWasHitMessage.php:32
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getAdditionalHeaders
‪getAdditionalHeaders()
Definition: WebhookInstruction.php:88
‪TYPO3\CMS\Webhooks\Model\WebhookType
Definition: WebhookType.php:24
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getIdentifier
‪getIdentifier()
Definition: WebhookInstruction.php:63
‪TYPO3\CMS\Webhooks\Model\WebhookInstruction\getRow
‪getRow()
Definition: WebhookInstruction.php:96
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37