Documentation

FetchMessages extends Endpoint
in package

Table of Contents

Constants

DEFAULT_MESSAGES_ACTIONS  = 25
DEFAULT_MULTIPLE_CHANNELS_MESSAGES  = 25
DEFAULT_SINGLE_CHANNEL_MESSAGES  = 100
GET_PATH  = "/v3/history%s/sub-key/%s/channel/%s"
MAX_MESSAGES_ACTIONS  = 25
MULTIPLE_CHANNELS_MAX_MESSAGES  = 25
RESPONSE_IS_JSON  = true
SINGLE_CHANNEL_MAX_MESSAGES  = 100

Properties

$cachedTransports  : array<string|int, mixed>
$channels  : array<string|int, mixed>
$count  : int
$customHost  : mixed
$customParamMapping  : array<string|int, mixed>
$end  : int
$envelope  : PNEnvelope
$followRedirects  : mixed
$includeMessageActions  : bool
$includeMessageType  : bool
$includeMeta  : bool
$includeUuid  : bool
$pubnub  : PubNub
$start  : int

Methods

__construct()  : mixed
channels()  : mixed
clear()  : mixed
Clear cached envelope
count()  : mixed
end()  : mixed
envelope()  : PNEnvelope
Returns an Envelope that contains both result and status.
includeMessageActions()  : mixed
includeMessageType()  : mixed
includeMeta()  : mixed
includeUuid()  : mixed
start()  : mixed
sync()  : mixed
Return a Result only.
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

DEFAULT_MESSAGES_ACTIONS

protected mixed DEFAULT_MESSAGES_ACTIONS = 25

DEFAULT_MULTIPLE_CHANNELS_MESSAGES

protected mixed DEFAULT_MULTIPLE_CHANNELS_MESSAGES = 25

DEFAULT_SINGLE_CHANNEL_MESSAGES

protected mixed DEFAULT_SINGLE_CHANNEL_MESSAGES = 100

GET_PATH

protected mixed GET_PATH = "/v3/history%s/sub-key/%s/channel/%s"

MAX_MESSAGES_ACTIONS

protected mixed MAX_MESSAGES_ACTIONS = 25

MULTIPLE_CHANNELS_MAX_MESSAGES

protected mixed MULTIPLE_CHANNELS_MAX_MESSAGES = 25

RESPONSE_IS_JSON

protected mixed RESPONSE_IS_JSON = true

SINGLE_CHANNEL_MAX_MESSAGES

protected mixed SINGLE_CHANNEL_MAX_MESSAGES = 100

Properties

$cachedTransports

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

$customHost

protected mixed $customHost = null

$customParamMapping

protected array<string|int, mixed> $customParamMapping = ['start' => 'start', 'end' => 'end', 'count' => 'max', 'includeMeta' => 'include_meta', 'includeUuid' => 'include_uuid', 'includeMessageType' => 'include_message_type']

$followRedirects

protected mixed $followRedirects = true

$includeMessageActions

protected bool $includeMessageActions = false

$includeMessageType

protected bool $includeMessageType = false

Methods

__construct()

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

channels()

public channels(mixed ...$channel) : mixed
Parameters
$channel : mixed

clear()

Clear cached envelope

public clear() : mixed

count()

public count(mixed $count) : mixed
Parameters
$count : mixed

end()

public end(mixed $end) : mixed
Parameters
$end : 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

includeMessageActions()

public includeMessageActions(mixed $includeMessageActions) : mixed
Parameters
$includeMessageActions : mixed

includeMessageType()

public includeMessageType(mixed $includeMessageType) : mixed
Parameters
$includeMessageType : mixed

includeMeta()

public includeMeta(mixed $includeMeta) : mixed
Parameters
$includeMeta : mixed

includeUuid()

public includeUuid(mixed $includeUuid) : mixed
Parameters
$includeUuid : mixed

start()

public start(mixed $start) : mixed
Parameters
$start : mixed

sync()

Return a Result only.

public sync() : mixed

Errors are thrown explicitly, so catch them with try/catch block

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