NotificationChannelRegistry
Registry for notification channels. Allows plugins to register their channels so they can be retrieved dynamically by other services.
NotificationChannelRegistry::register()
public function register(string $name, Milpa\Notifications\Contracts\NotificationChannelInterface $channel): voidRegister a notification channel.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | The channel name (e.g., 'telegram', 'pushover') |
| $channel | NotificationChannelInterface | The channel instance |
NotificationChannelRegistry::get()
public function get(string $name): ?Milpa\Notifications\Contracts\NotificationChannelInterfaceGet a registered channel by name.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |
NotificationChannelRegistry::has()
public function has(string $name): boolCheck if a channel is registered.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |
NotificationChannelRegistry::getAll()
public function getAll(): arrayGet all registered channels.