Backend\Modules\Analytics\GoogleClient\ClientFactory::createClient PHP Метод

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

Creates a google client
public createClient ( ) : Google_Client
Результат Google_Client
    public function createClient()
    {
        $config = new \Google_Config();
        $config->setClassConfig('Google_Cache_File', array('directory' => $this->cacheDir));
        $client = new \Google_Client($config);
        // set assertion credentials
        $client->setAssertionCredentials(new \Google_Auth_AssertionCredentials($this->settings->get('Analytics', 'email'), array('https://www.googleapis.com/auth/analytics.readonly'), base64_decode($this->settings->get('Analytics', 'certificate'))));
        $client->setAccessType('offline_access');
        return $client;
    }