GoogleAnalyticsProductPropertyCollection
in package
Class GoogleAnalyticsProductPropertyCollection
Table of Contents
- $items : array<string|int, GoogleAnalyticsProductProperty>
- $optionIds : array<string|int, mixed>
- $valueIds : array<string|int, mixed>
- collect() : GoogleAnalyticsProductPropertyCollection
- Named constructor of GoogleAnalyticsProductPropertyCollection.
- collectFromArray() : GoogleAnalyticsProductPropertyCollection
- Named constructor of GoogleAnalyticsProductsDataSetCollection.
- isEmpty() : bool
- Checks if collection is empty.
- optionIds() : array<string|int, mixed>
- Returns the option ids of all properties in the collection.
- toArray() : array<string|int, GoogleAnalyticsProductProperty>
- Returns the collected product property list items.
- valueIds() : array<string|int, mixed>
- Returns the value ids of all properties in the collection.
- __construct() : mixed
- GoogleAnalyticsProductPropertyCollection constructor.
- add() : $this
- Adds the given product property to the collection.
Properties
$items
private
array<string|int, GoogleAnalyticsProductProperty>
$items
= []
$optionIds
private
array<string|int, mixed>
$optionIds
= []
$valueIds
private
array<string|int, mixed>
$valueIds
= []
Methods
collect()
Named constructor of GoogleAnalyticsProductPropertyCollection.
public
static collect(array<string|int, GoogleAnalyticsProductProperty> $products) : GoogleAnalyticsProductPropertyCollection
Parameters
- $products : array<string|int, GoogleAnalyticsProductProperty>
-
Product properties data.
Return values
GoogleAnalyticsProductPropertyCollection —New instance.
collectFromArray()
Named constructor of GoogleAnalyticsProductsDataSetCollection.
public
static collectFromArray(array<string|int, mixed> $properties) : GoogleAnalyticsProductPropertyCollection
This way allows to create the collection by passing a well formatted array as argument.
Parameters
- $properties : array<string|int, mixed>
-
Array with information about the product properties.
Return values
GoogleAnalyticsProductPropertyCollection —isEmpty()
Checks if collection is empty.
public
isEmpty() : bool
Return values
bool —optionIds()
Returns the option ids of all properties in the collection.
public
optionIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —toArray()
Returns the collected product property list items.
public
toArray() : array<string|int, GoogleAnalyticsProductProperty>
Return values
array<string|int, GoogleAnalyticsProductProperty> —valueIds()
Returns the value ids of all properties in the collection.
public
valueIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —__construct()
GoogleAnalyticsProductPropertyCollection constructor.
protected
__construct(array<string|int, GoogleAnalyticsProductProperty> $products) : mixed
Protected to enforce usage of named constructor.
Parameters
- $products : array<string|int, GoogleAnalyticsProductProperty>
-
Product properties data.
Return values
mixed —add()
Adds the given product property to the collection.
protected
add(GoogleAnalyticsProductProperty $property) : $this
Parameters
- $property : GoogleAnalyticsProductProperty
Return values
$this —Same instance for chained method calls.