\Guzzle\Service\DescriptionSchemaFormatter

JSON Schema formatter class

Summary

Methods
Properties
Constants
format()
formatDateTime()
formatDateTimeHttp()
formatDate()
formatTime()
formatBooleanAsString()
formatTimestamp()
No public properties found
No constants found
getUtcTimeZone()
dateFormatter()
$utcTimeZone
N/A
No private methods found
No private properties found
N/A

Properties

$utcTimeZone

$utcTimeZone : \DateTimeZone

Type

\DateTimeZone

Methods

format()

format(string  $format, mixed  $value) : mixed

Format a value by a registered format name

Parameters

string $format

Registered format used to format the value

mixed $value

Value being formatted

Returns

mixed

formatDateTime()

formatDateTime(string|integer|\DateTime  $value) : string

Create a ISO 8601 (YYYY-MM-DDThh:mm:ssZ) formatted date time value in UTC time

Parameters

string|integer|\DateTime $value

Date time value

Returns

string

formatDateTimeHttp()

formatDateTimeHttp(string|integer|\DateTime  $value) : string

Create an HTTP date (RFC 1123 / RFC 822) formatted UTC date-time string

Parameters

string|integer|\DateTime $value

Date time value

Returns

string

formatDate()

formatDate(string|integer|\DateTime  $value) : string

Create a YYYY-MM-DD formatted string

Parameters

string|integer|\DateTime $value

Date time value

Returns

string

formatTime()

formatTime(string|integer|\DateTime  $value) : string

Create a hh:mm:ss formatted string

Parameters

string|integer|\DateTime $value

Date time value

Returns

string

formatBooleanAsString()

formatBooleanAsString(string|integer|boolean  $value) : string

Formats a boolean value as a string

Parameters

string|integer|boolean $value

Value to convert to a boolean 'true' / 'false' value

Returns

string

formatTimestamp()

formatTimestamp(string|integer|\DateTime  $value) : integer

Return a UNIX timestamp in the UTC timezone

Parameters

string|integer|\DateTime $value

Time value

Returns

integer

getUtcTimeZone()

getUtcTimeZone() : \DateTimeZone

Get a UTC DateTimeZone object

Returns

\DateTimeZone

dateFormatter()

dateFormatter(integer|string|\DateTime  $dateTime, string  $format) : string

Perform the actual DateTime formatting

Parameters

integer|string|\DateTime $dateTime

Date time value

string $format

Format of the result

Throws

\Guzzle\Common\Exception\InvalidArgumentException

Returns

string