File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 25
25
}
26
26
],
27
27
"require" : {
28
- "php-opencloud/common" : " ~ 1.0"
28
+ "php-opencloud/common" : " ^ 1.0.5 "
29
29
},
30
30
"require-dev" : {
31
31
"phpunit/phpunit" : " ~4.0" ,
32
32
"sami/sami" : " dev-master" ,
33
33
"psr/log" : " ~1.0" ,
34
34
"satooshi/php-coveralls" : " ~1.0" ,
35
35
"jakub-onderka/php-parallel-lint" : " 0.*" ,
36
- "fabpot /php-cs-fixer" : " ~ 1.0"
36
+ "friendsofphp /php-cs-fixer" : " ^ 1.0"
37
37
}
38
38
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class OpenStack
20
20
private $ builder ;
21
21
22
22
/**
23
- * @param array $options User-defined options
23
+ * @param array $options User-defined options
24
24
*
25
25
* $options['username'] = (string) Your OpenStack username [REQUIRED]
26
26
* ['password'] = (string) Your OpenStack password [REQUIRED]
@@ -30,6 +30,9 @@ class OpenStack
30
30
* ['debugLog'] = (bool) Whether to enable HTTP logging [OPTIONAL]
31
31
* ['logger'] = (LoggerInterface) Must set if debugLog is true [OPTIONAL]
32
32
* ['messageFormatter'] = (MessageFormatter) Must set if debugLog is true [OPTIONAL]
33
+ * ['requestOptions'] = (array) Guzzle Http request options [OPTIONAL]
34
+ *
35
+ * @param Builder $builder
33
36
*/
34
37
public function __construct (array $ options = [], Builder $ builder = null )
35
38
{
@@ -51,10 +54,16 @@ private function getDefaultIdentityService(array $options): Service
51
54
throw new \InvalidArgumentException ("'authUrl' is a required option " );
52
55
}
53
56
54
- return Service:: factory ( new Client ( [
57
+ $ clientOptions = [
55
58
'base_uri ' => Utils::normalizeUrl ($ options ['authUrl ' ]),
56
59
'handler ' => HandlerStack::create (),
57
- ]));
60
+ ];
61
+
62
+ if (isset ($ options ['requestOptions ' ])) {
63
+ $ clientOptions = array_merge ($ options ['requestOptions ' ], $ clientOptions );
64
+ }
65
+
66
+ return Service::factory (new Client ($ clientOptions ));
58
67
}
59
68
60
69
/**
You can’t perform that action at this time.
0 commit comments