mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 16:24:03 +00:00
TenancyBroadcastManager: update docblocks
This commit is contained in:
parent
d939866798
commit
28b61198ed
1 changed files with 8 additions and 8 deletions
|
|
@ -12,21 +12,21 @@ use Illuminate\Contracts\Foundation\Application;
|
||||||
class TenancyBroadcastManager extends BroadcastManager
|
class TenancyBroadcastManager extends BroadcastManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Names of broadcasters to always recreate using $this->resolve() (even when they're
|
* Names of broadcasters that should always be recreated using $this->resolve()
|
||||||
* cached and available in the $broadcasters property).
|
* (even when they're cached and available in the $broadcasters property to prevent
|
||||||
|
* any potential leaks between contexts) and that should inherit the original broadcaster's channels.
|
||||||
*
|
*
|
||||||
* The reason for recreating the broadcasters is
|
* The main concern is inheriting the channels, since the channels get registered
|
||||||
* to make your app use the correct broadcaster credentials when tenancy is initialized.
|
* (e.g. in routes/channels.php) before this manager overrides the BroadcastManager instance
|
||||||
|
* and new broadcaster instances don't receive the channels automatically.
|
||||||
*/
|
*/
|
||||||
public static array $tenantBroadcasters = ['pusher', 'ably'];
|
public static array $tenantBroadcasters = ['pusher', 'ably'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the get method so that the broadcasters in $tenantBroadcasters
|
* Override the get method so that the broadcasters in $tenantBroadcasters
|
||||||
* always get freshly resolved even when they're cached and available in the $broadcasters property,
|
* receive the original broadcaster's channels and always get freshly resolved
|
||||||
|
* even when they're cached and available in the $broadcasters property,
|
||||||
* and that the resolved broadcaster will override the BroadcasterContract::class singleton.
|
* and that the resolved broadcaster will override the BroadcasterContract::class singleton.
|
||||||
*
|
|
||||||
* If there's a cached broadcaster with the same name as $name,
|
|
||||||
* give its channels to the newly resolved bootstrapper.
|
|
||||||
*/
|
*/
|
||||||
protected function get($name)
|
protected function get($name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue