History
extends Endpoint
in package
Table of Contents
Constants
- MAX_COUNT = 100
- PATH = "/v2/history/sub-key/%s/channel/%s"
- RESPONSE_IS_JSON = true
Properties
- $cachedTransports : array<string|int, mixed>
- $channel : string
- $count : int
- $customHost : mixed
- $end : int
- $envelope : PNEnvelope
- $followRedirects : mixed
- $includeTimetoken : bool
- $pubnub : PubNub
- $reverse : bool
- $start : int
Methods
- __construct() : mixed
- channel() : $this
- clear() : mixed
- Clear cached envelope
- count() : $this
- end() : $this
- envelope() : PNEnvelope
- Returns an Envelope that contains both result and status.
- getConnectTimeout() : int
- getName() : string
- getRequestTimeout() : int
- includeTimetoken() : $this
- reverse() : $this
- start() : $this
- sync() : PNHistoryResult
- Return a Result only.
- validateParams() : mixed
- buildData() : null
- buildParams() : array<string|int, mixed>
- Params build flow: signed <- custom <- default
- buildPath() : string
- createResponse() : PNHistoryResult
- 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
- getOperationType() : int
- getTransport() : mixed
- httpMethod() : string
- invokeRequest() : PNEnvelope
- invokeRequestAndCacheIt() : PNEnvelope
- isAuthRequired() : bool
- requestOptions() : array<string|int, mixed>
- validateChannelGroups() : mixed
- validatePublishKey() : mixed
- validateSecretKey() : mixed
- validateSubscribeKey() : mixed
- createStatus() : PNStatus
- getDefaultTransport() : Transport
Constants
MAX_COUNT
public
mixed
MAX_COUNT
= 100
PATH
public
mixed
PATH
= "/v2/history/sub-key/%s/channel/%s"
RESPONSE_IS_JSON
protected
mixed
RESPONSE_IS_JSON
= true
Properties
$cachedTransports
protected
static array<string|int, mixed>
$cachedTransports
= []
$channel
protected
string
$channel
$count
protected
int
$count
$customHost
protected
mixed
$customHost
= null
$end
protected
int
$end
$envelope
protected
PNEnvelope
$envelope
$followRedirects
protected
mixed
$followRedirects
= true
$includeTimetoken
protected
bool
$includeTimetoken
$pubnub
protected
PubNub
$pubnub
$reverse
protected
bool
$reverse
$start
protected
int
$start
Methods
__construct()
public
__construct(PubNub $pubnubInstance) : mixed
Parameters
- $pubnubInstance : PubNub
channel()
public
channel(string $channel) : $this
Parameters
- $channel : string
Return values
$thisclear()
Clear cached envelope
public
clear() : mixed
count()
public
count(int $count) : $this
Parameters
- $count : int
Return values
$thisend()
public
end(int $end) : $this
Parameters
- $end : int
Return values
$thisenvelope()
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
PNEnvelopegetConnectTimeout()
public
getConnectTimeout() : int
Return values
intgetName()
public
getName() : string
Return values
string —name
getRequestTimeout()
public
getRequestTimeout() : int
Return values
intincludeTimetoken()
public
includeTimetoken(bool $includeTimetoken) : $this
Parameters
- $includeTimetoken : bool
Return values
$thisreverse()
public
reverse(bool $reverse) : $this
Parameters
- $reverse : bool
Return values
$thisstart()
public
start(int $start) : $this
Parameters
- $start : int
Return values
$thissync()
Return a Result only.
public
sync() : PNHistoryResult
Return values
PNHistoryResultvalidateParams()
public
validateParams() : mixed
Tags
buildData()
protected
buildData() : null
Return values
nullbuildParams()
Params build flow: signed <- custom <- default
protected
buildParams() : array<string|int, mixed>
Return values
array<string|int, mixed>buildPath()
protected
buildPath() : string
Return values
stringcreateResponse()
protected
createResponse(array<string|int, mixed> $result) : PNHistoryResult
Parameters
- $result : array<string|int, mixed>
-
Decoded json
Return values
PNHistoryResultcustomHeaders()
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
Return values
array<string|int, mixed>getAffectedChannelGroups()
protected
getAffectedChannelGroups() : mixed
getAffectedChannels()
protected
getAffectedChannels() : mixed
getAffectedUsers()
protected
getAffectedUsers() : mixed
getOperationType()
protected
getOperationType() : int
Return values
intgetTransport()
protected
getTransport() : mixed
httpMethod()
protected
httpMethod() : string
Return values
string —PNHttpMethod
invokeRequest()
protected
invokeRequest() : PNEnvelope
Return values
PNEnvelopeinvokeRequestAndCacheIt()
protected
invokeRequestAndCacheIt() : PNEnvelope
Tags
Return values
PNEnvelopeisAuthRequired()
protected
isAuthRequired() : bool
Return values
boolrequestOptions()
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
validatePublishKey()
protected
validatePublishKey() : mixed
Tags
validateSecretKey()
protected
validateSecretKey() : mixed
Tags
validateSubscribeKey()
protected
validateSubscribeKey() : mixed
Tags
createStatus()
private
createStatus(int $category, mixed $response, ResponseInfo|null $responseInfo, PubNubException|null $exception) : PNStatus
Parameters
- $category : int
- $response : mixed
- $responseInfo : ResponseInfo|null
- $exception : PubNubException|null
Return values
PNStatusgetDefaultTransport()
private
getDefaultTransport() : Transport