class Application

Constants

DEFAULT_ACTIVITY_TIMEOUT

The default application activity timeout in seconds.

DEFAULT_ACCEPT_CLIENT_EVENTS_FROM

The default client-event sender policy.

Methods

__construct(string $id, string $key, string $secret, int $pingInterval, int $activityTimeout, array $allowedOrigins, int $maxMessageSize, int|null $maxConnections = null, string $acceptClientEventsFrom = self::DEFAULT_ACCEPT_CLIENT_EVENTS_FROM, array|null $rateLimiting = null, array $options = [], array $webhooks = [])

Create a new application instance.

string
id()

Get the application ID.

string
key()

Get the application key.

string
secret()

Get the application secret.

array
allowedOrigins()

Get the allowed origins.

int
pingInterval()

Get the client ping interval in seconds.

int
activityTimeout()

Get the activity timeout in seconds.

int|null
maxConnections()

Get the maximum connections allowed for the application.

bool
hasMaxConnectionLimit()

Determine if the application has a maximum connection limit.

int
maxMessageSize()

Get the maximum message size allowed from the client.

string
acceptClientEventsFrom()

Get who client events are accepted from for the application.

array|null
rateLimiting()

Get the rate limiting configuration for the application.

bool
usesRateLimiting()

Determine if the application has rate limiting enabled.

array
options()

Get the application options.

array
webhooks()

Get the webhook configuration for the application.

bool
hasWebhooks()

Determine if the application has webhooks configured.

array
toArray()

Convert the application to an array.

Details

at line 22
__construct(string $id, string $key, string $secret, int $pingInterval, int $activityTimeout, array $allowedOrigins, int $maxMessageSize, int|null $maxConnections = null, string $acceptClientEventsFrom = self::DEFAULT_ACCEPT_CLIENT_EVENTS_FROM, array|null $rateLimiting = null, array $options = [], array $webhooks = [])

Create a new application instance.

Parameters

string $id
string $key
string $secret
int $pingInterval
int $activityTimeout
array $allowedOrigins
int $maxMessageSize
int|null $maxConnections
string $acceptClientEventsFrom
array|null $rateLimiting
array $options
array $webhooks

at line 89
string id()

Get the application ID.

Return Value

string

at line 97
string key()

Get the application key.

Return Value

string

at line 105
string secret()

Get the application secret.

Return Value

string

at line 115
array allowedOrigins()

Get the allowed origins.

Return Value

array

at line 123
int pingInterval()

Get the client ping interval in seconds.

Return Value

int

at line 131
int activityTimeout()

Get the activity timeout in seconds.

Return Value

int

at line 139
int|null maxConnections()

Get the maximum connections allowed for the application.

Return Value

int|null

at line 147
bool hasMaxConnectionLimit()

Determine if the application has a maximum connection limit.

Return Value

bool

at line 155
int maxMessageSize()

Get the maximum message size allowed from the client.

Return Value

int

at line 163
string acceptClientEventsFrom()

Get who client events are accepted from for the application.

Return Value

string

at line 171
array|null rateLimiting()

Get the rate limiting configuration for the application.

Return Value

array|null

at line 179
bool usesRateLimiting()

Determine if the application has rate limiting enabled.

Return Value

bool

at line 187
array options()

Get the application options.

Return Value

array

at line 195
array webhooks()

Get the webhook configuration for the application.

Return Value

array

at line 203
bool hasWebhooks()

Determine if the application has webhooks configured.

Return Value

bool

at line 222
array toArray()

Convert the application to an array.

This is the Pusher client configuration shape, not the complete application constructor or configuration record.

Return Value

array