@@ -21,23 +21,23 @@ class GithubAdapter extends AbstractAdapter
2121 const VISIBILITY_PRIVATE = 'private ' ;
2222 const VISIBILITY_PUBLIC = 'public ' ;
2323
24- /** @var ClientInterface */
25- private $ client ;
24+ /** @var ApiInterface */
25+ private $ api ;
2626
2727 /**
28- * @return ClientInterface
28+ * @return ApiInterface
2929 */
30- final public function getClient ()
30+ final public function getApi ()
3131 {
32- return $ this ->client ;
32+ return $ this ->api ;
3333 }
3434
3535 /**
36- * @param ClientInterface $client
36+ * @param ApiInterface $api
3737 */
38- public function __construct (ClientInterface $ client )
38+ public function __construct (ApiInterface $ api )
3939 {
40- $ this ->client = $ client ;
40+ $ this ->api = $ api ;
4141 }
4242
4343 /**
@@ -52,7 +52,7 @@ public function __construct(ClientInterface $client)
5252 public function write ($ path , $ contents , Config $ config )
5353 {
5454 throw new Exception ('Write action are not (yet) supported ' );
55- //@TODO: return $this->getClient ()->create($path, $contents);
55+ //@TODO: return $this->getApi ()->create($path, $contents);
5656 }
5757
5858 /**
@@ -67,7 +67,7 @@ public function write($path, $contents, Config $config)
6767 public function update ($ path , $ contents , Config $ config )
6868 {
6969 throw new Exception ('Write action are not (yet) supported ' );
70- // @TODO: return $this->getClient ()->update($path, $contents);
70+ // @TODO: return $this->getApi ()->update($path, $contents);
7171 }
7272
7373 /**
@@ -81,7 +81,7 @@ public function update($path, $contents, Config $config)
8181 public function rename ($ path , $ newpath )
8282 {
8383 throw new Exception ('Write action are not (yet) supported ' );
84- // @TODO: return $this->getClient ()->rename($path, $newPath);
84+ // @TODO: return $this->getApi ()->rename($path, $newPath);
8585 }
8686
8787 /**
@@ -95,7 +95,7 @@ public function rename($path, $newpath)
9595 public function copy ($ path , $ newpath )
9696 {
9797 throw new Exception ('Write action are not (yet) supported ' );
98- // @TODO: return $this->getClient ()->copy($path, $newPath);
98+ // @TODO: return $this->getApi ()->copy($path, $newPath);
9999 }
100100
101101 /**
@@ -108,7 +108,7 @@ public function copy($path, $newpath)
108108 public function delete ($ path )
109109 {
110110 throw new Exception ('Write action are not (yet) supported ' );
111- // @TODO: return $this->getClient ()->delete($path);
111+ // @TODO: return $this->getApi ()->delete($path);
112112 }
113113
114114 /**
@@ -121,7 +121,7 @@ public function delete($path)
121121 public function deleteDir ($ dirname )
122122 {
123123 throw new Exception ('Write action are not (yet) supported ' );
124- // @TODO: return $this->getClient ()->deleteDir($dirname);
124+ // @TODO: return $this->getApi ()->deleteDir($dirname);
125125 }
126126
127127 /**
@@ -135,7 +135,7 @@ public function deleteDir($dirname)
135135 public function createDir ($ dirname , Config $ config )
136136 {
137137 throw new Exception ('Write action are not (yet) supported ' );
138- // @TODO: return $this->getClient ()->createDir($dirname);
138+ // @TODO: return $this->getApi ()->createDir($dirname);
139139 }
140140
141141 /**
@@ -160,7 +160,7 @@ public function setVisibility($path, $visibility)
160160 */
161161 public function has ($ path )
162162 {
163- return $ this ->getClient ()->exists ($ path );
163+ return $ this ->getApi ()->exists ($ path );
164164 }
165165
166166 /**
@@ -172,7 +172,7 @@ public function has($path)
172172 */
173173 public function read ($ path )
174174 {
175- return [ClientInterface ::KEY_CONTENTS => $ this ->getClient ()->getFileContents ($ path )];
175+ return [ApiInterface ::KEY_CONTENTS => $ this ->getApi ()->getFileContents ($ path )];
176176 }
177177
178178 /**
@@ -185,7 +185,7 @@ public function read($path)
185185 */
186186 public function listContents ($ path = '/ ' , $ recursive = false )
187187 {
188- return $ this ->getClient ()->getRecursiveMetadata ($ path , $ recursive );
188+ return $ this ->getApi ()->getRecursiveMetadata ($ path , $ recursive );
189189 }
190190
191191 /**
@@ -197,7 +197,7 @@ public function listContents($path = '/', $recursive = false)
197197 */
198198 public function getMetadata ($ path )
199199 {
200- return $ this ->getClient ()->getMetaData ($ path );
200+ return $ this ->getApi ()->getMetaData ($ path );
201201 }
202202
203203 /**
@@ -209,7 +209,7 @@ public function getMetadata($path)
209209 */
210210 public function getSize ($ path )
211211 {
212- return $ this ->getClient ()->getMetaData ($ path );
212+ return $ this ->getApi ()->getMetaData ($ path );
213213 }
214214
215215 /**
@@ -221,7 +221,7 @@ public function getSize($path)
221221 */
222222 public function getMimetype ($ path )
223223 {
224- return ['mimetype ' => $ this ->getClient ()->guessMimeType ($ path )];
224+ return ['mimetype ' => $ this ->getApi ()->guessMimeType ($ path )];
225225 }
226226
227227 /**
@@ -233,7 +233,7 @@ public function getMimetype($path)
233233 */
234234 public function getTimestamp ($ path )
235235 {
236- return $ this ->getClient ()->getLastUpdatedTimestamp ($ path );
236+ return $ this ->getApi ()->getLastUpdatedTimestamp ($ path );
237237 }
238238
239239 /**
@@ -246,7 +246,7 @@ public function getTimestamp($path)
246246 public function getVisibility ($ path )
247247 {
248248 $ recursive = false ;
249- $ metadata = $ this ->getClient ()->getRecursiveMetadata ($ path , $ recursive );
249+ $ metadata = $ this ->getApi ()->getRecursiveMetadata ($ path , $ recursive );
250250 return $ metadata [0 ];
251251 }
252252}
0 commit comments