ObjectSerializer
class ObjectSerializer
ObjectSerializer Class Doc Comment
Methods
Change the date format
Serialize data
Sanitize filename by removing path.
Shorter timestamp microseconds to 6 digits length.
Take value and turn it into a string suitable for inclusion in the path, by url-encoding.
Take query parameter properties and turn it into an array suitable for native http_build_query or GuzzleHttp\Psr7\Query::build.
Convert boolean value to format for query string.
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
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
Serialize an array to a string.
Deserialize a JSON string into an object
Native http_build_query
wrapper.
Details
at line 52
static
setDateTimeFormat(string $format)
Change the date format
at line 66
static scalar|object|array|null
sanitizeForSerialization(mixed $data, string $type = null, string $format = null)
Serialize data
at line 124
static string
sanitizeFilename(string $filename)
Sanitize filename by removing path.
e.g. ../../sun.gif becomes sun.gif
at line 140
static string
sanitizeTimestamp(string $timestamp)
Shorter timestamp microseconds to 6 digits length.
at line 155
static string
toPathValue(string $value)
Take value and turn it into a string suitable for inclusion in the path, by url-encoding.
at line 173
static array
toQueryValue(mixed $value, string $paramName, string $openApiType = 'string', string $style = 'form', bool $explode = true, bool $required = true)
Take query parameter properties and turn it into an array suitable for native http_build_query or GuzzleHttp\Psr7\Query::build.
at line 239
static int|string
convertBoolToQueryStringFormat(bool $value)
Convert boolean value to format for query string.
at line 257
static string
toHeaderValue(string $value)
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
at line 276
static string
toFormValue(string|SplFileObject $value)
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
at line 295
static string
toString(string|bool|DateTime $value)
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".
at line 316
static string
serializeCollection(array $collection, string $style, bool $allowCollectionFormatMulti = false)
Serialize an array to a string.
at line 353
static object|array|null
deserialize(mixed $data, string $class, string[] $httpHeaders = null)
Deserialize a JSON string into an object
at line 509
static string
buildQuery(array|object $data, string $numeric_prefix = '', string|null $arg_separator = null, int $encoding_type = \PHP_QUERY_RFC3986)
Native http_build_query
wrapper.