ChannelManager
extends Manager
in package
implements
Dispatcher, Factory
Interfaces, Classes and Traits
Table of Contents
- $app : Application
- The application instance.
- $customCreators : array<string|int, mixed>
- The registered custom driver creators.
- $defaultChannel : string
- The default channel used to deliver messages.
- $drivers : array<string|int, mixed>
- The array of created "drivers".
- __call() : mixed
- Dynamically call the default driver instance.
- __construct() : void
- Create a new manager instance.
- channel() : mixed
- Get a channel instance.
- deliversVia() : string
- Get the default channel driver name.
- deliverVia() : void
- Set the default channel driver name.
- driver() : mixed
- Get a driver instance.
- extend() : $this
- Register a custom driver creator Closure.
- getDefaultDriver() : string
- Get the default channel driver name.
- getDrivers() : array<string|int, mixed>
- Get all of the created "drivers".
- send() : void
- Send the given notification to the given notifiable entities.
- sendNow() : void
- Send the given notification immediately.
- callCustomCreator() : mixed
- Call a custom driver creator.
- createBroadcastDriver() : BroadcastChannel
- Create an instance of the broadcast driver.
- createDatabaseDriver() : DatabaseChannel
- Create an instance of the database driver.
- createDriver() : mixed
- Create a new driver instance.
- createMailDriver() : MailChannel
- Create an instance of the mail driver.
- createNexmoDriver() : NexmoSmsChannel
- Create an instance of the Nexmo driver.
- createSlackDriver() : SlackWebhookChannel
- Create an instance of the Slack driver.
Properties
$app
The application instance.
protected
Application
$app
$customCreators
The registered custom driver creators.
protected
array<string|int, mixed>
$customCreators
= []
$defaultChannel
The default channel used to deliver messages.
protected
string
$defaultChannel
= 'mail'
$drivers
The array of created "drivers".
protected
array<string|int, mixed>
$drivers
= []
Methods
__call()
Dynamically call the default driver instance.
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Return values
mixed —__construct()
Create a new manager instance.
public
__construct(Application $app) : void
Parameters
- $app : Application
Return values
void —channel()
Get a channel instance.
public
channel([string|null $name = null ]) : mixed
Parameters
- $name : string|null = null
Return values
mixed —deliversVia()
Get the default channel driver name.
public
deliversVia() : string
Return values
string —deliverVia()
Set the default channel driver name.
public
deliverVia(string $channel) : void
Parameters
- $channel : string
Return values
void —driver()
Get a driver instance.
public
driver([string $driver = null ]) : mixed
Parameters
- $driver : string = null
Return values
mixed —extend()
Register a custom driver creator Closure.
public
extend(string $driver, Closure $callback) : $this
Parameters
- $driver : string
- $callback : Closure
Return values
$this —getDefaultDriver()
Get the default channel driver name.
public
getDefaultDriver() : string
Return values
string —getDrivers()
Get all of the created "drivers".
public
getDrivers() : array<string|int, mixed>
Return values
array<string|int, mixed> —send()
Send the given notification to the given notifiable entities.
public
send(Collection|array<string|int, mixed>|mixed $notifiables, mixed $notification) : void
Parameters
- $notifiables : Collection|array<string|int, mixed>|mixed
- $notification : mixed
Return values
void —sendNow()
Send the given notification immediately.
public
sendNow(Collection|array<string|int, mixed>|mixed $notifiables, mixed $notification[, array<string|int, mixed>|null $channels = null ]) : void
Parameters
- $notifiables : Collection|array<string|int, mixed>|mixed
- $notification : mixed
- $channels : array<string|int, mixed>|null = null
Return values
void —callCustomCreator()
Call a custom driver creator.
protected
callCustomCreator(string $driver) : mixed
Parameters
- $driver : string
Return values
mixed —createBroadcastDriver()
Create an instance of the broadcast driver.
protected
createBroadcastDriver() : BroadcastChannel
Return values
BroadcastChannel —createDatabaseDriver()
Create an instance of the database driver.
protected
createDatabaseDriver() : DatabaseChannel
Return values
DatabaseChannel —createDriver()
Create a new driver instance.
protected
createDriver(string $driver) : mixed
Parameters
- $driver : string
Tags
Return values
mixed —createMailDriver()
Create an instance of the mail driver.
protected
createMailDriver() : MailChannel
Return values
MailChannel —createNexmoDriver()
Create an instance of the Nexmo driver.
protected
createNexmoDriver() : NexmoSmsChannel
Return values
NexmoSmsChannel —createSlackDriver()
Create an instance of the Slack driver.
protected
createSlackDriver() : SlackWebhookChannel