1 | <?php |
||
5 | class WebhookConfigRepository |
||
6 | { |
||
7 | /** @var \Spatie\WebhookClient\WebhookConfig[] */ |
||
8 | protected array $configs; |
||
|
|||
9 | |||
10 | public function addConfig(WebhookConfig $webhookConfig) |
||
11 | { |
||
12 | $this->configs[$webhookConfig->name] = $webhookConfig; |
||
13 | } |
||
14 | |||
15 | public function getConfig(string $name): ?WebhookConfig |
||
16 | { |
||
17 | return $this->configs[$name] ?? null; |
||
18 | } |
||
19 | } |
||
20 |