ApiHelper

Table of Contents

DATETIME_FORMAT_ISO8601  = 'Y-m-d\\TH:i:s'
checkPostPermissions()  : bool
Check permissions of posts on REST API.
convertSnakeToCamelString()  : string
prepareDateTimeResponse()  : string

Constants

DATETIME_FORMAT_ISO8601

public mixed DATETIME_FORMAT_ISO8601 = 'Y-m-d\\TH:i:s'

Methods

checkPostPermissions()

Check permissions of posts on REST API.

public static checkPostPermissions(string $postType[, string $context = 'read' ], int $objectId) : bool
Parameters
$postType : string

Post type.

$context : string = 'read'

Request context.

$objectId : int

Post ID.

Return values
bool

convertSnakeToCamelString()

public static convertSnakeToCamelString(string $snakeString) : string
Parameters
$snakeString : string
Return values
string

prepareDateTimeResponse()

public static prepareDateTimeResponse(DateTime $dateTime[, mixed $timezoneString = 'UTC' ]) : string
Parameters
$dateTime : DateTime
$timezoneString : mixed = 'UTC'
Return values
string

formatted datetime in ISO8601

Search results