Documentation

ShipEngineSerializer
in package

ShipEngineSerializer to deserialize JSON strings to our PHP Type objects, and serialize our PHP Type objects into JSON strings.

Table of Contents

$serializer  : Serializer
__construct()  : mixed
ShipEngineSerializer constructor.
deserializeJsonToType()  : mixed
Deserialize a JSON string into a PHP Type object.
serializeDataToJson()  : string
Serialize arbitrary PHP data objects (e.g. an array or explicit object) into JSON strings.
serializeDataToType()  : mixed
Serialize a PHP object into a specific PHP Object/Type.

Properties

Methods

__construct()

ShipEngineSerializer constructor.

public __construct() : mixed
Tags
throws
InvalidArgumentException
Return values
mixed

deserializeJsonToType()

Deserialize a JSON string into a PHP Type object.

public deserializeJsonToType(string $json_data, string $target_class) : mixed
Parameters
$json_data : string
$target_class : string
Tags
throws
NotEncodableValueException
Return values
mixed

serializeDataToJson()

Serialize arbitrary PHP data objects (e.g. an array or explicit object) into JSON strings.

public serializeDataToJson(mixed $data) : string
Parameters
$data : mixed
Tags
throws
NotEncodableValueException
Return values
string

serializeDataToType()

Serialize a PHP object into a specific PHP Object/Type.

public serializeDataToType(mixed $php_object, string $target_class) : mixed
Parameters
$php_object : mixed
$target_class : string
Tags
throws
NotEncodableValueException
Return values
mixed

Search results