File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
abstract class ContactFactory
9
9
{
10
- public static function getAll ()
10
+ public static function getAll ($ custom_config = NULL )
11
11
{
12
- $ client = GoogleHelper::getClient ();
12
+ $ client = GoogleHelper::getClient ($ custom_config );
13
13
14
14
$ req = new \Google_Http_Request ('https://www.google.com/m8/feeds/contacts/default/full?max-results=10000&updated-min=2007-03-16T00:00:00 ' );
15
15
Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ public static function initConfig(
21
21
self ::$ _config ->refreshToken = $ refreshToken ;
22
22
}
23
23
24
- private static function loadConfig ()
24
+ private static function loadConfig ($ custom_config = NULL )
25
25
{
26
+ self ::$ _config = $ custom_config ;
26
27
if (NULL === self ::$ _config ) {
27
28
$ configPath = __DIR__ .'/../../../../.config.json ' ;
28
29
if (!file_exists ($ configPath )) throw new \Exception ('Not found config.json ' );
@@ -33,9 +34,9 @@ private static function loadConfig()
33
34
return self ::$ _config ;
34
35
}
35
36
36
- public static function getClient ()
37
+ public static function getClient ($ custom_config = NULL )
37
38
{
38
- $ config = self ::loadConfig ();
39
+ $ config = self ::loadConfig ($ custom_config );
39
40
40
41
$ client = new \Google_Client ();
41
42
You can’t perform that action at this time.
0 commit comments