Commit 2e1db97a89ed3e298d285caaa7363bbdc2396eef

Authored by Alex Savenko
1 parent c0ced521

test google lib

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
app/library/App/Bootstrap/RouteBootstrap.php
@@ -7,6 +7,8 @@ use App\Constants\Services; @@ -7,6 +7,8 @@ use App\Constants\Services;
7 use Phalcon\Config; 7 use Phalcon\Config;
8 use Phalcon\DiInterface; 8 use Phalcon\DiInterface;
9 use PhalconRest\Api; 9 use PhalconRest\Api;
  10 +use Google_Client;
  11 +use Google_Service_AnalyticsReporting;
10 12
11 class RouteBootstrap implements BootstrapInterface 13 class RouteBootstrap implements BootstrapInterface
12 { 14 {
@@ -45,9 +47,12 @@ class RouteBootstrap implements BootstrapInterface @@ -45,9 +47,12 @@ class RouteBootstrap implements BootstrapInterface
45 /** @var \Phalcon\Mvc\View\Simple $view */ 47 /** @var \Phalcon\Mvc\View\Simple $view */
46 $view = $api->di->get(Services::VIEW); 48 $view = $api->di->get(Services::VIEW);
47 49
48 - $client = new \Google_Client(); 50 + $client = new Google_Client();
  51 + $api_key = 'AIzaSyCXzrwqxLN2bCvBhw2cJfdeEu9aj1aH5b8';
  52 + $client->setDeveloperKey($api_key);
  53 + $analytics = new Google_Service_AnalyticsReporting($client);
49 54
50 - $var_2 = var_dump($client); 55 + $var_2 = var_dump($analytics);
51 56
52 $msg = "testing fine"; 57 $msg = "testing fine";
53 58