phpDocumentor

GoogleAnalyticsProductSerializer
in package

Class GoogleAnalyticsProductSerializer

Table of Contents

encode()  : string
Encodes the given product value object into a json string.
serialize()  : array<string|int, mixed>
Serializes the given product value object into an array.
_tryToSet()  : $this|GoogleAnalyticsProductSerializer
Tries to set a new property, if the value is not null.

Methods

_tryToSet()

Tries to set a new property, if the value is not null.

protected _tryToSet(GoogleAnalyticsProductInterface $product, string $property, array<string|int, mixed> &$data) : $this|GoogleAnalyticsProductSerializer
Parameters
$product : GoogleAnalyticsProductInterface

Product value object to be serialized.

$property : string

Name of properties accessor method.

$data : array<string|int, mixed>

Final serialized data array.

Return values
$this|GoogleAnalyticsProductSerializer

Same instance for chained method calls.

Search results