File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ class OrgManager
1717 * @param string $apiToken
1818 * @param string $rootUrl
1919 */
20- public function __construct (Client $ client , $ apiToken = null , $ rootUrl = 'https://orgmanager.miguelpiedrafita.com ' )
20+ public function __construct ($ apiToken = null , $ rootUrl = 'https://orgmanager.miguelpiedrafita.com ' )
2121 {
22- $ this ->client = $ client ;
22+ $ this ->client = new Client ;
2323
2424 $ this ->apiToken = $ apiToken ;
2525
@@ -37,6 +37,28 @@ public function connect($apiToken)
3737
3838 return $ this ->apiToken ;
3939 }
40+
41+ /**
42+ * @return \GuzzleHttp\Client
43+ */
44+ public function getClient ()
45+ {
46+ return $ this ->client ;
47+ }
48+
49+ /**
50+ * @param \GuzzleHttp\Client $client
51+ *
52+ * @return void
53+ */
54+ public function setClient ($ client = new Client ;)
55+ {
56+ if ($ client instanceof Client))
57+ {
58+ $ this ->client = $ client ;
59+ }
60+ return $ this ;
61+ }
4062
4163 /**
4264 * @return array
You can’t perform that action at this time.
0 commit comments