class DropboxRequest (View source)

DropboxRequest

Properties

protected string $accessToken Access Token to use for this request
protected string $method The HTTP method for this request
protected array $params The params for this request
protected string $endpoint The Endpoint for this request
protected string $endpointType The Endpoint Type for this request
protected array $headers The headers to send with this request
protected DropboxFile $file File to upload
protected string $contentType Content Type for the Request

Methods

__construct($method, $endpoint, $accessToken, $endpointType = 'api', array $params = array(), array $headers = array(), $contentType = null)

Create a new DropboxRequest instance

string
getMethod()

Get the Request Method

array
getParams()

Get the Request Params

string
getAccessToken()

Get Access Token for the Request

string
getEndpoint()

Get the Endpoint of the Request

string
getEndpointType()

Get the Endpoint Type of the Request

string
getContentType()

Get the Content Type of the Request

array
getHeaders()

Get Request Headers

getFile()

Get the File to be sent with the Request

setMethod(string $method)

Set the Request Method

setParams(array $params = array())

Set the Request Params

setAccessToken(string $accessToken)

Set Access Token for the Request

setEndpoint(string $endpoint)

Set the Endpoint of the Request

setEndpointType(string $endpointType)

Set the Endpoint Type of the Request

setHeaders(array $headers)

Set Request Headers

setContentType(string $contentType)

Set the Content Type of the Request

setFile(DropboxFile $file)

Set the File to be sent with the Request

getJsonBody()

Get JSON Encoded Request Body

getStreamBody()

Get Stream Request Body

boolean
hasFile()

Returns true if Request has file to be uploaded

array
processParams(array $params)

Process Params for the File parameter

Details

at line line 80
__construct($method, $endpoint, $accessToken, $endpointType = 'api', array $params = array(), array $headers = array(), $contentType = null)

Create a new DropboxRequest instance

Parameters

$method
$endpoint
$accessToken
$endpointType
array $params
array $headers
$contentType

at line line 99
string getMethod()

Get the Request Method

Return Value

string

at line line 109
array getParams()

Get the Request Params

Return Value

array

at line line 119
string getAccessToken()

Get Access Token for the Request

Return Value

string

at line line 129
string getEndpoint()

Get the Endpoint of the Request

Return Value

string

at line line 139
string getEndpointType()

Get the Endpoint Type of the Request

Return Value

string

at line line 149
string getContentType()

Get the Content Type of the Request

Return Value

string

at line line 159
array getHeaders()

Get Request Headers

Return Value

array

at line line 169
DropboxFile getFile()

Get the File to be sent with the Request

Return Value

DropboxFile

at line line 181
DropboxRequest setMethod(string $method)

Set the Request Method

Parameters

string $method

Return Value

DropboxRequest

at line line 195
DropboxRequest setParams(array $params = array())

Set the Request Params

Parameters

array $params

Return Value

DropboxRequest

at line line 213
DropboxRequest setAccessToken(string $accessToken)

Set Access Token for the Request

Parameters

string $accessToken

Return Value

DropboxRequest

at line line 227
DropboxRequest setEndpoint(string $endpoint)

Set the Endpoint of the Request

Parameters

string $endpoint

Return Value

DropboxRequest

at line line 241
DropboxRequest setEndpointType(string $endpointType)

Set the Endpoint Type of the Request

Parameters

string $endpointType

Return Value

DropboxRequest

at line line 256
DropboxRequest setHeaders(array $headers)

Set Request Headers

Parameters

array $headers

Return Value

DropboxRequest

at line line 270
DropboxRequest setContentType(string $contentType)

Set the Content Type of the Request

Parameters

string $contentType

Return Value

DropboxRequest

at line line 284
DropboxRequest setFile(DropboxFile $file)

Set the File to be sent with the Request

Parameters

DropboxFile $file

Return Value

DropboxRequest

at line line 296
RequestBodyJsonEncoded getJsonBody()

Get JSON Encoded Request Body

Return Value

RequestBodyJsonEncoded

at line line 306
RequestBodyStream getStreamBody()

Get Stream Request Body

Return Value

RequestBodyStream

at line line 316
boolean hasFile()

Returns true if Request has file to be uploaded

Return Value

boolean

at line line 328
protected array processParams(array $params)

Process Params for the File parameter

Parameters

array $params Request Params

Return Value

array