GoogleAnalyticsVariant
in package
implements
GoogleAnalyticsVariantInterface
Class GoogleAnalyticsVariant
Interfaces, Classes and Traits
- GoogleAnalyticsVariantInterface
- Interface GoogleAnalyticsVariantInterface
Table of Contents
- $attributes : GoogleAnalyticsProductAttributeCollection
- $properties : GoogleAnalyticsProductPropertyCollection
- attributes() : GoogleAnalyticsProductAttributeCollection
- Returns the attributes, if exists.
- attributesOnly() : bool
- Returns true if only attributes exists in variant.
- both() : bool
- Returns true if properties and attributes exists in variant.
- collect() : GoogleAnalyticsVariant
- Named constructor of GoogleAnalyticsVariant.
- collectFromArrays() : GoogleAnalyticsVariant
- Named constructor of GoogleAnalyticsVariant.
- properties() : GoogleAnalyticsProductPropertyCollection
- Returns the properties, if exists.
- propertiesOnly() : bool
- Returns true if only properties exists in variant.
- __construct() : mixed
- GoogleAnalyticsVariant constructor.
Properties
$attributes
protected
GoogleAnalyticsProductAttributeCollection
$attributes
$properties
protected
GoogleAnalyticsProductPropertyCollection
$properties
Methods
attributes()
Returns the attributes, if exists.
public
attributes() : GoogleAnalyticsProductAttributeCollection
Return values
GoogleAnalyticsProductAttributeCollection —attributesOnly()
Returns true if only attributes exists in variant.
public
attributesOnly() : bool
Return values
bool —both()
Returns true if properties and attributes exists in variant.
public
both() : bool
Return values
bool —collect()
Named constructor of GoogleAnalyticsVariant.
public
static collect(GoogleAnalyticsProductPropertyCollection $properties, GoogleAnalyticsProductAttributeCollection $attributes) : GoogleAnalyticsVariant
Parameters
- $properties : GoogleAnalyticsProductPropertyCollection
-
Product properties, if exists.
- $attributes : GoogleAnalyticsProductAttributeCollection
-
Product attributes, if exists.
Return values
GoogleAnalyticsVariant —New instance.
collectFromArrays()
Named constructor of GoogleAnalyticsVariant.
public
static collectFromArrays(array<string|int, mixed> $properties, array<string|int, mixed> $attributes) : GoogleAnalyticsVariant
Parameters
- $properties : array<string|int, mixed>
-
Array with product properties, if exists.
- $attributes : array<string|int, mixed>
-
Array with product attributes, if exists.
Return values
GoogleAnalyticsVariant —New instance.
properties()
Returns the properties, if exists.
public
properties() : GoogleAnalyticsProductPropertyCollection
Return values
GoogleAnalyticsProductPropertyCollection —propertiesOnly()
Returns true if only properties exists in variant.
public
propertiesOnly() : bool
Return values
bool —__construct()
GoogleAnalyticsVariant constructor.
protected
__construct(GoogleAnalyticsProductPropertyCollection $properties, GoogleAnalyticsProductAttributeCollection $attributes) : mixed
Protected to enforce usage of named constructor.
Parameters
- $properties : GoogleAnalyticsProductPropertyCollection
-
Product properties, if exists.
- $attributes : GoogleAnalyticsProductAttributeCollection
-
Product attributes, if exists.