PHP Class TheIconic\Tracking\GoogleAnalytics\Parameters\CompoundParameter

A compound parameter represents a set of parameters that are part of a collection. There is a parameter name mapper that maps a human readable name that is used for passing the data into the real name that goes in the payload.
Inheritance: implements TheIconic\Tracking\GoogleAnalytics\Parameters\CompoundParameterInterface
Show file Open project: theiconic/php-ga-measurement-protocol Class Usage Examples

Protected Properties

Property Type Description
$parameterNameMapper array Maps a human readable name used when initializing the compound parameter into the real name used in the payload.
$parameters array After translating the human readable names into the payload ones, this collections contains the map for the payload names and the values to be sent.
$readableParameters array After translating the human readable names into the payload ones, this collections contains the map for the payload names and the values to be sent.
$requiredParameters array They are in the same human readable name as in the mapper above.

Public Methods

Method Description
__construct ( array $compoundData ) Validates the required parameters are passed, then translates using the mapper to later save along with the values.
getParameters ( )
getReadableParameters ( )

Protected Methods

Method Description
saveCompoundParameterData ( array $compoundData ) Translates the human readable names into the payload ones and saves them along with the values.

Method Details

__construct() public method

Validates the required parameters are passed, then translates using the mapper to later save along with the values.
public __construct ( array $compoundData )
$compoundData array

getParameters() public method

public getParameters ( )

getReadableParameters() public method

saveCompoundParameterData() protected method

Translates the human readable names into the payload ones and saves them along with the values.
protected saveCompoundParameterData ( array $compoundData )
$compoundData array

Property Details

$parameterNameMapper protected property

Maps a human readable name used when initializing the compound parameter into the real name used in the payload.
protected array $parameterNameMapper
return array

$parameters protected property

After translating the human readable names into the payload ones, this collections contains the map for the payload names and the values to be sent.
protected array $parameters
return array

$readableParameters protected property

After translating the human readable names into the payload ones, this collections contains the map for the payload names and the values to be sent.
protected array $readableParameters
return array

$requiredParameters protected property

They are in the same human readable name as in the mapper above.
protected array $requiredParameters
return array