Documentation

ObjectSerializer

Warning:

This class subject to change without prior notice, Please dont use this class directly.

Tags
category

Class

Table of Contents

deserialize()  : object|array<string|int, mixed>|null
Deserialize a JSON string into an object
sanitizeFilename()  : string
Sanitize filename by removing path.
sanitizeForSerialization()  : string|object
Serialize data
serializeCollection()  : string
Serialize an array to a string.
toFormValue()  : string
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
toHeaderValue()  : 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
toPathValue()  : string
Take value and turn it into a string suitable for inclusion in the path, by url-encoding.
toQueryValue()  : string
Take value and turn it into a string suitable for inclusion in the query, by imploding comma-separated if it's an object.
toString()  : string
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

Methods

deserialize()

Deserialize a JSON string into an object

public static deserialize(mixed $data, string $class[, array<string|int, string> $httpHeaders = null ]) : object|array<string|int, mixed>|null
Parameters
$data : mixed

object or primitive to be deserialized

$class : string

class name is passed as a string

$httpHeaders : array<string|int, string> = null

HTTP headers

Return values
object|array<string|int, mixed>|null

an single or an array of $class instances

sanitizeFilename()

Sanitize filename by removing path.

public static sanitizeFilename(string $filename) : string

e.g. ../../sun.gif becomes sun.gif

Parameters
$filename : string

filename to be sanitized

Return values
string

the sanitized filename

sanitizeForSerialization()

Serialize data

public static sanitizeForSerialization(mixed $data[, string $type = null ][, string $format = null ]) : string|object
Parameters
$data : mixed

the data to serialize

$type : string = null

the SwaggerType of the data

$format : string = null

the format of the Swagger type of the data

Return values
string|object

serialized form of $data

serializeCollection()

Serialize an array to a string.

public static serializeCollection(array<string|int, mixed> $collection, string $collectionFormat[, bool $allowCollectionFormatMulti = false ]) : string
Parameters
$collection : array<string|int, mixed>

collection to serialize to a string

$collectionFormat : string

the format use for serialization (csv, ssv, tsv, pipes, multi)

$allowCollectionFormatMulti : bool = false

allow collection format to be a multidimensional array

Return values
string

toFormValue()

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

public static toFormValue(string|SplFileObject $value) : string
Parameters
$value : string|SplFileObject

the value of the form parameter

Return values
string

the form string

toHeaderValue()

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

public static toHeaderValue(string $value) : string
Parameters
$value : string

a string which will be part of the header

Return values
string

the header string

toPathValue()

Take value and turn it into a string suitable for inclusion in the path, by url-encoding.

public static toPathValue(string $value) : string
Parameters
$value : string

a string which will be part of the path

Return values
string

the serialized object

toQueryValue()

Take value and turn it into a string suitable for inclusion in the query, by imploding comma-separated if it's an object.

public static toQueryValue(array<string|int, string>|string|DateTime $object) : string

If it's a string, pass through unchanged. It will be url-encoded later.

Parameters
$object : array<string|int, string>|string|DateTime

an object to be serialized to a string

Return values
string

the serialized object

toString()

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

public static toString(string|DateTime $value) : string
Parameters
$value : string|DateTime

the value of the parameter

Return values
string

the header string

Search results