Methods |
public
static
|
setDateTimeFormat(string $format)
Change the date format
Parameters
$format |
the new date format to use
|
|
#
|
public
static
|
sanitizeForSerialization(mixed $data, string $type = null, string $format = null): scalar|object|array|null
Serialize data
Parameters
$data |
the data to serialize
|
$type |
the OpenAPIToolsType of the data
|
$format |
the format of the OpenAPITools type of the data
|
Returns
|
#
|
public
static
|
sanitizeFilename(string $filename): string
Sanitize filename by removing path.
e.g. ../../sun.gif becomes sun.gif
Sanitize filename by removing path.
e.g. ../../sun.gif becomes sun.gif
Parameters
$filename |
filename to be sanitized
|
Returns
|
#
|
public
static
|
sanitizeTimestamp(string $timestamp): string
Shorter timestamp microseconds to 6 digits length.
Shorter timestamp microseconds to 6 digits length.
Parameters
$timestamp |
Original timestamp
|
Returns
|
#
|
public
static
|
toPathValue(string $value): string
Take value and turn it into a string suitable for inclusion in
the path, by url-encoding.
Take value and turn it into a string suitable for inclusion in
the path, by url-encoding.
Parameters
$value |
a string which will be part of the path
|
Returns
|
#
|
public
static
|
toQueryValue(
mixed $value,
string $paramName,
string $openApiType = 'string',
string $style = 'form',
bool $explode = true,
bool $required = true,
): array
Take query parameter properties and turn it into an array suitable for
native http_build_query or GuzzleHttp\Psr7\Query…
Take query parameter properties and turn it into an array suitable for
native http_build_query or GuzzleHttp\Psr7\Query::build.
Parameters
$value |
Parameter value
|
$paramName |
Parameter name
|
$openApiType |
OpenAPIType eg. array or object
|
$style |
Parameter serialization style
|
$explode |
Parameter explode option
|
$required |
Whether query param is required or not
|
|
#
|
public
static
|
convertBoolToQueryStringFormat(bool $value): int|string
Convert boolean value to format for query string.
Convert boolean value to format for query string.
Parameters
Returns
|
#
|
public
static
|
toHeaderValue(string $value): string
Take value and turn it into a string suitable for inclusion in
the header. If it's a string, pass through unchanged
If…
Take value and turn it into a string suitable for inclusion in
the header. If it's a string, pass through unchanged
If it's a datetime object, format it in ISO8601
Parameters
$value |
a string which will be part of the header
|
Returns
|
#
|
public
static
|
toFormValue(string|SplFileObject $value): string
Take value and turn it into a string suitable for inclusion in
the http body (form parameter). If it's a string, pass…
Take value and turn it into a string suitable for inclusion in
the http body (form parameter). If it's a string, pass through unchanged
If it's a datetime object, format it in ISO8601
Parameters
$value |
the value of the form parameter
|
Returns
|
#
|
public
static
|
toString(string|bool|DateTime $value): string
Take value and turn it into a string suitable for inclusion in
the parameter. If it's a string, pass through unchanged…
Take value and turn it into a string suitable for inclusion in
the parameter. If it's a string, pass through unchanged
If it's a datetime object, format it in ISO8601
If it's a boolean, convert it to "true" or "false".
Parameters
$value |
the value of the parameter
|
Returns
|
#
|
public
static
|
serializeCollection(array $collection, string $style, bool $allowCollectionFormatMulti = false): string
Serialize an array to a string.
Serialize an array to a string.
Parameters
$collection |
collection to serialize to a string
|
$style |
the format use for serialization (csv,
ssv, tsv, pipes, multi)
|
$allowCollectionFormatMulti |
allow collection format to be a multidimensional array
|
|
#
|
public
static
|
deserialize(mixed $data, string $class, string[] $httpHeaders = null): object|array|null
Deserialize a JSON string into an object
Deserialize a JSON string into an object
Parameters
$data |
object or primitive to be deserialized
|
$class |
class name is passed as a string
|
$httpHeaders |
HTTP headers
|
Returns
a single or an array of $class instances
|
#
|
public
static
|
buildQuery(
array|object $data,
string $numeric_prefix = '',
string|null $arg_separator = null,
int $encoding_type = PHP_QUERY_RFC3986,
): string
Native `http_build_query` wrapper.
Native http_build_query wrapper.
Parameters
$data |
May be an array or object containing properties.
|
$numeric_prefix |
If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only.
|
$arg_separator |
arg_separator.output is used to separate arguments but may be overridden by specifying this parameter.
|
$encoding_type |
Encoding type. By default, PHP_QUERY_RFC1738.
|
|
#
|