Documentation

Fire extends Endpoint
in package

Table of Contents

Constants

RESPONSE_IS_JSON  = true
SIGNAL_PATH  = "/publish/%s/%s/0/%s/%s/%s"

Properties

$cachedTransports  : array<string|int, mixed>
$callback  : string
$channel  : string
$customHost  : mixed
$envelope  : PNEnvelope
$followRedirects  : mixed
$message  : mixed
$meta  : array<string|int, mixed>
$pubnub  : PubNub
$usePost  : bool

Methods

__construct()  : mixed
callback()  : $this
Set the JSONP callback name to wrap the function in. Use "0" for no callback
channel()  : $this
Set the channel name to perform the operation on
clear()  : mixed
Clear cached envelope
envelope()  : PNEnvelope
Returns an Envelope that contains both result and status.
message()  : $this
set the fire message
meta()  : $this
Meta data object which can be used with the filtering ability
sync()  : PNPublishResult
Return a Result only.
usePost()  : $this
Use POST to publish.
buildData()  : null|string
buildParams()  : array<string|int, mixed>
Params build flow: signed <- custom <- default
buildPath()  : string
createResponse()  : PNPublishResult
customHeaders()  : mixed
customParams()  : array<string|int, mixed>
defaultHeaders()  : mixed
defaultParams()  : array<string|int, mixed>
fetchPayload()  : array<string|int, mixed>
getAffectedChannelGroups()  : mixed
getAffectedChannels()  : mixed
getAffectedUsers()  : mixed
getConnectTimeout()  : int
getName()  : string
getOperationType()  : int
getRequestTimeout()  : int
getTransport()  : mixed
httpMethod()  : string
invokeRequest()  : PNEnvelope
invokeRequestAndCacheIt()  : PNEnvelope
isAuthRequired()  : bool
requestOptions()  : array<string|int, mixed>
validateChannelGroups()  : mixed
validateParams()  : mixed
validatePublishKey()  : mixed
validateSecretKey()  : mixed
validateSubscribeKey()  : mixed
createStatus()  : PNStatus
getDefaultTransport()  : Transport

Constants

RESPONSE_IS_JSON

protected mixed RESPONSE_IS_JSON = true

SIGNAL_PATH

protected mixed SIGNAL_PATH = "/publish/%s/%s/0/%s/%s/%s"

Properties

$cachedTransports

protected static array<string|int, mixed> $cachedTransports = []

$callback

protected string $callback = "0"

The JSONP callback name to wrap the function in. Use "0" for no callback

$channel

protected string $channel

The channel name to perform the operation on

$customHost

protected mixed $customHost = null

$followRedirects

protected mixed $followRedirects = true

$message

protected mixed $message

to publish

$meta

protected array<string|int, mixed> $meta

Meta data object which can be used with the filtering ability

$usePost

protected bool $usePost = false

HTTP method instead of default GET

Methods

__construct()

public __construct(PubNub $pubnubInstance) : mixed
Parameters
$pubnubInstance : PubNub

callback()

Set the JSONP callback name to wrap the function in. Use "0" for no callback

public callback(string $callback) : $this
Parameters
$callback : string

The JSONP callback name to wrap the function in. Use 0 for no callback

Return values
$this

channel()

Set the channel name to perform the operation on

public channel(string $channel) : $this
Parameters
$channel : string

The channel name to perform the operation on

Return values
$this

clear()

Clear cached envelope

public clear() : mixed

envelope()

Returns an Envelope that contains both result and status.

public envelope() : PNEnvelope

All Errors are wrapped, so no need to use try/catch blocks

Return values
PNEnvelope

message()

set the fire message

public message(mixed $message) : $this
Parameters
$message : mixed
Return values
$this

meta()

Meta data object which can be used with the filtering ability

public meta(array<string|int, mixed> $meta) : $this
Parameters
$meta : array<string|int, mixed>
Return values
$this

usePost()

Use POST to publish.

public usePost(bool $usePost) : $this
Parameters
$usePost : bool
Return values
$this

buildData()

protected buildData() : null|string
Return values
null|string

buildParams()

Params build flow: signed <- custom <- default

protected buildParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

createResponse()

protected createResponse(array<string|int, mixed> $json) : PNPublishResult
Parameters
$json : array<string|int, mixed>

Decoded json

Return values
PNPublishResult

customHeaders()

protected customHeaders() : mixed

customParams()

protected customParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

defaultHeaders()

protected defaultHeaders() : mixed

defaultParams()

protected defaultParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

fetchPayload()

protected static fetchPayload(mixed $json) : array<string|int, mixed>
Parameters
$json : mixed
Tags
throws
PubNubResponseParsingException
Return values
array<string|int, mixed>

getAffectedChannelGroups()

protected getAffectedChannelGroups() : mixed

getAffectedChannels()

protected getAffectedChannels() : mixed

getAffectedUsers()

protected getAffectedUsers() : mixed

getConnectTimeout()

protected getConnectTimeout() : int
Return values
int

getName()

protected getName() : string
Return values
string

getOperationType()

protected getOperationType() : int
Return values
int

getRequestTimeout()

protected getRequestTimeout() : int
Return values
int

getTransport()

protected getTransport() : mixed

httpMethod()

protected httpMethod() : string
Return values
string

isAuthRequired()

protected isAuthRequired() : bool
Return values
bool

requestOptions()

protected requestOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

validateChannelGroups()

protected validateChannelGroups(array<string|int, string>|string $channels, array<string|int, string>|string $groups) : mixed
Parameters
$channels : array<string|int, string>|string
$groups : array<string|int, string>|string
Tags
throws
PubNubValidationException

        
On this page

Search results