PHP Trait Kurt\Google\Analytics\Traits\Handlers\MetricsHandler

Mostrar archivo Open project: ozankurt/google-analytics

Public Methods

Method Description
getMetrics ( ) : array Get the metrics of current query.
mergeMetrics ( string | array $newMetrics ) Convert $newMetrics to array if string given and pass the array to a helper function.
setMetrics ( $metrics ) Set the metrics of current query while converting string values to array.

Private Methods

Method Description
getMetricsAsString ( ) : string Get the metrics of current query as string.
mergeNewMetricsToCurrentOnes ( array $newMetrics ) : array Merge $newMetrics with current ones.
metricsAreSet ( ) Determine if metrics are set.

Method Details

getMetrics() public method

Get the metrics of current query.
public getMetrics ( ) : array
return array

mergeMetrics() public method

Convert $newMetrics to array if string given and pass the array to a helper function.
public mergeMetrics ( string | array $newMetrics )
$newMetrics string | array

setMetrics() public method

Set the metrics of current query while converting string values to array.
public setMetrics ( $metrics )