From 028282abe693662920f230c1fd3f63c3f515aa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=CC=8Cygimantas=20Kazlauskas?= Date: Thu, 9 Jul 2015 19:17:16 +0300 Subject: [PATCH 1/3] Testing apiclient config --- src/Thujohn/Analytics/AnalyticsServiceProvider.php | 3 +++ src/config/config.php | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Thujohn/Analytics/AnalyticsServiceProvider.php b/src/Thujohn/Analytics/AnalyticsServiceProvider.php index d9a445a..bcd3f71 100644 --- a/src/Thujohn/Analytics/AnalyticsServiceProvider.php +++ b/src/Thujohn/Analytics/AnalyticsServiceProvider.php @@ -51,6 +51,9 @@ public function register() ) ); + foreach ($app['config']->get('analytics::apiclient_config') as $key => $value) + $client->setClassConfig($key, $value); + return new Analytics($client); }); diff --git a/src/config/config.php b/src/config/config.php index daecb43..31bae84 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -69,4 +69,17 @@ */ 'use_objects' => true, + + + /* + |-------------------------------------------------------------------------- + | Google apiclient config + |-------------------------------------------------------------------------- + */ + + 'apiclient_config' => array( + 'Google_Cache_File' => array( + 'directory' => storage_path() . '/Google_Client' + ) + ), ); From 907d295c3b5ae0821d9b8bea2bf225e2ddb4b501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=CC=8Cygimantas=20Kazlauskas?= Date: Tue, 14 Jul 2015 20:51:26 +0300 Subject: [PATCH 2/3] config.php description --- src/config/config.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/config/config.php b/src/config/config.php index 31bae84..1137815 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -73,13 +73,21 @@ /* |-------------------------------------------------------------------------- - | Google apiclient config + | Google API client config |-------------------------------------------------------------------------- + | + | Povides Google API client configuration. + | (https://github.com/google/google-api-php-client) + | + | Example: + | 'apiclient_config' => array( + | 'application_name' = "My App", + | 'Google_Cache_File' => array( + | 'directory' => storage_path() . '/Google_Client' + | ) + | ), */ 'apiclient_config' => array( - 'Google_Cache_File' => array( - 'directory' => storage_path() . '/Google_Client' - ) ), ); From d13b9c600a6cb927823d4f4ec4294c943418e49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=CC=8Cygimantas=20Kazlauskas?= Date: Tue, 14 Jul 2015 20:57:36 +0300 Subject: [PATCH 3/3] config.php description 2 --- src/config/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/config.php b/src/config/config.php index 1137815..1ed631a 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -83,8 +83,8 @@ | 'apiclient_config' => array( | 'application_name' = "My App", | 'Google_Cache_File' => array( - | 'directory' => storage_path() . '/Google_Client' - | ) + | 'directory' => storage_path() . '/Google_Client' + | ) | ), */