@@ 1404-1417 (lines=14) @@ | ||
1401 | * |
|
1402 | * @author Dmitry (dio) Levashov |
|
1403 | **/ |
|
1404 | protected function _fopen($path, $mode = 'rb') |
|
1405 | { |
|
1406 | if ($mode === 'rb' || $mode === 'r') { |
|
1407 | list(, $itemId) = $this->_bd_splitPath($path); |
|
1408 | $data = [ |
|
1409 | 'target' => self::API_URL.'/files/'.$itemId.'/content', |
|
1410 | 'headers' => ['Authorization: Bearer '.$this->token->data->access_token], |
|
1411 | ]; |
|
1412 | ||
1413 | return elFinder::getStreamByUrl($data); |
|
1414 | } |
|
1415 | ||
1416 | return false; |
|
1417 | } |
|
1418 | ||
1419 | /** |
|
1420 | * Close opened file. |
@@ 1305-1318 (lines=14) @@ | ||
1302 | * |
|
1303 | * @author Dmitry (dio) Levashov |
|
1304 | **/ |
|
1305 | protected function _fopen($path, $mode = 'rb') |
|
1306 | { |
|
1307 | if ($mode === 'rb' || $mode === 'r') { |
|
1308 | list(, $itemId) = $this->_od_splitPath($path); |
|
1309 | $data = [ |
|
1310 | 'target' => self::API_URL.$itemId.'/content', |
|
1311 | 'headers' => ['Authorization: Bearer '.$this->token->data->access_token], |
|
1312 | ]; |
|
1313 | ||
1314 | return elFinder::getStreamByUrl($data); |
|
1315 | } |
|
1316 | ||
1317 | return false; |
|
1318 | } |
|
1319 | ||
1320 | /** |
|
1321 | * Close opened file. |