GetFileDownloadUrl
extends FileSharingEndpoint
in package
Table of Contents
Constants
- ENDPOINT_URL = "/v1/files/%s/channels/%s/files/%s/%s"
- RESPONSE_IS_JSON = false
Properties
- $cachedTransports : array<string|int, mixed>
- $channel : string|null
- $customHost : mixed
- $downloadData : mixed
- $envelope : PNEnvelope
- $fileId : string|null
- $fileName : string|null
- $followRedirects : mixed
- $pubnub : PubNub
Methods
- __construct() : mixed
- channel() : self
- clear() : mixed
- Clear cached envelope
- envelope() : PNEnvelope
- Returns an Envelope that contains both result and status.
- fileId() : self
- fileName() : mixed
- sync() : mixed
- Return a Result only.
- buildData() : null|string
- buildParams() : array<string|int, mixed>
- Params build flow: signed <- custom <- default
- buildPath() : string
- createResponse() : mixed
- 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
- name() : mixed
- requestOptions() : array<string|int, mixed>
- validateChannel() : void
- validateChannelGroups() : mixed
- validateFileId() : void
- validateFileName() : void
- validateParams() : void
- validatePublishKey() : mixed
- validateSecretKey() : mixed
- validateSubscribeKey() : mixed
- createStatus() : PNStatus
- getDefaultTransport() : Transport
Constants
ENDPOINT_URL
protected
mixed
ENDPOINT_URL
= "/v1/files/%s/channels/%s/files/%s/%s"
RESPONSE_IS_JSON
protected
mixed
RESPONSE_IS_JSON
= false
Properties
$cachedTransports
protected
static array<string|int, mixed>
$cachedTransports
= []
$channel
protected
string|null
$channel
$customHost
protected
mixed
$customHost
= null
$downloadData
protected
mixed
$downloadData
$envelope
protected
PNEnvelope
$envelope
$fileId
protected
string|null
$fileId
$fileName
protected
string|null
$fileName
$followRedirects
protected
mixed
$followRedirects
= false
$pubnub
protected
PubNub
$pubnub
Methods
__construct()
public
__construct(PubNub $pubnubInstance) : mixed
Parameters
- $pubnubInstance : PubNub
channel()
public
channel(mixed $channel) : self
Parameters
- $channel : mixed
Return values
selfclear()
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
PNEnvelopefileId()
public
fileId(mixed $fileId) : self
Parameters
- $fileId : mixed
Return values
selffileName()
public
fileName(mixed $fileName) : mixed
Parameters
- $fileName : 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|stringbuildParams()
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(mixed $result) : mixed
Parameters
- $result : mixed
-
Decoded json
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
Return values
array<string|int, mixed>getAffectedChannelGroups()
protected
getAffectedChannelGroups() : mixed
getAffectedChannels()
protected
getAffectedChannels() : mixed
getAffectedUsers()
protected
getAffectedUsers() : mixed
getConnectTimeout()
protected
getConnectTimeout() : int
Return values
intgetName()
protected
getName() : string
Return values
stringgetOperationType()
protected
getOperationType() : int
Return values
intgetRequestTimeout()
protected
getRequestTimeout() : 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
boolname()
protected
name() : mixed
requestOptions()
protected
requestOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>validateChannel()
protected
validateChannel() : void
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
validateFileId()
protected
validateFileId() : void
validateFileName()
protected
validateFileName() : void
validateParams()
protected
validateParams() : void
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