@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | public function getPathURI($path = '',$print = ''){ |
41 | 41 | //remove last slash from firebaseURI |
42 | 42 | $template = '/'; |
43 | - $this->firebaseURI = rtrim($this->firebaseURI,$template); |
|
44 | - $path = rtrim($path,$template); |
|
45 | - $path = ltrim($path,$template); |
|
43 | + $this->firebaseURI = rtrim($this->firebaseURI,$template); |
|
44 | + $path = rtrim($path,$template); |
|
45 | + $path = ltrim($path,$template); |
|
46 | 46 | |
47 | 47 | //check https |
48 | 48 | if(strpos($this->firebaseURI, 'http://') !== false){ |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | if(strpos($this->firebaseDefaultPath,"/") !== 0){ |
58 | - throw new \Exception("firebase default path must contain /"); |
|
58 | + throw new \Exception("firebase default path must contain /"); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $pathURI = $this->firebaseURI.$this->firebaseDefaultPath.$path.".json"; |
@@ -43,6 +43,9 @@ |
||
43 | 43 | $this->setAuth($firebaseSerivceAccount); |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param string $firebaseServiceAccount |
|
48 | + */ |
|
46 | 49 | public function setAuth($firebaseServiceAccount){ |
47 | 50 | if(isset($firebaseServiceAccount['key']) && isset($firebaseServiceAccount['iss'])){ |
48 | 51 | $this->auth = new OAuth($firebaseServiceAccount['key'],$firebaseServiceAccount['iss']); |