also looking at this
Master
#10
3 files
+1400
-487
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -4,6 +4,7 @@ | ||
| 4 | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
| 5 | 5 | "This file is @generated automatically" |
| 6 | 6 | ], |
| 7 | <<<<<<< HEAD | |
| 7 | 8 | "content-hash": "2b03d73ce355901d9cd04b9ba1a36c9a", |
| 8 | 9 | "packages": [ |
| 9 | 10 | { |
| @@ -97,6 +98,11 @@ | ||
| 97 | 98 | "time": "2021-04-14T18:16:00+00:00" |
| 98 | 99 | }, |
| 99 | 100 | { |
| 101 | ======= | |
| 102 | "content-hash": "893d46f29d9bf2809e2cf7fb9eb11a7a", | |
| 103 | "packages": [ | |
| 104 | { | |
| 105 | >>>>>>> 4e890c5... initial functions | |
| 100 | 106 | "name": "guzzlehttp/guzzle", |
| 101 | 107 | "version": "7.3.0", |
| 102 | 108 | "source": { |
| @@ -175,10 +181,13 @@ | ||
| 175 | 181 | "rest", |
| 176 | 182 | "web service" |
| 177 | 183 | ], |
| 184 | <<<<<<< HEAD | |
| 178 | 185 | "support": { |
| 179 | 186 | "issues": "https://github.com/guzzle/guzzle/issues", |
| 180 | 187 | "source": "https://github.com/guzzle/guzzle/tree/7.3.0" |
| 181 | 188 | }, |
| 189 | ======= | |
| 190 | >>>>>>> 4e890c5... initial functions | |
| 182 | 191 | "funding": [ |
| 183 | 192 | { |
| 184 | 193 | "url": "https://github.com/GrahamCampbell", |
| @@ -248,10 +257,13 @@ | ||
| 248 | 257 | "keywords": [ |
| 249 | 258 | "promise" |
| 250 | 259 | ], |
| 260 | <<<<<<< HEAD | |
| 251 | 261 | "support": { |
| 252 | 262 | "issues": "https://github.com/guzzle/promises/issues", |
| 253 | 263 | "source": "https://github.com/guzzle/promises/tree/1.4.1" |
| 254 | 264 | }, |
| 265 | ======= | |
| 266 | >>>>>>> 4e890c5... initial functions | |
| 255 | 267 | "time": "2021-03-07T09:25:29+00:00" |
| 256 | 268 | }, |
| 257 | 269 | { |
| @@ -323,10 +335,13 @@ | ||
| 323 | 335 | "uri", |
| 324 | 336 | "url" |
| 325 | 337 | ], |
| 338 | <<<<<<< HEAD | |
| 326 | 339 | "support": { |
| 327 | 340 | "issues": "https://github.com/guzzle/psr7/issues", |
| 328 | 341 | "source": "https://github.com/guzzle/psr7/tree/1.8.1" |
| 329 | 342 | }, |
| 343 | ======= | |
| 344 | >>>>>>> 4e890c5... initial functions | |
| 330 | 345 | "time": "2021-03-21T16:25:00+00:00" |
| 331 | 346 | }, |
| 332 | 347 | { |
| @@ -393,10 +408,13 @@ | ||
| 393 | 408 | "sftp", |
| 394 | 409 | "storage" |
| 395 | 410 | ], |
| 411 | <<<<<<< HEAD | |
| 396 | 412 | "support": { |
| 397 | 413 | "issues": "https://github.com/thephpleague/flysystem/issues", |
| 398 | 414 | "source": "https://github.com/thephpleague/flysystem/tree/2.0.5" |
| 399 | 415 | }, |
| 416 | ======= | |
| 417 | >>>>>>> 4e890c5... initial functions | |
| 400 | 418 | "funding": [ |
| 401 | 419 | { |
| 402 | 420 | "url": "https://offset.earth/frankdejonge", |
| @@ -414,6 +432,7 @@ | ||
| 414 | 432 | "time": "2021-04-11T15:03:35+00:00" |
| 415 | 433 | }, |
| 416 | 434 | { |
| 435 | <<<<<<< HEAD | |
| 417 | 436 | "name": "league/flysystem-aws-s3-v3", |
| 418 | 437 | "version": "2.0.5", |
| 419 | 438 | "source": { |
| @@ -469,6 +488,8 @@ | ||
| 469 | 488 | "time": "2021-04-11T09:05:38+00:00" |
| 470 | 489 | }, |
| 471 | 490 | { |
| 491 | ======= | |
| 492 | >>>>>>> 4e890c5... initial functions | |
| 472 | 493 | "name": "league/mime-type-detection", |
| 473 | 494 | "version": "1.7.0", |
| 474 | 495 | "source": { |
| @@ -508,10 +529,6 @@ | ||
| 508 | 529 | } |
| 509 | 530 | ], |
| 510 | 531 | "description": "Mime-type detection for Flysystem", |
| 511 | "support": { | |
| 512 | "issues": "https://github.com/thephpleague/mime-type-detection/issues", | |
| 513 | "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" | |
| 514 | }, | |
| 515 | 532 | "funding": [ |
| 516 | 533 | { |
| 517 | 534 | "url": "https://github.com/frankdejonge", |
| @@ -524,67 +541,6 @@ | ||
| 524 | 541 | ], |
| 525 | 542 | "time": "2021-01-18T20:58:21+00:00" |
| 526 | 543 | }, |
| 527 | { | |
| 528 | "name": "mtdowling/jmespath.php", | |
| 529 | "version": "2.6.0", | |
| 530 | "source": { | |
| 531 | "type": "git", | |
| 532 | "url": "https://github.com/jmespath/jmespath.php.git", | |
| 533 | "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb" | |
| 534 | }, | |
| 535 | "dist": { | |
| 536 | "type": "zip", | |
| 537 | "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/42dae2cbd13154083ca6d70099692fef8ca84bfb", | |
| 538 | "reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb", | |
| 539 | "shasum": "" | |
| 540 | }, | |
| 541 | "require": { | |
| 542 | "php": "^5.4 || ^7.0 || ^8.0", | |
| 543 | "symfony/polyfill-mbstring": "^1.17" | |
| 544 | }, | |
| 545 | "require-dev": { | |
| 546 | "composer/xdebug-handler": "^1.4", | |
| 547 | "phpunit/phpunit": "^4.8.36 || ^7.5.15" | |
| 548 | }, | |
| 549 | "bin": [ | |
| 550 | "bin/jp.php" | |
| 551 | ], | |
| 552 | "type": "library", | |
| 553 | "extra": { | |
| 554 | "branch-alias": { | |
| 555 | "dev-master": "2.6-dev" | |
| 556 | } | |
| 557 | }, | |
| 558 | "autoload": { | |
| 559 | "psr-4": { | |
| 560 | "JmesPath\\": "src/" | |
| 561 | }, | |
| 562 | "files": [ | |
| 563 | "src/JmesPath.php" | |
| 564 | ] | |
| 565 | }, | |
| 566 | "notification-url": "https://packagist.org/downloads/", | |
| 567 | "license": [ | |
| 568 | "MIT" | |
| 569 | ], | |
| 570 | "authors": [ | |
| 571 | { | |
| 572 | "name": "Michael Dowling", | |
| 573 | "email": "mtdowling@gmail.com", | |
| 574 | "homepage": "https://github.com/mtdowling" | |
| 575 | } | |
| 576 | ], | |
| 577 | "description": "Declaratively specify how to extract elements from a JSON document", | |
| 578 | "keywords": [ | |
| 579 | "json", | |
| 580 | "jsonpath" | |
| 581 | ], | |
| 582 | "support": { | |
| 583 | "issues": "https://github.com/jmespath/jmespath.php/issues", | |
| 584 | "source": "https://github.com/jmespath/jmespath.php/tree/2.6.0" | |
| 585 | }, | |
| 586 | "time": "2020-07-31T21:01:56+00:00" | |
| 587 | }, | |
| 588 | 544 | { |
| 589 | 545 | "name": "psr/http-client", |
| 590 | 546 | "version": "1.0.1", |
| @@ -632,9 +588,6 @@ | ||
| 632 | 588 | "psr", |
| 633 | 589 | "psr-18" |
| 634 | 590 | ], |
| 635 | "support": { | |
| 636 | "source": "https://github.com/php-fig/http-client/tree/master" | |
| 637 | }, | |
| 638 | 591 | "time": "2020-06-29T06:28:15+00:00" |
| 639 | 592 | }, |
| 640 | 593 | { |
| @@ -685,9 +638,6 @@ | ||
| 685 | 638 | "request", |
| 686 | 639 | "response" |
| 687 | 640 | ], |
| 688 | "support": { | |
| 689 | "source": "https://github.com/php-fig/http-message/tree/master" | |
| 690 | }, | |
| 691 | 641 | "time": "2016-08-06T14:39:51+00:00" |
| 692 | 642 | }, |
| 693 | 643 | { |
| @@ -728,91 +678,7 @@ | ||
| 728 | 678 | } |
| 729 | 679 | ], |
| 730 | 680 | "description": "A polyfill for getallheaders.", |
| 731 | "support": { | |
| 732 | "issues": "https://github.com/ralouphie/getallheaders/issues", | |
| 733 | "source": "https://github.com/ralouphie/getallheaders/tree/develop" | |
| 734 | }, | |
| 735 | 681 | "time": "2019-03-08T08:55:37+00:00" |
| 736 | }, | |
| 737 | { | |
| 738 | "name": "symfony/polyfill-mbstring", | |
| 739 | "version": "v1.22.1", | |
| 740 | "source": { | |
| 741 | "type": "git", | |
| 742 | "url": "https://github.com/symfony/polyfill-mbstring.git", | |
| 743 | "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" | |
| 744 | }, | |
| 745 | "dist": { | |
| 746 | "type": "zip", | |
| 747 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", | |
| 748 | "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", | |
| 749 | "shasum": "" | |
| 750 | }, | |
| 751 | "require": { | |
| 752 | "php": ">=7.1" | |
| 753 | }, | |
| 754 | "suggest": { | |
| 755 | "ext-mbstring": "For best performance" | |
| 756 | }, | |
| 757 | "type": "library", | |
| 758 | "extra": { | |
| 759 | "branch-alias": { | |
| 760 | "dev-main": "1.22-dev" | |
| 761 | }, | |
| 762 | "thanks": { | |
| 763 | "name": "symfony/polyfill", | |
| 764 | "url": "https://github.com/symfony/polyfill" | |
| 765 | } | |
| 766 | }, | |
| 767 | "autoload": { | |
| 768 | "psr-4": { | |
| 769 | "Symfony\\Polyfill\\Mbstring\\": "" | |
| 770 | }, | |
| 771 | "files": [ | |
| 772 | "bootstrap.php" | |
| 773 | ] | |
| 774 | }, | |
| 775 | "notification-url": "https://packagist.org/downloads/", | |
| 776 | "license": [ | |
| 777 | "MIT" | |
| 778 | ], | |
| 779 | "authors": [ | |
| 780 | { | |
| 781 | "name": "Nicolas Grekas", | |
| 782 | "email": "p@tchwork.com" | |
| 783 | }, | |
| 784 | { | |
| 785 | "name": "Symfony Community", | |
| 786 | "homepage": "https://symfony.com/contributors" | |
| 787 | } | |
| 788 | ], | |
| 789 | "description": "Symfony polyfill for the Mbstring extension", | |
| 790 | "homepage": "https://symfony.com", | |
| 791 | "keywords": [ | |
| 792 | "compatibility", | |
| 793 | "mbstring", | |
| 794 | "polyfill", | |
| 795 | "portable", | |
| 796 | "shim" | |
| 797 | ], | |
| 798 | "support": { | |
| 799 | "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" | |
| 800 | }, | |
| 801 | "funding": [ | |
| 802 | { | |
| 803 | "url": "https://symfony.com/sponsor", | |
| 804 | "type": "custom" | |
| 805 | }, | |
| 806 | { | |
| 807 | "url": "https://github.com/fabpot", | |
| 808 | "type": "github" | |
| 809 | }, | |
| 810 | { | |
| 811 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | |
| 812 | "type": "tidelift" | |
| 813 | } | |
| 814 | ], | |
| 815 | "time": "2021-01-22T09:19:47+00:00" | |
| 816 | 682 | } |
| 817 | 683 | ], |
| 818 | 684 | "packages-dev": [ |
| @@ -1400,10 +1266,13 @@ | ||
| 1400 | 1266 | "testing", |
| 1401 | 1267 | "xunit" |
| 1402 | 1268 | ], |
| 1269 | <<<<<<< HEAD | |
| 1403 | 1270 | "support": { |
| 1404 | 1271 | "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", |
| 1405 | 1272 | "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" |
| 1406 | 1273 | }, |
| 1274 | ======= | |
| 1275 | >>>>>>> 4e890c5... initial functions | |
| 1407 | 1276 | "funding": [ |
| 1408 | 1277 | { |
| 1409 | 1278 | "url": "https://github.com/sebastianbergmann", |
| @@ -1460,10 +1329,13 @@ | ||
| 1460 | 1329 | "filesystem", |
| 1461 | 1330 | "iterator" |
| 1462 | 1331 | ], |
| 1332 | <<<<<<< HEAD | |
| 1463 | 1333 | "support": { |
| 1464 | 1334 | "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", |
| 1465 | 1335 | "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" |
| 1466 | 1336 | }, |
| 1337 | ======= | |
| 1338 | >>>>>>> 4e890c5... initial functions | |
| 1467 | 1339 | "funding": [ |
| 1468 | 1340 | { |
| 1469 | 1341 | "url": "https://github.com/sebastianbergmann", |
| @@ -1523,6 +1395,7 @@ | ||
| 1523 | 1395 | "keywords": [ |
| 1524 | 1396 | "process" |
| 1525 | 1397 | ], |
| 1398 | <<<<<<< HEAD | |
| 1526 | 1399 | "support": { |
| 1527 | 1400 | "issues": "https://github.com/sebastianbergmann/php-invoker/issues", |
| 1528 | 1401 | "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" |
| @@ -1534,6 +1407,9 @@ | ||
| 1534 | 1407 | } |
| 1535 | 1408 | ], |
| 1536 | 1409 | "time": "2020-09-28T05:58:55+00:00" |
| 1410 | ======= | |
| 1411 | "time": "2015-06-21T13:50:34+00:00" | |
| 1412 | >>>>>>> 4e890c5... initial functions | |
| 1537 | 1413 | }, |
| 1538 | 1414 | { |
| 1539 | 1415 | "name": "phpunit/php-text-template", |
| @@ -1582,10 +1458,13 @@ | ||
| 1582 | 1458 | "keywords": [ |
| 1583 | 1459 | "template" |
| 1584 | 1460 | ], |
| 1461 | <<<<<<< HEAD | |
| 1585 | 1462 | "support": { |
| 1586 | 1463 | "issues": "https://github.com/sebastianbergmann/php-text-template/issues", |
| 1587 | 1464 | "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" |
| 1588 | 1465 | }, |
| 1466 | ======= | |
| 1467 | >>>>>>> 4e890c5... initial functions | |
| 1589 | 1468 | "funding": [ |
| 1590 | 1469 | { |
| 1591 | 1470 | "url": "https://github.com/sebastianbergmann", |
| @@ -1641,10 +1520,13 @@ | ||
| 1641 | 1520 | "keywords": [ |
| 1642 | 1521 | "timer" |
| 1643 | 1522 | ], |
| 1523 | <<<<<<< HEAD | |
| 1644 | 1524 | "support": { |
| 1645 | 1525 | "issues": "https://github.com/sebastianbergmann/php-timer/issues", |
| 1646 | 1526 | "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" |
| 1647 | 1527 | }, |
| 1528 | ======= | |
| 1529 | >>>>>>> 4e890c5... initial functions | |
| 1648 | 1530 | "funding": [ |
| 1649 | 1531 | { |
| 1650 | 1532 | "url": "https://github.com/sebastianbergmann", |
| @@ -1655,6 +1537,7 @@ | ||
| 1655 | 1537 | }, |
| 1656 | 1538 | { |
| 1657 | 1539 | "name": "phpunit/phpunit", |
| 1540 | <<<<<<< HEAD | |
| 1658 | 1541 | "version": "9.5.4", |
| 1659 | 1542 | "source": { |
| 1660 | 1543 | "type": "git", |
| @@ -1665,6 +1548,18 @@ | ||
| 1665 | 1548 | "type": "zip", |
| 1666 | 1549 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", |
| 1667 | 1550 | "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", |
| 1551 | ======= | |
| 1552 | "version": "8.5.15", | |
| 1553 | "source": { | |
| 1554 | "type": "git", | |
| 1555 | "url": "https://github.com/sebastianbergmann/phpunit.git", | |
| 1556 | "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef" | |
| 1557 | }, | |
| 1558 | "dist": { | |
| 1559 | "type": "zip", | |
| 1560 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", | |
| 1561 | "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", | |
| 1562 | >>>>>>> 4e890c5... initial functions | |
| 1668 | 1563 | "shasum": "" |
| 1669 | 1564 | }, |
| 1670 | 1565 | "require": { |
| @@ -1740,10 +1635,13 @@ | ||
| 1740 | 1635 | "testing", |
| 1741 | 1636 | "xunit" |
| 1742 | 1637 | ], |
| 1638 | <<<<<<< HEAD | |
| 1743 | 1639 | "support": { |
| 1744 | 1640 | "issues": "https://github.com/sebastianbergmann/phpunit/issues", |
| 1745 | 1641 | "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" |
| 1746 | 1642 | }, |
| 1643 | ======= | |
| 1644 | >>>>>>> 4e890c5... initial functions | |
| 1747 | 1645 | "funding": [ |
| 1748 | 1646 | { |
| 1749 | 1647 | "url": "https://phpunit.de/donate.html", |
| @@ -1754,6 +1652,7 @@ | ||
| 1754 | 1652 | "type": "github" |
| 1755 | 1653 | } |
| 1756 | 1654 | ], |
| 1655 | <<<<<<< HEAD | |
| 1757 | 1656 | "time": "2021-03-23T07:16:29+00:00" |
| 1758 | 1657 | }, |
| 1759 | 1658 | { |
| @@ -1867,6 +1766,9 @@ | ||
| 1867 | 1766 | } |
| 1868 | 1767 | ], |
| 1869 | 1768 | "time": "2020-10-26T13:08:54+00:00" |
| 1769 | ======= | |
| 1770 | "time": "2021-03-17T07:27:54+00:00" | |
| 1771 | >>>>>>> 4e890c5... initial functions | |
| 1870 | 1772 | }, |
| 1871 | 1773 | { |
| 1872 | 1774 | "name": "sebastian/code-unit-reverse-lookup", |
| @@ -1911,10 +1813,13 @@ | ||
| 1911 | 1813 | ], |
| 1912 | 1814 | "description": "Looks up which function or method a line of code belongs to", |
| 1913 | 1815 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", |
| 1816 | <<<<<<< HEAD | |
| 1914 | 1817 | "support": { |
| 1915 | 1818 | "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", |
| 1916 | 1819 | "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" |
| 1917 | 1820 | }, |
| 1821 | ======= | |
| 1822 | >>>>>>> 4e890c5... initial functions | |
| 1918 | 1823 | "funding": [ |
| 1919 | 1824 | { |
| 1920 | 1825 | "url": "https://github.com/sebastianbergmann", |
| @@ -1985,10 +1890,13 @@ | ||
| 1985 | 1890 | "compare", |
| 1986 | 1891 | "equality" |
| 1987 | 1892 | ], |
| 1893 | <<<<<<< HEAD | |
| 1988 | 1894 | "support": { |
| 1989 | 1895 | "issues": "https://github.com/sebastianbergmann/comparator/issues", |
| 1990 | 1896 | "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" |
| 1991 | 1897 | }, |
| 1898 | ======= | |
| 1899 | >>>>>>> 4e890c5... initial functions | |
| 1992 | 1900 | "funding": [ |
| 1993 | 1901 | { |
| 1994 | 1902 | "url": "https://github.com/sebastianbergmann", |
| @@ -2108,10 +2016,13 @@ | ||
| 2108 | 2016 | "unidiff", |
| 2109 | 2017 | "unified diff" |
| 2110 | 2018 | ], |
| 2019 | <<<<<<< HEAD | |
| 2111 | 2020 | "support": { |
| 2112 | 2021 | "issues": "https://github.com/sebastianbergmann/diff/issues", |
| 2113 | 2022 | "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" |
| 2114 | 2023 | }, |
| 2024 | ======= | |
| 2025 | >>>>>>> 4e890c5... initial functions | |
| 2115 | 2026 | "funding": [ |
| 2116 | 2027 | { |
| 2117 | 2028 | "url": "https://github.com/sebastianbergmann", |
| @@ -2171,10 +2082,13 @@ | ||
| 2171 | 2082 | "environment", |
| 2172 | 2083 | "hhvm" |
| 2173 | 2084 | ], |
| 2085 | <<<<<<< HEAD | |
| 2174 | 2086 | "support": { |
| 2175 | 2087 | "issues": "https://github.com/sebastianbergmann/environment/issues", |
| 2176 | 2088 | "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" |
| 2177 | 2089 | }, |
| 2090 | ======= | |
| 2091 | >>>>>>> 4e890c5... initial functions | |
| 2178 | 2092 | "funding": [ |
| 2179 | 2093 | { |
| 2180 | 2094 | "url": "https://github.com/sebastianbergmann", |
| @@ -2248,10 +2162,13 @@ | ||
| 2248 | 2162 | "export", |
| 2249 | 2163 | "exporter" |
| 2250 | 2164 | ], |
| 2165 | <<<<<<< HEAD | |
| 2251 | 2166 | "support": { |
| 2252 | 2167 | "issues": "https://github.com/sebastianbergmann/exporter/issues", |
| 2253 | 2168 | "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" |
| 2254 | 2169 | }, |
| 2170 | ======= | |
| 2171 | >>>>>>> 4e890c5... initial functions | |
| 2255 | 2172 | "funding": [ |
| 2256 | 2173 | { |
| 2257 | 2174 | "url": "https://github.com/sebastianbergmann", |
| @@ -2312,10 +2229,13 @@ | ||
| 2312 | 2229 | "keywords": [ |
| 2313 | 2230 | "global state" |
| 2314 | 2231 | ], |
| 2232 | <<<<<<< HEAD | |
| 2315 | 2233 | "support": { |
| 2316 | 2234 | "issues": "https://github.com/sebastianbergmann/global-state/issues", |
| 2317 | 2235 | "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" |
| 2318 | 2236 | }, |
| 2237 | ======= | |
| 2238 | >>>>>>> 4e890c5... initial functions | |
| 2319 | 2239 | "funding": [ |
| 2320 | 2240 | { |
| 2321 | 2241 | "url": "https://github.com/sebastianbergmann", |
| @@ -2426,10 +2346,13 @@ | ||
| 2426 | 2346 | ], |
| 2427 | 2347 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", |
| 2428 | 2348 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", |
| 2349 | <<<<<<< HEAD | |
| 2429 | 2350 | "support": { |
| 2430 | 2351 | "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", |
| 2431 | 2352 | "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" |
| 2432 | 2353 | }, |
| 2354 | ======= | |
| 2355 | >>>>>>> 4e890c5... initial functions | |
| 2433 | 2356 | "funding": [ |
| 2434 | 2357 | { |
| 2435 | 2358 | "url": "https://github.com/sebastianbergmann", |
| @@ -2481,10 +2404,13 @@ | ||
| 2481 | 2404 | ], |
| 2482 | 2405 | "description": "Allows reflection of object attributes, including inherited and non-public ones", |
| 2483 | 2406 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", |
| 2407 | <<<<<<< HEAD | |
| 2484 | 2408 | "support": { |
| 2485 | 2409 | "issues": "https://github.com/sebastianbergmann/object-reflector/issues", |
| 2486 | 2410 | "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" |
| 2487 | 2411 | }, |
| 2412 | ======= | |
| 2413 | >>>>>>> 4e890c5... initial functions | |
| 2488 | 2414 | "funding": [ |
| 2489 | 2415 | { |
| 2490 | 2416 | "url": "https://github.com/sebastianbergmann", |
| @@ -2544,10 +2470,13 @@ | ||
| 2544 | 2470 | ], |
| 2545 | 2471 | "description": "Provides functionality to recursively process PHP variables", |
| 2546 | 2472 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", |
| 2473 | <<<<<<< HEAD | |
| 2547 | 2474 | "support": { |
| 2548 | 2475 | "issues": "https://github.com/sebastianbergmann/recursion-context/issues", |
| 2549 | 2476 | "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" |
| 2550 | 2477 | }, |
| 2478 | ======= | |
| 2479 | >>>>>>> 4e890c5... initial functions | |
| 2551 | 2480 | "funding": [ |
| 2552 | 2481 | { |
| 2553 | 2482 | "url": "https://github.com/sebastianbergmann", |
| @@ -2599,10 +2528,13 @@ | ||
| 2599 | 2528 | ], |
| 2600 | 2529 | "description": "Provides a list of PHP built-in functions that operate on resources", |
| 2601 | 2530 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", |
| 2531 | <<<<<<< HEAD | |
| 2602 | 2532 | "support": { |
| 2603 | 2533 | "issues": "https://github.com/sebastianbergmann/resource-operations/issues", |
| 2604 | 2534 | "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" |
| 2605 | 2535 | }, |
| 2536 | ======= | |
| 2537 | >>>>>>> 4e890c5... initial functions | |
| 2606 | 2538 | "funding": [ |
| 2607 | 2539 | { |
| 2608 | 2540 | "url": "https://github.com/sebastianbergmann", |
| @@ -2655,10 +2587,13 @@ | ||
| 2655 | 2587 | ], |
| 2656 | 2588 | "description": "Collection of value objects that represent the types of the PHP type system", |
| 2657 | 2589 | "homepage": "https://github.com/sebastianbergmann/type", |
| 2590 | <<<<<<< HEAD | |
| 2658 | 2591 | "support": { |
| 2659 | 2592 | "issues": "https://github.com/sebastianbergmann/type/issues", |
| 2660 | 2593 | "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" |
| 2661 | 2594 | }, |
| 2595 | ======= | |
| 2596 | >>>>>>> 4e890c5... initial functions | |
| 2662 | 2597 | "funding": [ |
| 2663 | 2598 | { |
| 2664 | 2599 | "url": "https://github.com/sebastianbergmann", |
| @@ -2708,6 +2643,7 @@ | ||
| 2708 | 2643 | ], |
| 2709 | 2644 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", |
| 2710 | 2645 | "homepage": "https://github.com/sebastianbergmann/version", |
| 2646 | <<<<<<< HEAD | |
| 2711 | 2647 | "support": { |
| 2712 | 2648 | "issues": "https://github.com/sebastianbergmann/version/issues", |
| 2713 | 2649 | "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" |
| @@ -2719,6 +2655,9 @@ | ||
| 2719 | 2655 | } |
| 2720 | 2656 | ], |
| 2721 | 2657 | "time": "2020-09-28T06:39:44+00:00" |
| 2658 | ======= | |
| 2659 | "time": "2016-10-03T07:35:21+00:00" | |
| 2660 | >>>>>>> 4e890c5... initial functions | |
| 2722 | 2661 | }, |
| 2723 | 2662 | { |
| 2724 | 2663 | "name": "symfony/polyfill-ctype", |
| @@ -2800,6 +2739,162 @@ | ||
| 2800 | 2739 | "time": "2021-01-07T16:49:33+00:00" |
| 2801 | 2740 | }, |
| 2802 | 2741 | { |
| 2742 | <<<<<<< HEAD | |
| 2743 | ======= | |
| 2744 | "name": "symfony/polyfill-mbstring", | |
| 2745 | "version": "v1.22.1", | |
| 2746 | "source": { | |
| 2747 | "type": "git", | |
| 2748 | "url": "https://github.com/symfony/polyfill-mbstring.git", | |
| 2749 | "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" | |
| 2750 | }, | |
| 2751 | "dist": { | |
| 2752 | "type": "zip", | |
| 2753 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", | |
| 2754 | "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", | |
| 2755 | "shasum": "" | |
| 2756 | }, | |
| 2757 | "require": { | |
| 2758 | "php": ">=7.1" | |
| 2759 | }, | |
| 2760 | "suggest": { | |
| 2761 | "ext-mbstring": "For best performance" | |
| 2762 | }, | |
| 2763 | "type": "library", | |
| 2764 | "extra": { | |
| 2765 | "branch-alias": { | |
| 2766 | "dev-main": "1.22-dev" | |
| 2767 | }, | |
| 2768 | "thanks": { | |
| 2769 | "name": "symfony/polyfill", | |
| 2770 | "url": "https://github.com/symfony/polyfill" | |
| 2771 | } | |
| 2772 | }, | |
| 2773 | "autoload": { | |
| 2774 | "psr-4": { | |
| 2775 | "Symfony\\Polyfill\\Mbstring\\": "" | |
| 2776 | }, | |
| 2777 | "files": [ | |
| 2778 | "bootstrap.php" | |
| 2779 | ] | |
| 2780 | }, | |
| 2781 | "notification-url": "https://packagist.org/downloads/", | |
| 2782 | "license": [ | |
| 2783 | "MIT" | |
| 2784 | ], | |
| 2785 | "authors": [ | |
| 2786 | { | |
| 2787 | "name": "Nicolas Grekas", | |
| 2788 | "email": "p@tchwork.com" | |
| 2789 | }, | |
| 2790 | { | |
| 2791 | "name": "Symfony Community", | |
| 2792 | "homepage": "https://symfony.com/contributors" | |
| 2793 | } | |
| 2794 | ], | |
| 2795 | "description": "Symfony polyfill for the Mbstring extension", | |
| 2796 | "homepage": "https://symfony.com", | |
| 2797 | "keywords": [ | |
| 2798 | "compatibility", | |
| 2799 | "mbstring", | |
| 2800 | "polyfill", | |
| 2801 | "portable", | |
| 2802 | "shim" | |
| 2803 | ], | |
| 2804 | "support": { | |
| 2805 | "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" | |
| 2806 | }, | |
| 2807 | "funding": [ | |
| 2808 | { | |
| 2809 | "url": "https://symfony.com/sponsor", | |
| 2810 | "type": "custom" | |
| 2811 | }, | |
| 2812 | { | |
| 2813 | "url": "https://github.com/fabpot", | |
| 2814 | "type": "github" | |
| 2815 | }, | |
| 2816 | { | |
| 2817 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | |
| 2818 | "type": "tidelift" | |
| 2819 | } | |
| 2820 | ], | |
| 2821 | "time": "2021-01-22T09:19:47+00:00" | |
| 2822 | }, | |
| 2823 | { | |
| 2824 | "name": "symfony/polyfill-php72", | |
| 2825 | "version": "v1.22.1", | |
| 2826 | "source": { | |
| 2827 | "type": "git", | |
| 2828 | "url": "https://github.com/symfony/polyfill-php72.git", | |
| 2829 | "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" | |
| 2830 | }, | |
| 2831 | "dist": { | |
| 2832 | "type": "zip", | |
| 2833 | "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", | |
| 2834 | "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", | |
| 2835 | "shasum": "" | |
| 2836 | }, | |
| 2837 | "require": { | |
| 2838 | "php": ">=7.1" | |
| 2839 | }, | |
| 2840 | "type": "library", | |
| 2841 | "extra": { | |
| 2842 | "branch-alias": { | |
| 2843 | "dev-main": "1.22-dev" | |
| 2844 | }, | |
| 2845 | "thanks": { | |
| 2846 | "name": "symfony/polyfill", | |
| 2847 | "url": "https://github.com/symfony/polyfill" | |
| 2848 | } | |
| 2849 | }, | |
| 2850 | "autoload": { | |
| 2851 | "psr-4": { | |
| 2852 | "Symfony\\Polyfill\\Php72\\": "" | |
| 2853 | }, | |
| 2854 | "files": [ | |
| 2855 | "bootstrap.php" | |
| 2856 | ] | |
| 2857 | }, | |
| 2858 | "notification-url": "https://packagist.org/downloads/", | |
| 2859 | "license": [ | |
| 2860 | "MIT" | |
| 2861 | ], | |
| 2862 | "authors": [ | |
| 2863 | { | |
| 2864 | "name": "Nicolas Grekas", | |
| 2865 | "email": "p@tchwork.com" | |
| 2866 | }, | |
| 2867 | { | |
| 2868 | "name": "Symfony Community", | |
| 2869 | "homepage": "https://symfony.com/contributors" | |
| 2870 | } | |
| 2871 | ], | |
| 2872 | "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", | |
| 2873 | "homepage": "https://symfony.com", | |
| 2874 | "keywords": [ | |
| 2875 | "compatibility", | |
| 2876 | "polyfill", | |
| 2877 | "portable", | |
| 2878 | "shim" | |
| 2879 | ], | |
| 2880 | "funding": [ | |
| 2881 | { | |
| 2882 | "url": "https://symfony.com/sponsor", | |
| 2883 | "type": "custom" | |
| 2884 | }, | |
| 2885 | { | |
| 2886 | "url": "https://github.com/fabpot", | |
| 2887 | "type": "github" | |
| 2888 | }, | |
| 2889 | { | |
| 2890 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | |
| 2891 | "type": "tidelift" | |
| 2892 | } | |
| 2893 | ], | |
| 2894 | "time": "2021-01-07T16:49:33+00:00" | |
| 2895 | }, | |
| 2896 | { | |
| 2897 | >>>>>>> 4e890c5... initial functions | |
| 2803 | 2898 | "name": "symfony/polyfill-php80", |
| 2804 | 2899 | "version": "v1.22.1", |
| 2805 | 2900 | "source": { |
| @@ -2884,6 +2979,7 @@ | ||
| 2884 | 2979 | }, |
| 2885 | 2980 | { |
| 2886 | 2981 | "name": "symfony/var-dumper", |
| 2982 | <<<<<<< HEAD | |
| 2887 | 2983 | "version": "v5.2.6", |
| 2888 | 2984 | "source": { |
| 2889 | 2985 | "type": "git", |
| @@ -2894,6 +2990,18 @@ | ||
| 2894 | 2990 | "type": "zip", |
| 2895 | 2991 | "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89412a68ea2e675b4e44f260a5666729f77f668e", |
| 2896 | 2992 | "reference": "89412a68ea2e675b4e44f260a5666729f77f668e", |
| 2993 | ======= | |
| 2994 | "version": "v4.4.21", | |
| 2995 | "source": { | |
| 2996 | "type": "git", | |
| 2997 | "url": "https://github.com/symfony/var-dumper.git", | |
| 2998 | "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806" | |
| 2999 | }, | |
| 3000 | "dist": { | |
| 3001 | "type": "zip", | |
| 3002 | "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806", | |
| 3003 | "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806", | |
| 3004 | >>>>>>> 4e890c5... initial functions | |
| 2897 | 3005 | "shasum": "" |
| 2898 | 3006 | }, |
| 2899 | 3007 | "require": { |
| @@ -2951,9 +3059,12 @@ | ||
| 2951 | 3059 | "debug", |
| 2952 | 3060 | "dump" |
| 2953 | 3061 | ], |
| 3062 | <<<<<<< HEAD | |
| 2954 | 3063 | "support": { |
| 2955 | 3064 | "source": "https://github.com/symfony/var-dumper/tree/v5.2.6" |
| 2956 | 3065 | }, |
| 3066 | ======= | |
| 3067 | >>>>>>> 4e890c5... initial functions | |
| 2957 | 3068 | "funding": [ |
| 2958 | 3069 | { |
| 2959 | 3070 | "url": "https://symfony.com/sponsor", |
| @@ -2968,7 +3079,11 @@ | ||
| 2968 | 3079 | "type": "tidelift" |
| 2969 | 3080 | } |
| 2970 | 3081 | ], |
| 3082 | <<<<<<< HEAD | |
| 2971 | 3083 | "time": "2021-03-28T09:42:18+00:00" |
| 3084 | ======= | |
| 3085 | "time": "2021-03-27T19:49:03+00:00" | |
| 3086 | >>>>>>> 4e890c5... initial functions | |
| 2972 | 3087 | }, |
| 2973 | 3088 | { |
| 2974 | 3089 | "name": "theseer/tokenizer", |
| @@ -3088,5 +3203,5 @@ | ||
| 3088 | 3203 | "php": "^7.0 || ^8.0" |
| 3089 | 3204 | }, |
| 3090 | 3205 | "platform-dev": [], |
| 3091 | "plugin-api-version": "2.0.0" | |
| 3206 | "plugin-api-version": "1.1.0" | |
| 3092 | 3207 | } |
| @@ -0,0 +1,51 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\Flysystem; | |
| 4 | ||
| 5 | use GuzzleHttp\Client as GuzzleClient; | |
| 6 | ||
| 7 | class Client | |
| 8 | { | |
| 9 | /** | |
| 10 | * Construct Meema client. | |
| 11 | * | |
| 12 | * @param string $accessKey | |
| 13 | */ | |
| 14 | public function __construct($accessKey, $config = []) | |
| 15 | { | |
| 16 | $this->accessKey = $accessKey; | |
| 17 | ||
| 18 | $this->config = $config; | |
| 19 | ||
| 20 | $this->client = new GuzzleClient([ | |
| 21 | 'base_uri' => $url ?? 'http://meema-api.test/api/', | |
| 22 | ]); | |
| 23 | } | |
| 24 | ||
| 25 | /** | |
| 26 | * Handle the API request. | |
| 27 | * | |
| 28 | * @param string $method | |
| 29 | * @param string $path | |
| 30 | */ | |
| 31 | public function request($method, $path, $data = null) | |
| 32 | { | |
| 33 | $content = $this->client->request($method, $path, [ | |
| 34 | 'query' => $data, | |
| 35 | 'headers' => [ | |
| 36 | 'Content-Type' => 'application/json', | |
| 37 | 'Authorization' => "Bearer {$this->accessKey}", | |
| 38 | ], | |
| 39 | ]) | |
| 40 | ->getBody() | |
| 41 | ->getContents(); | |
| 42 | ||
| 43 | $body = json_decode($content, true); | |
| 44 | ||
| 45 | if ($body && array_key_exists('data', $body)) { | |
| 46 | return $body['data']; | |
| 47 | } | |
| 48 | ||
| 49 | return $body; | |
| 50 | } | |
| 51 | } | |
| @@ -0,0 +1,327 @@ | ||
| 1 | <?php | |
| 2 | ||
| 3 | namespace Meema\Flysystem; | |
| 4 | ||
| 5 | use GuzzleHttp\Client as GuzzleClient; | |
| 6 | use GuzzleHttp\Psr7; | |
| 7 | use GuzzleHttp\Psr7\Request; | |
| 8 | use League\Flysystem\Adapter\AbstractAdapter; | |
| 9 | use League\Flysystem\Config; | |
| 10 | ||
| 11 | class MeemaAdapter extends AbstractAdapter | |
| 12 | { | |
| 13 | /** | |
| 14 | * @var \Meema\Flysystem\Client | |
| 15 | */ | |
| 16 | protected $client; | |
| 17 | ||
| 18 | public function __construct() | |
| 19 | { | |
| 20 | $this->client = new Client('pk_live|2|1|kDLnNyPvkdlA8sXJky7SJePO1IdabMzncYxypyC2'); | |
| 21 | } | |
| 22 | /** | |
| 23 | * Write a new file. | |
| 24 | * | |
| 25 | * @param string $path | |
| 26 | * @param string $contents | |
| 27 | * @param Config $config Config object | |
| 28 | * | |
| 29 | * @return false|array false on failure file meta data on success | |
| 30 | */ | |
| 31 | public function write($path, $contents, Config $config) | |
| 32 | { | |
| 33 | return $this->upload($path); | |
| 34 | } | |
| 35 | ||
| 36 | /** | |
| 37 | * Write a new file using a stream. | |
| 38 | * | |
| 39 | * @param string $path | |
| 40 | * @param resource $resource | |
| 41 | * @param Config $config Config object | |
| 42 | * | |
| 43 | * @return array|false false on failure file meta data on success | |
| 44 | */ | |
| 45 | public function writeStream($path, $resource, Config $config) | |
| 46 | { | |
| 47 | return $this->upload($path); | |
| 48 | } | |
| 49 | ||
| 50 | /** | |
| 51 | * Update a file. | |
| 52 | * | |
| 53 | * @param string $path | |
| 54 | * @param string $contents | |
| 55 | * @param Config $config Config object | |
| 56 | * | |
| 57 | * @return array|false false on failure file meta data on success | |
| 58 | */ | |
| 59 | public function update($path, $contents, Config $config) | |
| 60 | { | |
| 61 | return []; | |
| 62 | } | |
| 63 | ||
| 64 | /** | |
| 65 | * Update a file using a stream. | |
| 66 | * | |
| 67 | * @param string $path | |
| 68 | * @param resource $resource | |
| 69 | * @param Config $config Config object | |
| 70 | * | |
| 71 | * @return array|false false on failure file meta data on success | |
| 72 | */ | |
| 73 | public function updateStream($path, $resource, Config $config) | |
| 74 | { | |
| 75 | return []; | |
| 76 | } | |
| 77 | ||
| 78 | /** | |
| 79 | * Rename a file. | |
| 80 | * | |
| 81 | * @param string $path | |
| 82 | * @param string $newpath | |
| 83 | * | |
| 84 | * @return bool | |
| 85 | */ | |
| 86 | public function rename($path, $newpath) | |
| 87 | { | |
| 88 | return []; | |
| 89 | } | |
| 90 | ||
| 91 | /** | |
| 92 | * Copy a file. | |
| 93 | * | |
| 94 | * @param string $path | |
| 95 | * @param string $newpath | |
| 96 | * | |
| 97 | * @return bool | |
| 98 | */ | |
| 99 | public function copy($path, $newpath) | |
| 100 | { | |
| 101 | return []; | |
| 102 | } | |
| 103 | ||
| 104 | /** | |
| 105 | * Delete a file. | |
| 106 | * | |
| 107 | * @param string $path | |
| 108 | * | |
| 109 | * @return bool | |
| 110 | */ | |
| 111 | public function delete($path) | |
| 112 | { | |
| 113 | return []; | |
| 114 | } | |
| 115 | ||
| 116 | /** | |
| 117 | * Delete a directory. | |
| 118 | * | |
| 119 | * @param string $dirname | |
| 120 | * | |
| 121 | * @return bool | |
| 122 | */ | |
| 123 | public function deleteDir($dirname) | |
| 124 | { | |
| 125 | return []; | |
| 126 | } | |
| 127 | ||
| 128 | /** | |
| 129 | * Create a directory. | |
| 130 | * | |
| 131 | * @param string $dirname directory name | |
| 132 | * @param Config $config | |
| 133 | * | |
| 134 | * @return array|false | |
| 135 | */ | |
| 136 | public function createDir($dirname, Config $config) | |
| 137 | { | |
| 138 | return []; | |
| 139 | } | |
| 140 | ||
| 141 | /** | |
| 142 | * Set the visibility for a file. | |
| 143 | * | |
| 144 | * @param string $path | |
| 145 | * @param string $visibility | |
| 146 | * | |
| 147 | * @return array|false file meta data | |
| 148 | */ | |
| 149 | public function setVisibility($path, $visibility) | |
| 150 | { | |
| 151 | return $this->client->request('POST', 'aws/set-visibility', compact('path', 'visibility')); | |
| 152 | } | |
| 153 | ||
| 154 | /** | |
| 155 | * Check whether a file exists. | |
| 156 | * | |
| 157 | * @param string $path | |
| 158 | * | |
| 159 | * @return bool | |
| 160 | */ | |
| 161 | public function has($path) | |
| 162 | { | |
| 163 | $data = $this->client->request('POST', 'aws/has', compact('path')); | |
| 164 | ||
| 165 | return $data['exists'] ?? false; | |
| 166 | } | |
| 167 | ||
| 168 | /** | |
| 169 | * Read a file. | |
| 170 | * | |
| 171 | * @param string $path | |
| 172 | * | |
| 173 | * @return false|array | |
| 174 | */ | |
| 175 | public function read($path) | |
| 176 | { | |
| 177 | return false; | |
| 178 | } | |
| 179 | ||
| 180 | /** | |
| 181 | * List contents of a directory. | |
| 182 | * | |
| 183 | * @param string $directory | |
| 184 | * @param bool $recursive | |
| 185 | * | |
| 186 | * @return array | |
| 187 | */ | |
| 188 | public function listContents($directory = '', $recursive = false) | |
| 189 | { | |
| 190 | return []; | |
| 191 | } | |
| 192 | ||
| 193 | /** | |
| 194 | * Read a file as a stream. | |
| 195 | * | |
| 196 | * @param string $path | |
| 197 | * | |
| 198 | * @return array|false | |
| 199 | */ | |
| 200 | public function readStream($path) | |
| 201 | { | |
| 202 | return []; | |
| 203 | } | |
| 204 | ||
| 205 | /** | |
| 206 | * Get all the meta data of a file or directory. | |
| 207 | * | |
| 208 | * @param string $path | |
| 209 | * | |
| 210 | * @return false|array | |
| 211 | */ | |
| 212 | public function getMetadata($path) | |
| 213 | { | |
| 214 | return $this->client->request('POST', 'aws/metadata', compact('path')); | |
| 215 | } | |
| 216 | ||
| 217 | /** | |
| 218 | * Get all the meta data of a file or directory. | |
| 219 | * | |
| 220 | * @param string $path | |
| 221 | * | |
| 222 | * @return false|array | |
| 223 | */ | |
| 224 | public function getSize($path) | |
| 225 | { | |
| 226 | return $this->getMetadata($path); | |
| 227 | } | |
| 228 | ||
| 229 | /** | |
| 230 | * Get the mimetype of a file. | |
| 231 | * | |
| 232 | * @param string $path | |
| 233 | * | |
| 234 | * @return false|array | |
| 235 | */ | |
| 236 | public function getMimetype($path) | |
| 237 | { | |
| 238 | return $this->getMetadata($path); | |
| 239 | } | |
| 240 | ||
| 241 | /** | |
| 242 | * Get the timestamp of a file. | |
| 243 | * | |
| 244 | * @param string $path | |
| 245 | * | |
| 246 | * @return false|array | |
| 247 | */ | |
| 248 | public function getTimestamp($path) | |
| 249 | { | |
| 250 | return $this->getMetadata($path); | |
| 251 | } | |
| 252 | ||
| 253 | /** | |
| 254 | * Get the visibility of a file. | |
| 255 | * | |
| 256 | * @param string $path | |
| 257 | * | |
| 258 | * @return array|false | |
| 259 | */ | |
| 260 | public function getVisibility($path) | |
| 261 | { | |
| 262 | return $this->getMetadata($path); | |
| 263 | } | |
| 264 | ||
| 265 | /** | |
| 266 | * Upload a media file. | |
| 267 | * | |
| 268 | * @param string $path | |
| 269 | * | |
| 270 | * @return array | |
| 271 | */ | |
| 272 | protected function upload($path) | |
| 273 | { | |
| 274 | $file = fopen($path, 'r'); | |
| 275 | $stream = Psr7\stream_for($file); | |
| 276 | ||
| 277 | $fileName = basename($path); | |
| 278 | $mimeType = mime_content_type($file); | |
| 279 | ||
| 280 | $vaporParams = ['content_type' => $mimeType]; | |
| 281 | ||
| 282 | $signedUrl = $this->client->request('POST', 'vapor/signed-storage-url', $vaporParams); | |
| 283 | ||
| 284 | if (is_array($signedUrl) && $signedUrl['url']) { | |
| 285 | $headers = $signedUrl['headers']; | |
| 286 | unset($headers['Host']); | |
| 287 | ||
| 288 | $this->uploadToS3($signedUrl['url'], $headers, $fileName, $stream); | |
| 289 | ||
| 290 | $uploadData = ['key' => $signedUrl['key'], 'file_name' => $fileName]; | |
| 291 | ||
| 292 | $response = $this->client->request('POST', 'upload', $uploadData); | |
| 293 | } | |
| 294 | ||
| 295 | return $response; | |
| 296 | } | |
| 297 | ||
| 298 | /** | |
| 299 | * Upload the file stream to s3. | |
| 300 | * | |
| 301 | * @param string $signedUrl | |
| 302 | * @param array $headers | |
| 303 | * @param string $fileName | |
| 304 | * @param GuzzleHttp\Psr7 $stream | |
| 305 | * | |
| 306 | * @return void | |
| 307 | */ | |
| 308 | protected function uploadToS3($signedUrl, $headers, $fileName, $stream) | |
| 309 | { | |
| 310 | $client = new GuzzleClient(); | |
| 311 | $request = new Request( | |
| 312 | 'PUT', | |
| 313 | $signedUrl, | |
| 314 | ['headers' => json_encode($headers)], | |
| 315 | new Psr7\MultipartStream( | |
| 316 | [ | |
| 317 | [ | |
| 318 | 'name' => $fileName, | |
| 319 | 'contents' => $stream, | |
| 320 | ], | |
| 321 | ] | |
| 322 | ) | |
| 323 | ); | |
| 324 | ||
| 325 | $client->send($request); | |
| 326 | } | |
| 327 | } | |