Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2019 (original work) Open Assessment Technologies SA; |
| 19 | */ |
| 20 | |
| 21 | namespace oat\tao\model\webhooks; |
| 22 | |
| 23 | use oat\tao\model\webhooks\configEntity\WebhookInterface; |
| 24 | |
| 25 | /** |
| 26 | * Represents webhooks config entries storage. We will add 'set' methods here if we are going to implement |
| 27 | * dynamic configuration for webhooks (admin web panel) |
| 28 | */ |
| 29 | interface WebhookRegistryInterface |
| 30 | { |
| 31 | /** |
| 32 | * @deprecated use DI instead |
| 33 | */ |
| 34 | public const SERVICE_ID = 'tao/webhookRegistry'; |
| 35 | |
| 36 | /** |
| 37 | * @param string $id |
| 38 | * @return WebhookInterface|null |
| 39 | */ |
| 40 | public function getWebhookConfig($id); |
| 41 | |
| 42 | /** |
| 43 | * @param string $eventName |
| 44 | * @return string[] |
| 45 | */ |
| 46 | public function getWebhookConfigIds($eventName); |
| 47 | |
| 48 | /** |
| 49 | * @return WebhookInterface[] |
| 50 | */ |
| 51 | public function getWebhooks(): array; |
| 52 | |
| 53 | public function addWebhook(WebhookInterface $webhook, array $events = []): void; |
| 54 | } |