@@ -49,7 +49,7 @@ |
||
49 | 49 | * |
50 | 50 | * @param array $data |
51 | 51 | * |
52 | - * @return mixed |
|
52 | + * @return StreamedResponse |
|
53 | 53 | */ |
54 | 54 | protected function output(array $data) |
55 | 55 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Recca0120\Elfinder; |
4 | 4 | |
5 | -use elFinderConnector; |
|
6 | 5 | use Symfony\Component\HttpFoundation\StreamedResponse; |
6 | +use elFinderConnector; |
|
7 | 7 | |
8 | 8 | class Connector extends elFinderConnector |
9 | 9 | { |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Recca0120\Elfinder; |
4 | 4 | |
5 | -use elFinder; |
|
6 | -use Illuminate\Support\Arr; |
|
7 | 5 | use Illuminate\Routing\Router; |
6 | +use Illuminate\Support\Arr; |
|
8 | 7 | use Illuminate\Support\ServiceProvider; |
8 | +use elFinder; |
|
9 | 9 | |
10 | 10 | class ElfinderServiceProvider extends ServiceProvider |
11 | 11 | { |
@@ -46,7 +46,6 @@ |
||
46 | 46 | /** |
47 | 47 | * connector. |
48 | 48 | * |
49 | - * @param \Recca0120\Elfinder\Connector $elfinder |
|
50 | 49 | * @return mixed |
51 | 50 | */ |
52 | 51 | public function connector(Connector $connector) |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace Recca0120\Elfinder\Http\Controllers; |
4 | 4 | |
5 | +use Illuminate\Contracts\Routing\ResponseFactory; |
|
6 | +use Illuminate\Filesystem\Filesystem; |
|
5 | 7 | use Illuminate\Http\Request; |
6 | -use Recca0120\Elfinder\Connector; |
|
7 | 8 | use Illuminate\Routing\Controller; |
8 | -use Illuminate\Filesystem\Filesystem; |
|
9 | -use Illuminate\Contracts\Routing\ResponseFactory; |
|
9 | +use Recca0120\Elfinder\Connector; |
|
10 | 10 | |
11 | 11 | class ElfinderController extends Controller |
12 | 12 | { |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace Recca0120\Elfinder; |
4 | 4 | |
5 | -use Closure; |
|
6 | 5 | use ArrayObject; |
7 | -use Illuminate\Support\Arr; |
|
8 | -use Illuminate\Http\Request; |
|
9 | -use Illuminate\Filesystem\Filesystem; |
|
6 | +use Closure; |
|
10 | 7 | use Illuminate\Contracts\Routing\UrlGenerator; |
8 | +use Illuminate\Filesystem\Filesystem; |
|
9 | +use Illuminate\Http\Request; |
|
10 | +use Illuminate\Support\Arr; |
|
11 | 11 | |
12 | 12 | class Options extends ArrayObject |
13 | 13 | { |
@@ -284,7 +284,6 @@ discard block |
||
284 | 284 | * process of on netunmount |
285 | 285 | * Drop `box` & rm thumbs. |
286 | 286 | * |
287 | - * @param array $options |
|
288 | 287 | * |
289 | 288 | * @return bool |
290 | 289 | */ |
@@ -393,11 +392,9 @@ discard block |
||
393 | 392 | /** |
394 | 393 | * Obtains a new access token from OAuth. This token is valid for one hour. |
395 | 394 | * |
396 | - * @param string $clientSecret The Box client secret |
|
395 | + * @param string $client_secret The Box client secret |
|
397 | 396 | * @param string $code The code returned by Box after |
398 | 397 | * successful log in |
399 | - * @param string $redirectUri Must be the same as the redirect URI passed |
|
400 | - * to LoginUrl |
|
401 | 398 | * |
402 | 399 | * @throws \Exception Thrown if this Client instance's clientId is not set |
403 | 400 | * @throws \Exception Thrown if the redirect URI of this Client instance's |
@@ -449,7 +446,7 @@ discard block |
||
449 | 446 | /** |
450 | 447 | * Get token and auto refresh. |
451 | 448 | * |
452 | - * @return true|string error message |
|
449 | + * @return boolean error message |
|
453 | 450 | */ |
454 | 451 | protected function _bd_refreshToken() |
455 | 452 | { |
@@ -533,8 +530,8 @@ discard block |
||
533 | 530 | /** |
534 | 531 | * Creates a base cURL object which is compatible with the Box.com API. |
535 | 532 | * |
536 | - * @param string $path The path of the API call (eg. /folders/0) |
|
537 | 533 | * |
534 | + * @param string $url |
|
538 | 535 | * @return resource A compatible cURL object |
539 | 536 | */ |
540 | 537 | protected function _bd_fetch($url, $contents = false) |
@@ -582,7 +579,7 @@ discard block |
||
582 | 579 | * |
583 | 580 | * @param resource $curl |
584 | 581 | * @param bool|string $decodeOrParent |
585 | - * @param array $headers |
|
582 | + * @param string[] $headers |
|
586 | 583 | * |
587 | 584 | * @throws \Exception |
588 | 585 | * |
@@ -636,7 +633,6 @@ discard block |
||
636 | 633 | /** |
637 | 634 | * Drive query and fetchAll. |
638 | 635 | * |
639 | - * @param string $sql |
|
640 | 636 | * |
641 | 637 | * @return bool|array |
642 | 638 | */ |
@@ -740,7 +736,6 @@ discard block |
||
740 | 736 | * Get thumbnail from Box.com. |
741 | 737 | * |
742 | 738 | * @param string $path |
743 | - * @param string $size |
|
744 | 739 | * |
745 | 740 | * @return string | boolean |
746 | 741 | */ |
@@ -763,6 +758,7 @@ discard block |
||
763 | 758 | * Remove item. |
764 | 759 | * |
765 | 760 | * @param string $path file path |
761 | + * @param string $type |
|
766 | 762 | * |
767 | 763 | * @return bool |
768 | 764 | **/ |
@@ -979,7 +975,7 @@ discard block |
||
979 | 975 | * @param string $dst destination dir path |
980 | 976 | * @param string $name new file name (optionaly) |
981 | 977 | * |
982 | - * @return string|false |
|
978 | + * @return string|boolean |
|
983 | 979 | * |
984 | 980 | * @author Dmitry (dio) Levashov |
985 | 981 | * @author Naoki Sawada |
@@ -1038,7 +1034,6 @@ discard block |
||
1038 | 1034 | * Create thumnbnail and return it's URL on success. |
1039 | 1035 | * |
1040 | 1036 | * @param string $path file path |
1041 | - * @param string $mime file mime type |
|
1042 | 1037 | |
1043 | 1038 | * @return string|false |
1044 | 1039 | * |
@@ -1395,7 +1390,6 @@ discard block |
||
1395 | 1390 | * Open file and return file pointer. |
1396 | 1391 | * |
1397 | 1392 | * @param string $path file path |
1398 | - * @param bool $write open file for writing |
|
1399 | 1393 | * |
1400 | 1394 | * @return resource|false |
1401 | 1395 | * |
@@ -1421,7 +1415,7 @@ discard block |
||
1421 | 1415 | * |
1422 | 1416 | * @param resource $fp file pointer |
1423 | 1417 | * |
1424 | - * @return bool |
|
1418 | + * @return boolean|null |
|
1425 | 1419 | * |
1426 | 1420 | * @author Dmitry (dio) Levashov |
1427 | 1421 | **/ |
@@ -1505,7 +1499,7 @@ discard block |
||
1505 | 1499 | * @param string $targetDir target directory path |
1506 | 1500 | * @param string $name new file name |
1507 | 1501 | * |
1508 | - * @return string|false |
|
1502 | + * @return string|boolean |
|
1509 | 1503 | * |
1510 | 1504 | * @author Dmitry (dio) Levashov |
1511 | 1505 | **/ |
@@ -1552,7 +1546,7 @@ discard block |
||
1552 | 1546 | * Return new file path or false. |
1553 | 1547 | * |
1554 | 1548 | * @param string $source source file path |
1555 | - * @param string $target target dir path |
|
1549 | + * @param string $targetDir target dir path |
|
1556 | 1550 | * @param string $name file name |
1557 | 1551 | * |
1558 | 1552 | * @return string|bool |
@@ -1630,7 +1624,6 @@ discard block |
||
1630 | 1624 | * Return new file path or false on error. |
1631 | 1625 | * |
1632 | 1626 | * @param resource $fp file pointer |
1633 | - * @param string $dir target dir path |
|
1634 | 1627 | * @param string $name file name |
1635 | 1628 | * @param array $stat file stat (required by some virtual fs) |
1636 | 1629 | * |
@@ -1729,7 +1722,7 @@ discard block |
||
1729 | 1722 | * @param string $path file path |
1730 | 1723 | * @param string $content new file content |
1731 | 1724 | * |
1732 | - * @return bool |
|
1725 | + * @return string|boolean |
|
1733 | 1726 | * |
1734 | 1727 | * @author Dmitry (dio) Levashov |
1735 | 1728 | **/ |
@@ -1791,7 +1784,7 @@ discard block |
||
1791 | 1784 | * |
1792 | 1785 | * @param string $path file/dir path |
1793 | 1786 | * |
1794 | - * @return bool |
|
1787 | + * @return boolean|null |
|
1795 | 1788 | * |
1796 | 1789 | * @author Dmitry (dio) Levashov |
1797 | 1790 | **/ |
@@ -295,7 +295,6 @@ discard block |
||
295 | 295 | * process of on netunmount |
296 | 296 | * Drop `Dropbox` & rm thumbs. |
297 | 297 | * |
298 | - * @param array $options |
|
299 | 298 | * |
300 | 299 | * @return bool |
301 | 300 | */ |
@@ -402,7 +401,7 @@ discard block |
||
402 | 401 | * |
403 | 402 | * @param string $path |
404 | 403 | * |
405 | - * @return array |
|
404 | + * @return string[] |
|
406 | 405 | */ |
407 | 406 | protected function _db_splitPath($path) |
408 | 407 | { |
@@ -489,7 +488,6 @@ discard block |
||
489 | 488 | * Get thumbnail from Dropbox. |
490 | 489 | * |
491 | 490 | * @param string $path |
492 | - * @param string $size |
|
493 | 491 | * |
494 | 492 | * @return string | boolean |
495 | 493 | */ |
@@ -506,7 +504,7 @@ discard block |
||
506 | 504 | * Join dir name and file name(display name) and retur full path. |
507 | 505 | * |
508 | 506 | * @param unknown $dir |
509 | - * @param unknown $displayName |
|
507 | + * @param string $displayName |
|
510 | 508 | * |
511 | 509 | * @return string |
512 | 510 | */ |
@@ -785,7 +783,6 @@ discard block |
||
785 | 783 | * Create thumnbnail and return it's URL on success. |
786 | 784 | * |
787 | 785 | * @param string $path file path |
788 | - * @param string $mime file mime type |
|
789 | 786 | * |
790 | 787 | * @return string|false |
791 | 788 | * |
@@ -1112,7 +1109,6 @@ discard block |
||
1112 | 1109 | * Open file and return file pointer. |
1113 | 1110 | * |
1114 | 1111 | * @param string $path file path |
1115 | - * @param bool $write open file for writing |
|
1116 | 1112 | * |
1117 | 1113 | * @return resource|false |
1118 | 1114 | * |
@@ -1142,7 +1138,7 @@ discard block |
||
1142 | 1138 | * |
1143 | 1139 | * @param resource $fp file pointer |
1144 | 1140 | * |
1145 | - * @return bool |
|
1141 | + * @return boolean|null |
|
1146 | 1142 | * |
1147 | 1143 | * @author Naoki Sawada |
1148 | 1144 | **/ |
@@ -1229,7 +1225,7 @@ discard block |
||
1229 | 1225 | * Return new file path or false. |
1230 | 1226 | * |
1231 | 1227 | * @param string $source source file path |
1232 | - * @param string $target target dir path |
|
1228 | + * @param string $targetDir target dir path |
|
1233 | 1229 | * @param string $name file name |
1234 | 1230 | * |
1235 | 1231 | * @return string|bool |
@@ -1286,7 +1282,6 @@ discard block |
||
1286 | 1282 | * Return new file path or false on error. |
1287 | 1283 | * |
1288 | 1284 | * @param resource $fp file pointer |
1289 | - * @param string $dir target dir path |
|
1290 | 1285 | * @param string $name file name |
1291 | 1286 | * @param array $stat file stat (required by some virtual fs) |
1292 | 1287 | * |
@@ -1352,7 +1347,7 @@ discard block |
||
1352 | 1347 | * @param string $path file path |
1353 | 1348 | * @param string $content new file content |
1354 | 1349 | * |
1355 | - * @return bool |
|
1350 | + * @return boolean|string |
|
1356 | 1351 | * |
1357 | 1352 | * @author Naoki Sawada |
1358 | 1353 | **/ |
@@ -1414,7 +1409,7 @@ discard block |
||
1414 | 1409 | * |
1415 | 1410 | * @param string $path file/dir path |
1416 | 1411 | * |
1417 | - * @return bool |
|
1412 | + * @return boolean|null |
|
1418 | 1413 | * |
1419 | 1414 | * @author Dmitry (dio) Levashov |
1420 | 1415 | **/ |
@@ -1462,7 +1457,7 @@ discard block |
||
1462 | 1457 | * |
1463 | 1458 | * @param string $path |
1464 | 1459 | * |
1465 | - * @return object Dropbox metadata |
|
1460 | + * @return string Dropbox metadata |
|
1466 | 1461 | */ |
1467 | 1462 | private function _db_getFile($path, $fields = '') |
1468 | 1463 | { |
@@ -327,7 +327,6 @@ discard block |
||
327 | 327 | * process of on netunmount |
328 | 328 | * Drop `googledrive` & rm thumbs. |
329 | 329 | * |
330 | - * @param array $options |
|
331 | 330 | * |
332 | 331 | * @return bool |
333 | 332 | */ |
@@ -582,7 +581,6 @@ discard block |
||
582 | 581 | /** |
583 | 582 | * Get ID based path from item ID. |
584 | 583 | * |
585 | - * @param string $path |
|
586 | 584 | */ |
587 | 585 | protected function _gd_getMountPaths($id) |
588 | 586 | { |
@@ -686,7 +684,6 @@ discard block |
||
686 | 684 | * Get thumbnail from GoogleDrive.com. |
687 | 685 | * |
688 | 686 | * @param string $path |
689 | - * @param string $size |
|
690 | 687 | * |
691 | 688 | * @return string | boolean |
692 | 689 | */ |
@@ -1204,7 +1201,6 @@ discard block |
||
1204 | 1201 | * Create thumnbnail and return it's URL on success. |
1205 | 1202 | * |
1206 | 1203 | * @param string $path file path |
1207 | - * @param string $mime file mime type |
|
1208 | 1204 | * |
1209 | 1205 | * @return string|false |
1210 | 1206 | * |
@@ -1518,7 +1514,6 @@ discard block |
||
1518 | 1514 | * Open file and return file pointer. |
1519 | 1515 | * |
1520 | 1516 | * @param string $path file path |
1521 | - * @param bool $write open file for writing |
|
1522 | 1517 | * |
1523 | 1518 | * @return resource|false |
1524 | 1519 | * |
@@ -1562,7 +1557,7 @@ discard block |
||
1562 | 1557 | * |
1563 | 1558 | * @param resource $fp file pointer |
1564 | 1559 | * |
1565 | - * @return bool |
|
1560 | + * @return boolean|null |
|
1566 | 1561 | * |
1567 | 1562 | * @author Dmitry (dio) Levashov |
1568 | 1563 | **/ |
@@ -1685,7 +1680,7 @@ discard block |
||
1685 | 1680 | * Return new file path or false. |
1686 | 1681 | * |
1687 | 1682 | * @param string $source source file path |
1688 | - * @param string $target target dir path |
|
1683 | + * @param string $targetDir target dir path |
|
1689 | 1684 | * @param string $name file name |
1690 | 1685 | * |
1691 | 1686 | * @return string|bool |
@@ -1764,7 +1759,6 @@ discard block |
||
1764 | 1759 | * Return new file path or false on error. |
1765 | 1760 | * |
1766 | 1761 | * @param resource $fp file pointer |
1767 | - * @param string $dir target dir path |
|
1768 | 1762 | * @param string $name file name |
1769 | 1763 | * @param array $stat file stat (required by some virtual fs) |
1770 | 1764 | * |
@@ -1897,7 +1891,7 @@ discard block |
||
1897 | 1891 | * |
1898 | 1892 | * @param string $path file path |
1899 | 1893 | * |
1900 | - * @return string|false |
|
1894 | + * @return boolean|string |
|
1901 | 1895 | * |
1902 | 1896 | * @author Dmitry (dio) Levashov |
1903 | 1897 | **/ |
@@ -1925,7 +1919,7 @@ discard block |
||
1925 | 1919 | * @param string $path file path |
1926 | 1920 | * @param string $content new file content |
1927 | 1921 | * |
1928 | - * @return bool |
|
1922 | + * @return string|boolean |
|
1929 | 1923 | * |
1930 | 1924 | * @author Dmitry (dio) Levashov |
1931 | 1925 | **/ |
@@ -1987,7 +1981,7 @@ discard block |
||
1987 | 1981 | * |
1988 | 1982 | * @param string $path file/dir path |
1989 | 1983 | * |
1990 | - * @return bool |
|
1984 | + * @return boolean|null |
|
1991 | 1985 | * |
1992 | 1986 | * @author Dmitry (dio) Levashov |
1993 | 1987 | **/ |
@@ -2033,7 +2027,6 @@ discard block |
||
2033 | 2027 | /** |
2034 | 2028 | * Drive query and fetchAll. |
2035 | 2029 | * |
2036 | - * @param string $sql |
|
2037 | 2030 | * |
2038 | 2031 | * @return bool|array |
2039 | 2032 | */ |
@@ -294,7 +294,6 @@ discard block |
||
294 | 294 | * process of on netunmount |
295 | 295 | * Drop `onedrive` & rm thumbs. |
296 | 296 | * |
297 | - * @param array $options |
|
298 | 297 | * |
299 | 298 | * @return bool |
300 | 299 | */ |
@@ -382,11 +381,9 @@ discard block |
||
382 | 381 | /** |
383 | 382 | * Obtains a new access token from OAuth. This token is valid for one hour. |
384 | 383 | * |
385 | - * @param string $clientSecret The OneDrive client secret |
|
384 | + * @param string $client_secret The OneDrive client secret |
|
386 | 385 | * @param string $code The code returned by OneDrive after |
387 | 386 | * successful log in |
388 | - * @param string $redirectUri Must be the same as the redirect URI passed |
|
389 | - * to LoginUrl |
|
390 | 387 | * |
391 | 388 | * @throws \Exception Thrown if this Client instance's clientId is not set |
392 | 389 | * @throws \Exception Thrown if the redirect URI of this Client instance's |
@@ -456,7 +453,7 @@ discard block |
||
456 | 453 | /** |
457 | 454 | * Get token and auto refresh. |
458 | 455 | * |
459 | - * @return true|Exception |
|
456 | + * @return boolean |
|
460 | 457 | */ |
461 | 458 | protected function _od_refreshToken() |
462 | 459 | { |
@@ -563,6 +560,7 @@ discard block |
||
563 | 560 | /** |
564 | 561 | * Creates a base cURL object which is compatible with the OneDrive API. |
565 | 562 | * |
563 | + * @param string $url |
|
566 | 564 | * @return resource A compatible cURL object |
567 | 565 | */ |
568 | 566 | protected function _od_prepareCurl($url = null) |
@@ -621,7 +619,6 @@ discard block |
||
621 | 619 | /** |
622 | 620 | * Drive query and fetchAll. |
623 | 621 | * |
624 | - * @param string $sql |
|
625 | 622 | * |
626 | 623 | * @return object|array |
627 | 624 | */ |
@@ -716,7 +713,7 @@ discard block |
||
716 | 713 | * |
717 | 714 | * @param string $path |
718 | 715 | * |
719 | - * @return array|object onedrive metadata |
|
716 | + * @return string onedrive metadata |
|
720 | 717 | */ |
721 | 718 | protected function _od_getFileRaw($path) |
722 | 719 | { |
@@ -734,7 +731,6 @@ discard block |
||
734 | 731 | * Get thumbnail from OneDrive.com. |
735 | 732 | * |
736 | 733 | * @param string $path |
737 | - * @param string $size |
|
738 | 734 | * |
739 | 735 | * @return string | boolean |
740 | 736 | */ |
@@ -854,6 +850,9 @@ discard block |
||
854 | 850 | $this->disabled[] = 'extract'; |
855 | 851 | } |
856 | 852 | |
853 | + /** |
|
854 | + * @param string $path |
|
855 | + */ |
|
857 | 856 | protected function isNameExists($path) |
858 | 857 | { |
859 | 858 | list($pid, $name) = $this->_od_splitPath($path); |
@@ -907,7 +906,7 @@ discard block |
||
907 | 906 | * @param string $dst destination dir path |
908 | 907 | * @param string $name new file name (optionaly) |
909 | 908 | * |
910 | - * @return string|false |
|
909 | + * @return boolean |
|
911 | 910 | * |
912 | 911 | * @author Dmitry (dio) Levashov |
913 | 912 | * @author Naoki Sawada |
@@ -974,7 +973,6 @@ discard block |
||
974 | 973 | * Create thumnbnail and return it's URL on success. |
975 | 974 | * |
976 | 975 | * @param string $path file path |
977 | - * @param string $mime file mime type |
|
978 | 976 | |
979 | 977 | * @return string|false |
980 | 978 | * |
@@ -1296,7 +1294,6 @@ discard block |
||
1296 | 1294 | * Open file and return file pointer. |
1297 | 1295 | * |
1298 | 1296 | * @param string $path file path |
1299 | - * @param bool $write open file for writing |
|
1300 | 1297 | * |
1301 | 1298 | * @return resource|false |
1302 | 1299 | * |
@@ -1322,7 +1319,7 @@ discard block |
||
1322 | 1319 | * |
1323 | 1320 | * @param resource $fp file pointer |
1324 | 1321 | * |
1325 | - * @return bool |
|
1322 | + * @return boolean|null |
|
1326 | 1323 | * |
1327 | 1324 | * @author Dmitry (dio) Levashov |
1328 | 1325 | **/ |
@@ -1494,7 +1491,7 @@ discard block |
||
1494 | 1491 | * Return new file path or false. |
1495 | 1492 | * |
1496 | 1493 | * @param string $source source file path |
1497 | - * @param string $target target dir path |
|
1494 | + * @param string $targetDir target dir path |
|
1498 | 1495 | * @param string $name file name |
1499 | 1496 | * |
1500 | 1497 | * @return string|bool |
@@ -1589,7 +1586,6 @@ discard block |
||
1589 | 1586 | * Return new file path or false on error. |
1590 | 1587 | * |
1591 | 1588 | * @param resource $fp file pointer |
1592 | - * @param string $dir target dir path |
|
1593 | 1589 | * @param string $name file name |
1594 | 1590 | * @param array $stat file stat (required by some virtual fs) |
1595 | 1591 | * |
@@ -1680,7 +1676,7 @@ discard block |
||
1680 | 1676 | * @param string $path file path |
1681 | 1677 | * @param string $content new file content |
1682 | 1678 | * |
1683 | - * @return bool |
|
1679 | + * @return string|boolean |
|
1684 | 1680 | * |
1685 | 1681 | * @author Dmitry (dio) Levashov |
1686 | 1682 | **/ |
@@ -1742,7 +1738,7 @@ discard block |
||
1742 | 1738 | * |
1743 | 1739 | * @param string $path file/dir path |
1744 | 1740 | * |
1745 | - * @return bool |
|
1741 | + * @return boolean|null |
|
1746 | 1742 | * |
1747 | 1743 | * @author Dmitry (dio) Levashov |
1748 | 1744 | **/ |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * |
62 | 62 | * 以下のものは非対応 |
63 | 63 | * BITMAPV4HEADER と BITMAPV5HEADER に含まれる色空間に関する様々な機能 |
64 | - * @param $filename_or_stream_or_binary |
|
64 | + * @param string $filename_or_stream_or_binary |
|
65 | 65 | * @return bool|resource |
66 | 66 | */ |
67 | 67 | function imagecreatefrombmp($filename_or_stream_or_binary) |
@@ -99,6 +99,9 @@ discard block |
||
99 | 99 | return $bmp; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param string $str |
|
104 | + */ |
|
102 | 105 | public static function loadFromString($str) |
103 | 106 | { |
104 | 107 | //data scheme より古いバージョンから対応しているようなので php://memory を使う |
@@ -126,6 +129,9 @@ discard block |
||
126 | 129 | return $bmp; |
127 | 130 | } |
128 | 131 | |
132 | + /** |
|
133 | + * @param resource $stream |
|
134 | + */ |
|
129 | 135 | public static function loadFromStream($stream) |
130 | 136 | { |
131 | 137 | $buf = fread($stream, 14); //2+4+2+2+4 |