Documentation

PublishFileMessage extends FileSharingEndpoint
in package

Table of Contents

Constants

ENDPOINT_URL  = "/v1/files/publish-file/%s/%s/0/%s/0/%s"
RESPONSE_IS_JSON  = true

Properties

$cachedTransports  : array<string|int, mixed>
$channel  : string|null
$customHost  : mixed
$envelope  : PNEnvelope
$fileId  : string|null
$fileName  : string|null
$followRedirects  : mixed
$message  : mixed
$meta  : mixed
$pubnub  : PubNub
$shouldStore  : mixed
$ttl  : mixed

Methods

__construct()  : mixed
channel()  : self
clear()  : mixed
Clear cached envelope
createResponse()  : mixed
encryptMessage()  : mixed
envelope()  : PNEnvelope
Returns an Envelope that contains both result and status.
fileId()  : self
fileName()  : mixed
getName()  : string
getOperationType()  : int
message()  : mixed
meta()  : mixed
shouldStore()  : mixed
sync()  : mixed
Return a Result only.
ttl()  : mixed
buildData()  : null|string
buildMessage()  : mixed
buildParams()  : array<string|int, mixed>
Params build flow: signed <- custom <- default
buildPath()  : string
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
getRequestTimeout()  : int
getTransport()  : mixed
httpMethod()  : string
invokeRequest()  : PNEnvelope
invokeRequestAndCacheIt()  : PNEnvelope
isAuthRequired()  : bool
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/publish-file/%s/%s/0/%s/0/%s"

RESPONSE_IS_JSON

protected mixed RESPONSE_IS_JSON = true

Properties

$cachedTransports

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

$customHost

protected mixed $customHost = null

$followRedirects

protected mixed $followRedirects = true

Methods

__construct()

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

channel()

public channel(mixed $channel) : self
Parameters
$channel : mixed
Return values
self

clear()

Clear cached envelope

public clear() : mixed

createResponse()

public createResponse(mixed $result) : mixed
Parameters
$result : mixed

Decoded json

encryptMessage()

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

fileId()

public fileId(mixed $fileId) : self
Parameters
$fileId : mixed
Return values
self

shouldStore()

public shouldStore(bool $shouldStore) : mixed
Parameters
$shouldStore : bool

sync()

Return a Result only.

public sync() : mixed

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

Tags
throws
PubNubException

buildParams()

Params build flow: signed <- custom <- default

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

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

getTransport()

protected getTransport() : mixed

httpMethod()

protected httpMethod() : string
Return values
string

PNHttpMethod

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