Class ParseClient - Main class for Parse initialization and communication.
author |
Fosco Marotto [email protected] |
---|---|
package |
Parse |
_clearMountPath()
Used primarily for testing purposes.
_clearServerURL()
Used primarily for testing purposes.
_decode(mixed $data) : mixed
mixed
The value to decode
mixed
_encode(mixed $value, boolean $allowParseObjects) : mixed
Throws |
|
---|
mixed
Value to encode
boolean
Allow nested objects
mixed
Encoded results.
_encodeArray(array $value, boolean $allowParseObjects) : array
array
Array to encode.
boolean
Allow nested objects.
array
Encoded results.
_request(string $method, string $relativeUrl, null $sessionToken = null, null $data = null, boolean $useMasterKey = false, boolean $appRequest = false, string $contentType = 'application/json', boolean $returnHeaders = false) : mixed
Throws |
|
---|
string
HTTP Method for this request.
string
REST API Path.
null
Session Token.
null
Data to provide with the request.
boolean
Whether to use the Master Key.
boolean
App request to create or modify a application
string
The content type for this request, default is application/json
boolean
Allow to return response headers
mixed
Result from Parse API Call.
_unsetStorage()
Without some ability to clear the storage objects, all test cases would use the first assigned storage object.
assertAppInitialized()
Throws |
|
---|
assertParseInitialized()
Throws |
|
---|
assertServerInitialized()
Throws |
|
---|
clearHttpClient()
createRequestUrl(string $relativeUrl) : string
string
Relative url to create full request url from
string
enableRevocableSessions()
getAPIUrl() : string
string
getHttpClient() : \Parse\HttpClients\ParseHttpable
getLastJSONErrorMsg() : string
string
getMountPath() : string
string
getPreparedHttpClient() : \Parse\HttpClients\ParseHttpable
getProperDateFormat(\DateTime $value) : string
All the SDKs do some slightly different date handling. PHP provides 6 digits for the microseconds (u) so we have to chop 3 off.
\DateTime
DateTime value to format.
string
getPushDateFormat(\DateTime $value, boolean $local = false) : string
All the SDKs do some slightly different date handling. Format from Parse doc: an ISO 8601 date without a time zone, i.e. 2014-10-16T12:00:00 .
\DateTime
DateTime value to format.
boolean
Whether to return the local push time
string
getServerHealth() : array
array
getStorage() : \Parse\ParseStorageInterface
initialize(string $app_id, string $rest_key, string $master_key, boolean $enableCurlExceptions = true, string $account_key = null)
Throws |
|
---|
string
Parse Application ID
string
Parse REST API Key
string
Parse Master Key
boolean
Enable or disable Parse curl exceptions
string
An account key from Parse.com can enable creating apps via API.
setCAFile(string $caFile)
string
CA file to set
setConnectionTimeout(integer|null $connectionTimeout)
integer|null
setHttpClient(\Parse\HttpClients\ParseHttpable $httpClient)
setServerURL(string $serverURL, string $mountPath)
Throws |
|
---|
string
The remote server url
string
The mount path for this server
setStorage(\Parse\ParseStorageInterface $storageObject)
setTimeout(integer|null $timeout)
Use 0 to wait indefinitely, null to default behaviour.
integer|null
VERSION_STRING
var |
---|
serverURL : string
var |
---|
string
mountPath : string
var |
---|
string
applicationId : string
var |
---|
string
restKey : string|null
var |
---|
string|null
masterKey : string
var |
---|
string
enableCurlExceptions : boolean
var |
---|
boolean
accountKey : string
var |
---|
string
storage : \Parse\ParseStorageInterface
forceRevocableSession : boolean
var |
---|
boolean
connectionTimeout : integer
var |
---|
integer
timeout : integer
var |
---|
integer
httpClient : \Parse\HttpClients\ParseHttpable
caFile : string
var |
---|
string