1 | <?php |
||
20 | class JCFirebase |
||
21 | { |
||
22 | public $firebaseURI; |
||
23 | public $firebaseDefaultPath; |
||
24 | |||
25 | |||
26 | /** |
||
27 | * @var OAuth |
||
28 | */ |
||
29 | protected $auth; |
||
30 | |||
31 | public $requestHeader = array( |
||
32 | 'accept' => 'application/json', |
||
33 | 'contentType' => 'application/json; charset=utf-8', |
||
34 | 'dataType' => 'json' |
||
35 | ); |
||
36 | |||
37 | public $requestOptions = array(); |
||
38 | |||
39 | public function __construct($firebaseURI,$firebaseSerivceAccount = '',$firebaseDefaultPath = '/') |
||
45 | |||
46 | public function setAuth($firebaseServiceAccount){ |
||
51 | |||
52 | public function getPathURI($path = '',$print = ''){ |
||
86 | |||
87 | /** |
||
88 | * @param string $path |
||
89 | * @param array $options |
||
90 | * @return \Requests_Response |
||
91 | */ |
||
92 | public function get($path = '',$options = array()){ |
||
100 | |||
101 | public function getShallow($path = '',$options = array()){ |
||
110 | |||
111 | /** |
||
112 | * @param string $path |
||
113 | * @param array $options |
||
114 | * @return \Requests_Response |
||
115 | */ |
||
116 | public function put($path = '',$options = array()){ |
||
121 | |||
122 | /** |
||
123 | * @param string $path |
||
124 | * @param array $options |
||
125 | * @return \Requests_Response |
||
126 | */ |
||
127 | public function post($path = '',$options = array()){ |
||
132 | |||
133 | /** |
||
134 | * @param string $path |
||
135 | * @param array $options |
||
136 | * @return \Requests_Response |
||
137 | */ |
||
138 | public function patch($path = '',$options = array()){ |
||
143 | |||
144 | /** |
||
145 | * @param string $path |
||
146 | * @param array $options |
||
147 | * @return \Requests_Response |
||
148 | */ |
||
149 | public function delete($path = '',$options = array()){ |
||
154 | |||
155 | protected function mergeRequestOptions($options = array(),$jsonEncode = false){ |
||
168 | |||
169 | protected function mergeRequestPathURI($path='',$options = array(),$reqType = JCFirebaseOption::REQ_TYPE_GET){ |
||
178 | |||
179 | protected function refreshToken(){ |
||
182 | } |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.