mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 20:54:02 +00:00
Improve $channelOverrides docblock
This commit is contained in:
parent
06472d5cae
commit
9ea3813d28
1 changed files with 5 additions and 3 deletions
|
|
@ -46,10 +46,12 @@ class LogTenancyBootstrapper implements TenancyBootstrapper
|
||||||
* All channels included here will be configured using the provided override.
|
* All channels included here will be configured using the provided override.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* - Array mapping (the default approach): ['slack' => ['url' => 'webhookUrl']] maps $tenant->webhookUrl to slack.url (if $tenant->webhookUrl is not null, otherwise, the override is ignored)
|
* - Array mapping (the default approach): ['slack' => ['url' => 'webhookUrl']]
|
||||||
* - Closure: ['slack' => fn (Tenant $tenant, array $channel) => array_merge($channel, ['url' => $tenant->slackUrl])] (the closure should return the whole channel's config)
|
* - this maps $tenant->webhookUrl to slack.url (if $tenant->webhookUrl is not null, otherwise, the override is ignored)
|
||||||
|
* - Closure: ['slack' => fn (Tenant $tenant, array $channel) => array_merge($channel, ['url' => $tenant->slackUrl])]
|
||||||
|
* - this merges ['url' => $tenant->slackUrl] into the channel's config.
|
||||||
*
|
*
|
||||||
* In both cases, the override should be an array.
|
* So the channel overrides can be arrays and closures that return arrays.
|
||||||
*/
|
*/
|
||||||
public static array $channelOverrides = [];
|
public static array $channelOverrides = [];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue