class ChannelUsersController extends Controller

Traits

Methods

verify(Request $request, string $appId)

Verify that the incoming request is valid.

resolveApplication(string $appId)

Resolve the application instance for the given ID.

void
verifySignature(Request $request, Application $application, string $body, array $query)

Verify the Pusher authentication signature.

static string
formatQueryParametersForVerification(array $params)

Format the given parameters into the correct format for signature verification.

array
infoForChannels(Application $application, array $channels, string $info)

Get meta / status information for the given channels.

array
info(Application $application, string $channel, string $info)

Get meta / status information for the given channel.

bool
isPresenceChannel(Channel $channel)

Determine if the given channel is a presence channel.

bool
isCacheChannel(Channel $channel)

Determine if the given channel is a cache channel.

int
userCount(Channel $channel)

Get the number of unique users subscribed to the presence channel.

__invoke(Request $request, string $appId, string $channel)

Handle the request.

Details

in Controller at line 25
protected VerifiedRequestContext verify(Request $request, string $appId)

Verify that the incoming request is valid.

Returns a per-request context DTO instead of storing state on instance properties — controllers are shared across coroutines in Hypervel.

Parameters

Request $request
string $appId

Return Value

VerifiedRequestContext

in Controller at line 43
protected Application resolveApplication(string $appId)

Resolve the application instance for the given ID.

Parameters

string $appId

Return Value

Application

Exceptions

HttpException

in Controller at line 61
protected void verifySignature(Request $request, Application $application, string $body, array $query)

Verify the Pusher authentication signature.

Parameters

Request $request
Application $application
string $body
array $query

Return Value

void

Exceptions

HttpException

in Controller at line 96
static protected string formatQueryParametersForVerification(array $params)

Format the given parameters into the correct format for signature verification.

Parameters

array $params

Return Value

string

protected array infoForChannels(Application $application, array $channels, string $info)

Get meta / status information for the given channels.

Parameters

Application $application
array $channels
string $info

Return Value

array

protected array info(Application $application, string $channel, string $info)

Get meta / status information for the given channel.

Parameters

Application $application
string $channel
string $info

Return Value

array

protected bool isPresenceChannel(Channel $channel)

Determine if the given channel is a presence channel.

Parameters

Channel $channel

Return Value

bool

protected bool isCacheChannel(Channel $channel)

Determine if the given channel is a cache channel.

Parameters

Channel $channel

Return Value

bool

protected int userCount(Channel $channel)

Get the number of unique users subscribed to the presence channel.

Parameters

Channel $channel

Return Value

int

at line 19
JsonResponse __invoke(Request $request, string $appId, string $channel)

Handle the request.

Parameters

Request $request
string $appId
string $channel

Return Value

JsonResponse