| 1 | <?php |
||
| 14 | class Config implements ConfigInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var WebhookInterface the configuration for the webhook |
||
| 18 | */ |
||
| 19 | private $webhook; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * If not available the default config from slack will be used. |
||
| 23 | * |
||
| 24 | * @var UserInterface|null The configuration for the presentation of the webhook user. |
||
| 25 | */ |
||
| 26 | private $customUser; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Config constructor. |
||
| 30 | * |
||
| 31 | * @param WebhookInterface $webhook |
||
| 32 | * @param UserInterface|null $customUser |
||
| 33 | */ |
||
| 34 | 9 | public function __construct(WebhookInterface $webhook, UserInterface $customUser = null) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | 6 | public function getWebhook() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 4 | public function getCustomUser() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | 6 | public function hasCustomUser() |
|
| 63 | } |
||
| 64 |