PHP Класс Spatie\Analytics\AnalyticsClient

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cache Illuminate\Contracts\Cache\Repository
$cacheLifeTimeInMinutes integer
$service Google_Service_Analytics

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
determineCacheName ( array $properties ) : string * Determine the cache name for the set of query properties given.

Описание методов

__construct() публичный Метод

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

determineCacheName() защищенный Метод

* Determine the cache name for the set of query properties given.
protected determineCacheName ( array $properties ) : string
$properties array
Результат string

getAnalyticsService() публичный Метод

public getAnalyticsService ( ) : Google_Service_Analytics
Результат Google_Service_Analytics

performQuery() публичный Метод

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
Результат array | null

setCacheLifeTimeInMinutes() публичный Метод

Set the cache time.
public setCacheLifeTimeInMinutes ( integer $cacheLifeTimeInMinutes ) : self
$cacheLifeTimeInMinutes integer
Результат self

Описание свойств

$cache защищенное свойство

protected Repository,Illuminate\Contracts\Cache $cache
Результат Illuminate\Contracts\Cache\Repository

$cacheLifeTimeInMinutes защищенное свойство

protected int $cacheLifeTimeInMinutes
Результат integer

$service защищенное свойство

protected Google_Service_Analytics $service
Результат Google_Service_Analytics