ParcelServiceCollectionSerializer

Class ParcelServiceCollectionSerializer

package

Default

Methods

ParcelServiceCollectionSerializer constructor.

__construct(\ParcelServiceSerializer $parcelServiceSerializer) 

Arguments

$parcelServiceSerializer

\ParcelServiceSerializer

Deserialize the given parcel services data into a parcel service collection.

deserialize(string|array $parcelServicesData) : \ParcelServiceCollection

Arguments

$parcelServicesData

string|array

Parcel services data. If string, it must be a valid json.

Response

\ParcelServiceCollection

Deserialized parcel service data.

Serializes the given parcel services into a json string.s

encode(\ParcelServiceCollection $parcelServices) : string

Arguments

$parcelServices

\ParcelServiceCollection

Parcel service entities to be serialized.

Response

string

Encoded parcel services.

Serializes the given parcel services into an array.

serialize(\ParcelServiceCollection $parcelServices) : array

Arguments

$parcelServices

\ParcelServiceCollection

Parcel service entities to be serialized.

Response

array

Serialized parcel services.

Properties

parcelServiceSerializer

parcelServiceSerializer : \ParcelServiceSerializer