GoogleAnalyticsProductCollectionSerializer
in package
Class GoogleAnalyticsProductCollectionSerializer
Table of Contents
- $productSerializer : GoogleAnalyticsProductSerializer
- __construct() : mixed
- GoogleAnalyticsProductCollectionSerializer constructor.
- encode() : string
- Encodes the given product collection into a json string.
- serialize() : array<string|int, mixed>
- Serializes the given product collection into an array.
Properties
$productSerializer
protected
GoogleAnalyticsProductSerializer
$productSerializer
Methods
__construct()
GoogleAnalyticsProductCollectionSerializer constructor.
public
__construct(GoogleAnalyticsProductSerializer $productSerializer) : mixed
Parameters
- $productSerializer : GoogleAnalyticsProductSerializer
Return values
mixed —encode()
Encodes the given product collection into a json string.
public
encode(GoogleAnalyticsProductCollection $collection, int $option) : string
Parameters
- $collection : GoogleAnalyticsProductCollection
-
Product collection to be encoded.
- $option : int
-
Option flag, use a "JSON_" constant flag.
Return values
string —Json encoded product collection.
serialize()
Serializes the given product collection into an array.
public
serialize(GoogleAnalyticsProductCollection $collection) : array<string|int, mixed>
Parameters
- $collection : GoogleAnalyticsProductCollection
-
Product collection to be serialized.
Return values
array<string|int, mixed> —Serialized product collection.