Revoke
extends Grant
in package
Table of Contents
Constants
- PATH = "/v2/auth/grant/sub-key/%s"
- RESPONSE_IS_JSON = true
Properties
- $authKeys : array<string|int, string>
- $cachedTransports : array<string|int, mixed>
- $channels : array<string|int, string>
- $customHost : mixed
- $delete : bool
- $envelope : PNEnvelope
- $followRedirects : mixed
- $get : bool
- $groups : array<string|int, string>
- $join : bool
- $manage : bool
- $pubnub : PubNub
- $read : bool
- $sortParams : mixed
- $ttl : int
- $update : bool
- $uuids : array<string|int, string>
- $write : bool
Methods
- __construct() : mixed
- authKeys() : $this
- buildData() : null
- buildPath() : string
- channelGroups() : $this
- channels() : $this
- clear() : mixed
- Clear cached envelope
- createResponse() : PNAccessManagerGrantResult
- customParams() : array<string|int, mixed>
- delete() : $this
- envelope() : PNEnvelope
- Returns an Envelope that contains both result and status.
- get() : $this
- getAffectedChannelGroups() : array<string|int, string>
- getAffectedChannels() : array<string|int, string>
- getAffectedUsers() : array<string|int, string>
- getConnectTimeout() : int
- getName() : string
- getOperationType() : int
- getRequestTimeout() : int
- httpMethod() : string
- isAuthRequired() : bool
- join() : $this
- manage() : $this
- read() : $this
- sync() : PNAccessManagerGrantResult
- Return a Result only.
- ttl() : $this
- Set time in minutes for which granted permissions are valid
- update() : $this
- uuids() : $this
- validateParams() : mixed
- write() : $this
- buildParams() : array<string|int, mixed>
- Params build flow: signed <- custom <- default
- customHeaders() : mixed
- defaultHeaders() : mixed
- defaultParams() : array<string|int, mixed>
- fetchPayload() : array<string|int, mixed>
- getTransport() : mixed
- invokeRequest() : PNEnvelope
- invokeRequestAndCacheIt() : PNEnvelope
- requestOptions() : array<string|int, mixed>
- validateChannelGroups() : mixed
- validatePublishKey() : mixed
- validateSecretKey() : mixed
- validateSubscribeKey() : mixed
- createStatus() : PNStatus
- getDefaultTransport() : Transport
Constants
PATH
public
mixed
PATH
= "/v2/auth/grant/sub-key/%s"
RESPONSE_IS_JSON
protected
mixed
RESPONSE_IS_JSON
= true
Properties
$authKeys
protected
array<string|int, string>
$authKeys
= []
$cachedTransports
protected
static array<string|int, mixed>
$cachedTransports
= []
$channels
protected
array<string|int, string>
$channels
= []
$customHost
protected
mixed
$customHost
= null
$delete
protected
bool
$delete
$envelope
protected
PNEnvelope
$envelope
$followRedirects
protected
mixed
$followRedirects
= true
$get
protected
bool
$get
= false
$groups
protected
array<string|int, string>
$groups
= []
$join
protected
bool
$join
= false
$manage
protected
bool
$manage
= false
$pubnub
protected
PubNub
$pubnub
$read
protected
bool
$read
= false
$sortParams
protected
mixed
$sortParams
= true
$ttl
protected
int
$ttl
$update
protected
bool
$update
= false
$uuids
protected
array<string|int, string>
$uuids
= []
$write
protected
bool
$write
= false
Methods
__construct()
public
__construct(PubNub $pubnubInstance) : mixed
Parameters
- $pubnubInstance : PubNub
authKeys()
public
authKeys(string|array<string|int, string> $authKeys) : $this
Parameters
- $authKeys : string|array<string|int, string>
Return values
$thisbuildData()
public
buildData() : null
Return values
nullbuildPath()
public
buildPath() : string
Return values
stringchannelGroups()
public
channelGroups(array<string|int, string>|string $channelsGroups) : $this
Parameters
- $channelsGroups : array<string|int, string>|string
Return values
$thischannels()
public
channels(string|array<string|int, string> $channels) : $this
Parameters
- $channels : string|array<string|int, string>
Return values
$thisclear()
Clear cached envelope
public
clear() : mixed
createResponse()
public
createResponse(array<string|int, mixed> $result) : PNAccessManagerGrantResult
Parameters
- $result : array<string|int, mixed>
Return values
PNAccessManagerGrantResultcustomParams()
public
customParams() : array<string|int, mixed>
Return values
array<string|int, mixed>delete()
public
delete(bool $flag) : $this
Parameters
- $flag : bool
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
PNEnvelopeget()
public
get(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thisgetAffectedChannelGroups()
public
getAffectedChannelGroups() : array<string|int, string>
Return values
array<string|int, string>getAffectedChannels()
public
getAffectedChannels() : array<string|int, string>
Return values
array<string|int, string>getAffectedUsers()
public
getAffectedUsers() : array<string|int, string>
Return values
array<string|int, string>getConnectTimeout()
public
getConnectTimeout() : int
Return values
intgetName()
public
getName() : string
Return values
stringgetOperationType()
public
getOperationType() : int
Return values
intgetRequestTimeout()
public
getRequestTimeout() : int
Return values
inthttpMethod()
public
httpMethod() : string
Return values
stringisAuthRequired()
public
isAuthRequired() : bool
Return values
booljoin()
public
join(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thismanage()
public
manage(mixed $flag) : $this
Parameters
- $flag : mixed
Return values
$thisread()
public
read(mixed $flag) : $this
Parameters
- $flag : mixed
Return values
$thissync()
Return a Result only.
public
sync() : PNAccessManagerGrantResult
Return values
PNAccessManagerGrantResultttl()
Set time in minutes for which granted permissions are valid
public
ttl(int $value) : $this
Max: 525600 Min: 1 Default: 1440
Setting 0 will apply the grant indefinitely (forever grant).
Parameters
- $value : int
Return values
$thisupdate()
public
update(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thisuuids()
public
uuids(string|array<string|int, string> $uuids) : $this
Parameters
- $uuids : string|array<string|int, string>
Return values
$thisvalidateParams()
public
validateParams() : mixed
Tags
write()
public
write(mixed $flag) : $this
Parameters
- $flag : mixed
Return values
$thisbuildParams()
Params build flow: signed <- custom <- default
protected
buildParams() : array<string|int, mixed>
Return values
array<string|int, mixed>customHeaders()
protected
customHeaders() : 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>getTransport()
protected
getTransport() : mixed
invokeRequest()
protected
invokeRequest() : PNEnvelope
Return values
PNEnvelopeinvokeRequestAndCacheIt()
protected
invokeRequestAndCacheIt() : PNEnvelope
Tags
Return values
PNEnveloperequestOptions()
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