CallableChannel
in package
implements
NotificationChannelInterface
FinalYes
Wraps any callable as a notification channel. Use this for one-off integrations (a closure that pushes to a queue, posts to PagerDuty, opens a Linear issue, etc.) without writing a dedicated channel class.
Table of Contents
Interfaces
- NotificationChannelInterface
- A delivery mechanism for notifications. Implementations should swallow transient delivery errors rather than propagating them; the pipeline must not crash because Slack is down.
Methods
- __construct() : mixed
- name() : string
- Stable identifier for routing or filtering (e.g., "slack", "email", "log").
- send() : void
Methods
__construct()
public
__construct(callable(Notification): void $sender[, string $name = 'callable' ]) : mixed
Parameters
- $sender : callable(Notification): void
- $name : string = 'callable'
name()
Stable identifier for routing or filtering (e.g., "slack", "email", "log").
public
name() : string
Attributes
- #[Override]
Return values
stringsend()
public
send(Notification $notification) : void
Parameters
- $notification : Notification
Attributes
- #[Override]