PHP Class Spatie\Analytics\AnalyticsClient

Afficher le fichier Open project: spatie/laravel-analytics Class Usage Examples

Protected Properties

Свойство Type Description
$cache Illuminate\Contracts\Cache\Repository
$cacheLifeTimeInMinutes integer
$service Google_Service_Analytics

Méthodes publiques

Méthode Description
__construct ( Google_Service_Analytics $service, Illuminate\Contracts\Cache\Repository $cache )
getAnalyticsService ( ) : Google_Service_Analytics
performQuery ( string $viewId, DateTime $startDate, DateTime $endDate, string $metrics, array $others = [] ) : array | null Query the Google Analytics Service with given parameters.
setCacheLifeTimeInMinutes ( integer $cacheLifeTimeInMinutes ) : self Set the cache time.

Méthodes protégées

Méthode Description
determineCacheName ( array $properties ) : string * Determine the cache name for the set of query properties given.

Method Details

__construct() public méthode

public __construct ( Google_Service_Analytics $service, Illuminate\Contracts\Cache\Repository $cache )
$service Google_Service_Analytics
$cache Illuminate\Contracts\Cache\Repository

determineCacheName() protected méthode

* Determine the cache name for the set of query properties given.
protected determineCacheName ( array $properties ) : string
$properties array
Résultat string

getAnalyticsService() public méthode

public getAnalyticsService ( ) : Google_Service_Analytics
Résultat Google_Service_Analytics

performQuery() public méthode

Query the Google Analytics Service with given parameters.
public performQuery ( string $viewId, DateTime $startDate, DateTime $endDate, string $metrics, array $others = [] ) : array | null
$viewId string
$startDate DateTime
$endDate DateTime
$metrics string
$others array
Résultat array | null

setCacheLifeTimeInMinutes() public méthode

Set the cache time.
public setCacheLifeTimeInMinutes ( integer $cacheLifeTimeInMinutes ) : self
$cacheLifeTimeInMinutes integer
Résultat self

Property Details

$cache protected_oe property

protected Repository,Illuminate\Contracts\Cache $cache
Résultat Illuminate\Contracts\Cache\Repository

$cacheLifeTimeInMinutes protected_oe property

protected int $cacheLifeTimeInMinutes
Résultat integer

$service protected_oe property

protected Google_Service_Analytics $service
Résultat Google_Service_Analytics