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
$serializer
private
Serializer
$serializer
Methods
__construct()
ShipEngineSerializer constructor.
public
__construct() : mixed
Tags
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
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
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