mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
e0db79bcc7
commit
f18548457a
6
vendor/composer/autoload_classmap.php
vendored
6
vendor/composer/autoload_classmap.php
vendored
@ -90,12 +90,6 @@ return array(
|
|||||||
'League\\Flysystem\\Util\\ContentListingFormatter' => $vendorDir . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
'League\\Flysystem\\Util\\ContentListingFormatter' => $vendorDir . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
||||||
'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php',
|
'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php',
|
||||||
'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php',
|
'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php',
|
||||||
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php',
|
|
||||||
'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php',
|
|
||||||
'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\MimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/MimeTypeDetector.php',
|
|
||||||
'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php',
|
'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php',
|
||||||
'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php',
|
'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php',
|
||||||
'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php',
|
'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php',
|
||||||
|
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
@ -18,7 +18,6 @@ return array(
|
|||||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
||||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
||||||
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
||||||
'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
|
|
||||||
'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
|
'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
|
||||||
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
||||||
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
||||||
|
11
vendor/composer/autoload_static.php
vendored
11
vendor/composer/autoload_static.php
vendored
@ -41,7 +41,6 @@ class ComposerStaticInit33b66ed99ea8fcca84c95dfb0e7ed409
|
|||||||
),
|
),
|
||||||
'L' =>
|
'L' =>
|
||||||
array (
|
array (
|
||||||
'League\\MimeTypeDetection\\' => 25,
|
|
||||||
'League\\Flysystem\\Cached\\' => 24,
|
'League\\Flysystem\\Cached\\' => 24,
|
||||||
'League\\Flysystem\\' => 17,
|
'League\\Flysystem\\' => 17,
|
||||||
),
|
),
|
||||||
@ -107,10 +106,6 @@ class ComposerStaticInit33b66ed99ea8fcca84c95dfb0e7ed409
|
|||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/psr/cache/src',
|
0 => __DIR__ . '/..' . '/psr/cache/src',
|
||||||
),
|
),
|
||||||
'League\\MimeTypeDetection\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/league/mime-type-detection/src',
|
|
||||||
),
|
|
||||||
'League\\Flysystem\\Cached\\' =>
|
'League\\Flysystem\\Cached\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
|
0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
|
||||||
@ -218,12 +213,6 @@ class ComposerStaticInit33b66ed99ea8fcca84c95dfb0e7ed409
|
|||||||
'League\\Flysystem\\Util\\ContentListingFormatter' => __DIR__ . '/..' . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
'League\\Flysystem\\Util\\ContentListingFormatter' => __DIR__ . '/..' . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
||||||
'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php',
|
'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php',
|
||||||
'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php',
|
'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php',
|
||||||
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php',
|
|
||||||
'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php',
|
|
||||||
'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php',
|
|
||||||
'League\\MimeTypeDetection\\MimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/MimeTypeDetector.php',
|
|
||||||
'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php',
|
'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php',
|
||||||
'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php',
|
'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php',
|
||||||
'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php',
|
'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php',
|
||||||
|
86
vendor/composer/installed.json
vendored
86
vendor/composer/installed.json
vendored
@ -69,17 +69,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.1.3",
|
"version": "1.0.70",
|
||||||
"version_normalized": "1.1.3.0",
|
"version_normalized": "1.0.70.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
|
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
|
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -90,15 +90,14 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*",
|
||||||
"league/mime-type-detection": "^1.3",
|
"php": ">=5.5.9"
|
||||||
"php": "^7.2.5 || ^8.0"
|
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"league/flysystem-sftp": "<1.0.6"
|
"league/flysystem-sftp": "<1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/prophecy": "^1.11.1",
|
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||||
"phpunit/phpunit": "^8.5.8"
|
"phpunit/phpunit": "^5.7.26"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-fileinfo": "Required for MimeType",
|
"ext-fileinfo": "Required for MimeType",
|
||||||
@ -116,7 +115,7 @@
|
|||||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||||
},
|
},
|
||||||
"time": "2020-08-23T07:39:11+00:00",
|
"time": "2020-07-26T07:20:36+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -221,65 +220,6 @@
|
|||||||
],
|
],
|
||||||
"description": "An adapter decorator to enable meta-data caching."
|
"description": "An adapter decorator to enable meta-data caching."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "league/mime-type-detection",
|
|
||||||
"version": "1.5.0",
|
|
||||||
"version_normalized": "1.5.0.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
|
||||||
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28",
|
|
||||||
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28",
|
|
||||||
"shasum": "",
|
|
||||||
"mirrors": [
|
|
||||||
{
|
|
||||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
|
||||||
"preferred": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"ext-fileinfo": "*",
|
|
||||||
"php": "^7.2 || ^8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpstan/phpstan": "^0.12.36",
|
|
||||||
"phpunit/phpunit": "^8.5.8"
|
|
||||||
},
|
|
||||||
"time": "2020-09-21T18:10:53+00:00",
|
|
||||||
"type": "library",
|
|
||||||
"installation-source": "dist",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"League\\MimeTypeDetection\\": "src"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Frank de Jonge",
|
|
||||||
"email": "info@frankdejonge.nl"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Mime-type detection for Flysystem",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://github.com/frankdejonge",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@ -893,12 +833,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "b55328975855e44d2947ccd5503e52b30385a117"
|
"reference": "0562b08dbf6ac48d4d811711e7641b57e290add8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b55328975855e44d2947ccd5503e52b30385a117",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/0562b08dbf6ac48d4d811711e7641b57e290add8",
|
||||||
"reference": "b55328975855e44d2947ccd5503e52b30385a117",
|
"reference": "0562b08dbf6ac48d4d811711e7641b57e290add8",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -915,7 +855,7 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-10-09T01:50:18+00:00",
|
"time": "2020-10-10T03:39:46+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
76
vendor/league/flysystem/CODE_OF_CONDUCT.md
vendored
76
vendor/league/flysystem/CODE_OF_CONDUCT.md
vendored
@ -1,76 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as
|
|
||||||
contributors and maintainers pledge to making participation in our project and
|
|
||||||
our community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
||||||
level of experience, education, socio-economic status, nationality, personal
|
|
||||||
appearance, race, religion, or sexual identity and orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment
|
|
||||||
include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
||||||
advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic
|
|
||||||
address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable
|
|
||||||
behavior and are expected to take appropriate and fair corrective action in
|
|
||||||
response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or
|
|
||||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
||||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
||||||
permanently any contributor for other behaviors that they deem inappropriate,
|
|
||||||
threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces
|
|
||||||
when an individual is representing the project or its community. Examples of
|
|
||||||
representing a project or community include using an official project e-mail
|
|
||||||
address, posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event. Representation of a project may be
|
|
||||||
further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported by contacting the project team at info+flysystem@frankdejonge.nl. All
|
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
|
||||||
is deemed necessary and appropriate to the circumstances. The project team is
|
|
||||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
||||||
Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
||||||
faith may face temporary or permanent repercussions as determined by other
|
|
||||||
members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
||||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see
|
|
||||||
https://www.contributor-covenant.org/faq
|
|
14
vendor/league/flysystem/composer.json
vendored
14
vendor/league/flysystem/composer.json
vendored
@ -21,13 +21,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5 || ^8.0",
|
"php": ">=5.5.9",
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*"
|
||||||
"league/mime-type-detection": "^1.3"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/prophecy": "^1.11.1",
|
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||||
"phpunit/phpunit": "^8.5.8"
|
"phpunit/phpunit": "^5.7.26"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@ -37,7 +36,10 @@
|
|||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"League\\Flysystem\\Stub\\": "stub/"
|
"League\\Flysystem\\Stub\\": "stub/"
|
||||||
}
|
},
|
||||||
|
"files": [
|
||||||
|
"tests/PHPUnitHacks.php"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-fileinfo": "Required for MimeType",
|
"ext-fileinfo": "Required for MimeType",
|
||||||
|
@ -440,13 +440,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
|||||||
$path = $base === '' ? $name : $base . $this->separator . $name;
|
$path = $base === '' ? $name : $base . $this->separator . $name;
|
||||||
|
|
||||||
if ($type === 'dir') {
|
if ($type === 'dir') {
|
||||||
$result = compact('type', 'path');
|
return compact('type', 'path');
|
||||||
if ($this->enableTimestampsOnUnixListings) {
|
|
||||||
$timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear);
|
|
||||||
$result += compact('timestamp');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissions = $this->normalizePermissions($permissions);
|
$permissions = $this->normalizePermissions($permissions);
|
||||||
@ -645,7 +639,10 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
|||||||
*/
|
*/
|
||||||
public function getConnection()
|
public function getConnection()
|
||||||
{
|
{
|
||||||
if ( ! $this->isConnected()) {
|
$tries = 0;
|
||||||
|
|
||||||
|
while ( ! $this->isConnected() && $tries < 3) {
|
||||||
|
$tries++;
|
||||||
$this->disconnect();
|
$this->disconnect();
|
||||||
$this->connect();
|
$this->connect();
|
||||||
}
|
}
|
||||||
@ -697,9 +694,4 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
abstract public function isConnected();
|
abstract public function isConnected();
|
||||||
|
|
||||||
protected function escapePath($path)
|
|
||||||
{
|
|
||||||
return str_replace(['*', '[', ']'], ['\\*', '\\[', '\\]'], $path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
13
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
13
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace League\Flysystem\Adapter;
|
namespace League\Flysystem\Adapter;
|
||||||
|
|
||||||
|
use ErrorException;
|
||||||
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
|
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
|
||||||
use League\Flysystem\AdapterInterface;
|
use League\Flysystem\AdapterInterface;
|
||||||
use League\Flysystem\Config;
|
use League\Flysystem\Config;
|
||||||
@ -129,9 +130,6 @@ class Ftp extends AbstractFtpAdapter
|
|||||||
*/
|
*/
|
||||||
public function connect()
|
public function connect()
|
||||||
{
|
{
|
||||||
$tries = 3;
|
|
||||||
start_connecting:
|
|
||||||
|
|
||||||
if ($this->ssl) {
|
if ($this->ssl) {
|
||||||
$this->connection = @ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
$this->connection = @ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
||||||
} else {
|
} else {
|
||||||
@ -139,10 +137,6 @@ class Ftp extends AbstractFtpAdapter
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $this->connection) {
|
if ( ! $this->connection) {
|
||||||
$tries--;
|
|
||||||
|
|
||||||
if ($tries > 0) goto start_connecting;
|
|
||||||
|
|
||||||
throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +394,7 @@ class Ftp extends AbstractFtpAdapter
|
|||||||
return ['type' => 'dir', 'path' => $path];
|
return ['type' => 'dir', 'path' => $path];
|
||||||
}
|
}
|
||||||
|
|
||||||
$listing = $this->ftpRawlist('-A', $path);
|
$listing = $this->ftpRawlist('-A', str_replace('*', '\\*', $path));
|
||||||
|
|
||||||
if (empty($listing) || in_array('total 0', $listing, true)) {
|
if (empty($listing) || in_array('total 0', $listing, true)) {
|
||||||
return false;
|
return false;
|
||||||
@ -496,6 +490,8 @@ class Ftp extends AbstractFtpAdapter
|
|||||||
*/
|
*/
|
||||||
protected function listDirectoryContents($directory, $recursive = true)
|
protected function listDirectoryContents($directory, $recursive = true)
|
||||||
{
|
{
|
||||||
|
$directory = str_replace('*', '\\*', $directory);
|
||||||
|
|
||||||
if ($recursive && $this->recurseManually) {
|
if ($recursive && $this->recurseManually) {
|
||||||
return $this->listDirectoryContentsRecursive($directory);
|
return $this->listDirectoryContentsRecursive($directory);
|
||||||
}
|
}
|
||||||
@ -564,7 +560,6 @@ class Ftp extends AbstractFtpAdapter
|
|||||||
|
|
||||||
if ($this->isPureFtpd) {
|
if ($this->isPureFtpd) {
|
||||||
$path = str_replace(' ', '\ ', $path);
|
$path = str_replace(' ', '\ ', $path);
|
||||||
$this->escapePath($path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ftp_rawlist($connection, $options . ' ' . $path);
|
return ftp_rawlist($connection, $options . ' ' . $path);
|
||||||
|
7
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
7
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
@ -12,16 +12,13 @@ class Ftpd extends Ftp
|
|||||||
if ($path === '') {
|
if ($path === '') {
|
||||||
return ['type' => 'dir', 'path' => ''];
|
return ['type' => 'dir', 'path' => ''];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@ftp_chdir($this->getConnection(), $path) === true) {
|
if (@ftp_chdir($this->getConnection(), $path) === true) {
|
||||||
$this->setConnectionRoot();
|
$this->setConnectionRoot();
|
||||||
|
|
||||||
return ['type' => 'dir', 'path' => $path];
|
return ['type' => 'dir', 'path' => $path];
|
||||||
}
|
}
|
||||||
|
|
||||||
$object = ftp_raw($this->getConnection(), 'STAT ' . $this->escapePath($path));
|
if ( ! ($object = ftp_raw($this->getConnection(), 'STAT ' . $path)) || count($object) < 3) {
|
||||||
|
|
||||||
if ( ! $object || count($object) < 3) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +34,7 @@ class Ftpd extends Ftp
|
|||||||
*/
|
*/
|
||||||
protected function listDirectoryContents($directory, $recursive = true)
|
protected function listDirectoryContents($directory, $recursive = true)
|
||||||
{
|
{
|
||||||
$listing = ftp_rawlist($this->getConnection(), $this->escapePath($directory), $recursive);
|
$listing = ftp_rawlist($this->getConnection(), $directory, $recursive);
|
||||||
|
|
||||||
if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
|
if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
|
||||||
return [];
|
return [];
|
||||||
|
6
vendor/league/flysystem/src/Filesystem.php
vendored
6
vendor/league/flysystem/src/Filesystem.php
vendored
@ -74,7 +74,7 @@ class Filesystem implements FilesystemInterface
|
|||||||
*/
|
*/
|
||||||
public function writeStream($path, $resource, array $config = [])
|
public function writeStream($path, $resource, array $config = [])
|
||||||
{
|
{
|
||||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
if ( ! is_resource($resource)) {
|
||||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ class Filesystem implements FilesystemInterface
|
|||||||
*/
|
*/
|
||||||
public function putStream($path, $resource, array $config = [])
|
public function putStream($path, $resource, array $config = [])
|
||||||
{
|
{
|
||||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
if ( ! is_resource($resource)) {
|
||||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class Filesystem implements FilesystemInterface
|
|||||||
*/
|
*/
|
||||||
public function updateStream($path, $resource, array $config = [])
|
public function updateStream($path, $resource, array $config = [])
|
||||||
{
|
{
|
||||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
if ( ! is_resource($resource)) {
|
||||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
233
vendor/league/flysystem/src/Util/MimeType.php
vendored
233
vendor/league/flysystem/src/Util/MimeType.php
vendored
@ -2,72 +2,241 @@
|
|||||||
|
|
||||||
namespace League\Flysystem\Util;
|
namespace League\Flysystem\Util;
|
||||||
|
|
||||||
use League\MimeTypeDetection\FinfoMimeTypeDetector;
|
use ErrorException;
|
||||||
use League\MimeTypeDetection\GeneratedExtensionToMimeTypeMap;
|
use finfo;
|
||||||
use League\MimeTypeDetection\MimeTypeDetector;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
class MimeType
|
class MimeType
|
||||||
{
|
{
|
||||||
protected static $extensionToMimeTypeMap = GeneratedExtensionToMimeTypeMap::MIME_TYPES_FOR_EXTENSIONS;
|
protected static $extensionToMimeTypeMap = [
|
||||||
protected static $detector;
|
'hqx' => 'application/mac-binhex40',
|
||||||
|
'cpt' => 'application/mac-compactpro',
|
||||||
public static function useDetector(MimeTypeDetector $detector)
|
'csv' => 'text/csv',
|
||||||
{
|
'bin' => 'application/octet-stream',
|
||||||
static::$detector = $detector;
|
'dms' => 'application/octet-stream',
|
||||||
}
|
'lha' => 'application/octet-stream',
|
||||||
|
'lzh' => 'application/octet-stream',
|
||||||
/**
|
'exe' => 'application/octet-stream',
|
||||||
* @return MimeTypeDetector
|
'class' => 'application/octet-stream',
|
||||||
*/
|
'psd' => 'application/x-photoshop',
|
||||||
protected static function detector()
|
'so' => 'application/octet-stream',
|
||||||
{
|
'sea' => 'application/octet-stream',
|
||||||
if ( ! static::$detector instanceof MimeTypeDetector) {
|
'dll' => 'application/octet-stream',
|
||||||
static::$detector = new FinfoMimeTypeDetector();
|
'oda' => 'application/oda',
|
||||||
}
|
'pdf' => 'application/pdf',
|
||||||
|
'ai' => 'application/pdf',
|
||||||
return static::$detector;
|
'eps' => 'application/postscript',
|
||||||
}
|
'epub' => 'application/epub+zip',
|
||||||
|
'ps' => 'application/postscript',
|
||||||
|
'smi' => 'application/smil',
|
||||||
|
'smil' => 'application/smil',
|
||||||
|
'mif' => 'application/vnd.mif',
|
||||||
|
'xls' => 'application/vnd.ms-excel',
|
||||||
|
'xlt' => 'application/vnd.ms-excel',
|
||||||
|
'xla' => 'application/vnd.ms-excel',
|
||||||
|
'ppt' => 'application/powerpoint',
|
||||||
|
'pot' => 'application/vnd.ms-powerpoint',
|
||||||
|
'pps' => 'application/vnd.ms-powerpoint',
|
||||||
|
'ppa' => 'application/vnd.ms-powerpoint',
|
||||||
|
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||||
|
'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
|
||||||
|
'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
||||||
|
'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
|
||||||
|
'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
||||||
|
'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
||||||
|
'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
|
||||||
|
'wbxml' => 'application/wbxml',
|
||||||
|
'wmlc' => 'application/wmlc',
|
||||||
|
'dcr' => 'application/x-director',
|
||||||
|
'dir' => 'application/x-director',
|
||||||
|
'dxr' => 'application/x-director',
|
||||||
|
'dvi' => 'application/x-dvi',
|
||||||
|
'gtar' => 'application/x-gtar',
|
||||||
|
'gz' => 'application/x-gzip',
|
||||||
|
'gzip' => 'application/x-gzip',
|
||||||
|
'php' => 'application/x-httpd-php',
|
||||||
|
'php4' => 'application/x-httpd-php',
|
||||||
|
'php3' => 'application/x-httpd-php',
|
||||||
|
'phtml' => 'application/x-httpd-php',
|
||||||
|
'phps' => 'application/x-httpd-php-source',
|
||||||
|
'js' => 'application/javascript',
|
||||||
|
'swf' => 'application/x-shockwave-flash',
|
||||||
|
'sit' => 'application/x-stuffit',
|
||||||
|
'tar' => 'application/x-tar',
|
||||||
|
'tgz' => 'application/x-tar',
|
||||||
|
'z' => 'application/x-compress',
|
||||||
|
'xhtml' => 'application/xhtml+xml',
|
||||||
|
'xht' => 'application/xhtml+xml',
|
||||||
|
'rdf' => 'application/rdf+xml',
|
||||||
|
'zip' => 'application/x-zip',
|
||||||
|
'rar' => 'application/x-rar',
|
||||||
|
'mid' => 'audio/midi',
|
||||||
|
'midi' => 'audio/midi',
|
||||||
|
'mpga' => 'audio/mpeg',
|
||||||
|
'mp2' => 'audio/mpeg',
|
||||||
|
'mp3' => 'audio/mpeg',
|
||||||
|
'aif' => 'audio/x-aiff',
|
||||||
|
'aiff' => 'audio/x-aiff',
|
||||||
|
'aifc' => 'audio/x-aiff',
|
||||||
|
'ram' => 'audio/x-pn-realaudio',
|
||||||
|
'rm' => 'audio/x-pn-realaudio',
|
||||||
|
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||||
|
'ra' => 'audio/x-realaudio',
|
||||||
|
'rv' => 'video/vnd.rn-realvideo',
|
||||||
|
'wav' => 'audio/x-wav',
|
||||||
|
'jpg' => 'image/jpeg',
|
||||||
|
'jpeg' => 'image/jpeg',
|
||||||
|
'jpe' => 'image/jpeg',
|
||||||
|
'png' => 'image/png',
|
||||||
|
'gif' => 'image/gif',
|
||||||
|
'bmp' => 'image/bmp',
|
||||||
|
'tiff' => 'image/tiff',
|
||||||
|
'tif' => 'image/tiff',
|
||||||
|
'svg' => 'image/svg+xml',
|
||||||
|
'css' => 'text/css',
|
||||||
|
'html' => 'text/html',
|
||||||
|
'htm' => 'text/html',
|
||||||
|
'shtml' => 'text/html',
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'text' => 'text/plain',
|
||||||
|
'log' => 'text/plain',
|
||||||
|
'markdown' => 'text/markdown',
|
||||||
|
'md' => 'text/markdown',
|
||||||
|
'rtx' => 'text/richtext',
|
||||||
|
'rtf' => 'text/rtf',
|
||||||
|
'xml' => 'application/xml',
|
||||||
|
'xsl' => 'application/xml',
|
||||||
|
'dmn' => 'application/octet-stream',
|
||||||
|
'bpmn' => 'application/octet-stream',
|
||||||
|
'mpeg' => 'video/mpeg',
|
||||||
|
'mpg' => 'video/mpeg',
|
||||||
|
'mpe' => 'video/mpeg',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
'mov' => 'video/quicktime',
|
||||||
|
'avi' => 'video/x-msvideo',
|
||||||
|
'movie' => 'video/x-sgi-movie',
|
||||||
|
'doc' => 'application/msword',
|
||||||
|
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'docm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
||||||
|
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
||||||
|
'dot' => 'application/msword',
|
||||||
|
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||||
|
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
||||||
|
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
||||||
|
'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
|
||||||
|
'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
|
||||||
|
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
|
||||||
|
'word' => 'application/msword',
|
||||||
|
'xl' => 'application/excel',
|
||||||
|
'eml' => 'message/rfc822',
|
||||||
|
'json' => 'application/json',
|
||||||
|
'pem' => 'application/x-x509-user-cert',
|
||||||
|
'p10' => 'application/x-pkcs10',
|
||||||
|
'p12' => 'application/x-pkcs12',
|
||||||
|
'p7a' => 'application/x-pkcs7-signature',
|
||||||
|
'p7c' => 'application/pkcs7-mime',
|
||||||
|
'p7m' => 'application/pkcs7-mime',
|
||||||
|
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||||
|
'p7s' => 'application/pkcs7-signature',
|
||||||
|
'crt' => 'application/x-x509-ca-cert',
|
||||||
|
'crl' => 'application/pkix-crl',
|
||||||
|
'der' => 'application/x-x509-ca-cert',
|
||||||
|
'kdb' => 'application/octet-stream',
|
||||||
|
'pgp' => 'application/pgp',
|
||||||
|
'gpg' => 'application/gpg-keys',
|
||||||
|
'sst' => 'application/octet-stream',
|
||||||
|
'csr' => 'application/octet-stream',
|
||||||
|
'rsa' => 'application/x-pkcs7',
|
||||||
|
'cer' => 'application/pkix-cert',
|
||||||
|
'3g2' => 'video/3gpp2',
|
||||||
|
'3gp' => 'video/3gp',
|
||||||
|
'mp4' => 'video/mp4',
|
||||||
|
'm4a' => 'audio/x-m4a',
|
||||||
|
'f4v' => 'video/mp4',
|
||||||
|
'webm' => 'video/webm',
|
||||||
|
'aac' => 'audio/x-acc',
|
||||||
|
'm4u' => 'application/vnd.mpegurl',
|
||||||
|
'm3u' => 'text/plain',
|
||||||
|
'xspf' => 'application/xspf+xml',
|
||||||
|
'vlc' => 'application/videolan',
|
||||||
|
'wmv' => 'video/x-ms-wmv',
|
||||||
|
'au' => 'audio/x-au',
|
||||||
|
'ac3' => 'audio/ac3',
|
||||||
|
'flac' => 'audio/x-flac',
|
||||||
|
'ogg' => 'audio/ogg',
|
||||||
|
'kmz' => 'application/vnd.google-earth.kmz',
|
||||||
|
'kml' => 'application/vnd.google-earth.kml+xml',
|
||||||
|
'ics' => 'text/calendar',
|
||||||
|
'zsh' => 'text/x-scriptzsh',
|
||||||
|
'7zip' => 'application/x-7z-compressed',
|
||||||
|
'cdr' => 'application/cdr',
|
||||||
|
'wma' => 'audio/x-ms-wma',
|
||||||
|
'jar' => 'application/java-archive',
|
||||||
|
'tex' => 'application/x-tex',
|
||||||
|
'latex' => 'application/x-latex',
|
||||||
|
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||||
|
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||||
|
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||||
|
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||||
|
'odc' => 'application/vnd.oasis.opendocument.chart',
|
||||||
|
'odf' => 'application/vnd.oasis.opendocument.formula',
|
||||||
|
'odi' => 'application/vnd.oasis.opendocument.image',
|
||||||
|
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||||
|
'odb' => 'application/vnd.oasis.opendocument.database',
|
||||||
|
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||||
|
'webp' => 'image/webp',
|
||||||
|
'ico' => 'image/x-icon',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects MIME Type based on given content.
|
* Detects MIME Type based on given content.
|
||||||
*
|
*
|
||||||
* @param mixed $content
|
* @param mixed $content
|
||||||
*
|
*
|
||||||
* @return string MIME Type
|
* @return string|null MIME Type or NULL if no mime type detected
|
||||||
*/
|
*/
|
||||||
public static function detectByContent($content)
|
public static function detectByContent($content)
|
||||||
{
|
{
|
||||||
if (is_string($content)) {
|
if ( ! class_exists('finfo') || ! is_string($content)) {
|
||||||
return static::detector()->detectMimeTypeFromBuffer($content);
|
return null;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
|
|
||||||
return 'text/plain';
|
return $finfo->buffer($content) ?: null;
|
||||||
}
|
// @codeCoverageIgnoreStart
|
||||||
|
} catch (ErrorException $e) {
|
||||||
|
// This is caused by an array to string conversion error.
|
||||||
|
}
|
||||||
|
} // @codeCoverageIgnoreEnd
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects MIME Type based on file extension.
|
* Detects MIME Type based on file extension.
|
||||||
*
|
*
|
||||||
* @param string $extension
|
* @param string $extension
|
||||||
*
|
*
|
||||||
* @return string MIME Type
|
* @return string|null MIME Type or NULL if no extension detected
|
||||||
*/
|
*/
|
||||||
public static function detectByFileExtension($extension)
|
public static function detectByFileExtension($extension)
|
||||||
{
|
{
|
||||||
return static::detector()->detectMimeTypeFromPath('artificial.' . $extension) ?: 'text/plain';
|
return isset(static::$extensionToMimeTypeMap[$extension])
|
||||||
|
? static::$extensionToMimeTypeMap[$extension]
|
||||||
|
: 'text/plain';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
*
|
*
|
||||||
* @return string MIME Type
|
* @return string|null MIME Type or NULL if no extension detected
|
||||||
*/
|
*/
|
||||||
public static function detectByFilename($filename)
|
public static function detectByFilename($filename)
|
||||||
{
|
{
|
||||||
return static::detector()->detectMimeTypeFromPath($filename) ?: 'text/plain';
|
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
|
return empty($extension) ? 'text/plain' : static::detectByFileExtension($extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
19
vendor/league/mime-type-detection/LICENSE
vendored
19
vendor/league/mime-type-detection/LICENSE
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2013-2020 Frank de Jonge
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
|
||||||
to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
24
vendor/league/mime-type-detection/composer.json
vendored
24
vendor/league/mime-type-detection/composer.json
vendored
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "league/mime-type-detection",
|
|
||||||
"description": "Mime-type detection for Flysystem",
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Frank de Jonge",
|
|
||||||
"email": "info@frankdejonge.nl"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": "^7.2 || ^8.0",
|
|
||||||
"ext-fileinfo": "*"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^8.5.8",
|
|
||||||
"phpstan/phpstan": "^0.12.36"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"League\\MimeTypeDetection\\": "src"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace League\MimeTypeDetection;
|
|
||||||
|
|
||||||
class EmptyExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
|
||||||
{
|
|
||||||
public function lookupMimeType(string $extension): ?string
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace League\MimeTypeDetection;
|
|
||||||
|
|
||||||
use const PATHINFO_EXTENSION;
|
|
||||||
|
|
||||||
class ExtensionMimeTypeDetector implements MimeTypeDetector
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var ExtensionToMimeTypeMap
|
|
||||||
*/
|
|
||||||
private $extensions;
|
|
||||||
|
|
||||||
public function __construct(ExtensionToMimeTypeMap $extensions = null)
|
|
||||||
{
|
|
||||||
$this->extensions = $extensions ?: new GeneratedExtensionToMimeTypeMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeType(string $path, $contents): ?string
|
|
||||||
{
|
|
||||||
return $this->detectMimeTypeFromPath($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromPath(string $path): ?string
|
|
||||||
{
|
|
||||||
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
|
||||||
|
|
||||||
return $this->extensions->lookupMimeType($extension);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromFile(string $path): ?string
|
|
||||||
{
|
|
||||||
return $this->detectMimeTypeFromPath($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromBuffer(string $contents): ?string
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace League\MimeTypeDetection;
|
|
||||||
|
|
||||||
interface ExtensionToMimeTypeMap
|
|
||||||
{
|
|
||||||
public function lookupMimeType(string $extension): ?string;
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace League\MimeTypeDetection;
|
|
||||||
|
|
||||||
use finfo;
|
|
||||||
|
|
||||||
use const FILEINFO_MIME_TYPE;
|
|
||||||
use const PATHINFO_EXTENSION;
|
|
||||||
|
|
||||||
class FinfoMimeTypeDetector implements MimeTypeDetector
|
|
||||||
{
|
|
||||||
private const INCONCLUSIVE_MIME_TYPES = ['application/x-empty', 'text/plain', 'text/x-asm'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var finfo
|
|
||||||
*/
|
|
||||||
private $finfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var ExtensionToMimeTypeMap
|
|
||||||
*/
|
|
||||||
private $extensionMap;
|
|
||||||
|
|
||||||
public function __construct(string $magicFile = '', ExtensionToMimeTypeMap $extensionMap = null)
|
|
||||||
{
|
|
||||||
$this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile);
|
|
||||||
$this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeType(string $path, $contents): ?string
|
|
||||||
{
|
|
||||||
$mimeType = is_string($contents)
|
|
||||||
? (@$this->finfo->buffer($contents) ?: null)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
if ($mimeType !== null && ! in_array($mimeType, self::INCONCLUSIVE_MIME_TYPES)) {
|
|
||||||
return $mimeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->detectMimeTypeFromPath($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromPath(string $path): ?string
|
|
||||||
{
|
|
||||||
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
|
||||||
|
|
||||||
return $this->extensionMap->lookupMimeType($extension);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromFile(string $path): ?string
|
|
||||||
{
|
|
||||||
return @$this->finfo->file($path) ?: null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detectMimeTypeFromBuffer(string $contents): ?string
|
|
||||||
{
|
|
||||||
return @$this->finfo->buffer($contents) ?: null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace League\MimeTypeDetection;
|
|
||||||
|
|
||||||
interface MimeTypeDetector
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string|resource $contents
|
|
||||||
*/
|
|
||||||
public function detectMimeType(string $path, $contents): ?string;
|
|
||||||
|
|
||||||
public function detectMimeTypeFromBuffer(string $contents): ?string;
|
|
||||||
|
|
||||||
public function detectMimeTypeFromPath(string $path): ?string;
|
|
||||||
|
|
||||||
public function detectMimeTypeFromFile(string $path): ?string;
|
|
||||||
}
|
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-10-09 09:38:02
|
// This file is automatically generated at:2020-10-10 12:28:45
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
@ -86,7 +86,7 @@ class Database extends Command
|
|||||||
$this->queue->message($total, ++$used, "正在优化数据表 {$table}");
|
$this->queue->message($total, ++$used, "正在优化数据表 {$table}");
|
||||||
$this->app->db->query("OPTIMIZE TABLE `{$table}`");
|
$this->app->db->query("OPTIMIZE TABLE `{$table}`");
|
||||||
}
|
}
|
||||||
$this->queue->success("已完成对 {$total} 张数据优化复操作");
|
$this->queue->success("已完成对 {$total} 张数据表优化操作");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,11 +60,8 @@ class JsonRpcServer
|
|||||||
public function handle($object)
|
public function handle($object)
|
||||||
{
|
{
|
||||||
// Checks if a JSON-RCP request has been received
|
// Checks if a JSON-RCP request has been received
|
||||||
if ($this->app->request->method() !== "POST" || $this->app->request->contentType() != 'application/json') {
|
if ($this->app->request->method() !== "POST" || $this->app->request->contentType() !== 'application/json') {
|
||||||
echo "<h2>" . get_class($object) . "</h2>";
|
$this->printMethod($object);
|
||||||
foreach (get_class_methods($object) as $method) {
|
|
||||||
if ($method[0] !== '_') echo "<p>method {$method}()</p>";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Reads the input data
|
// Reads the input data
|
||||||
$request = json_decode(file_get_contents('php://input'), true);
|
$request = json_decode(file_get_contents('php://input'), true);
|
||||||
@ -90,4 +87,28 @@ class JsonRpcServer
|
|||||||
throw new HttpResponseException(json($response)->contentType('text/javascript'));
|
throw new HttpResponseException(json($response)->contentType('text/javascript'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印输出对象方法
|
||||||
|
* @param mixed $object
|
||||||
|
*/
|
||||||
|
protected function printMethod($object)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$object = new \ReflectionClass($object);
|
||||||
|
echo "<h2>" . $object->getName() . "</h2><hr>";
|
||||||
|
foreach ($object->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
|
||||||
|
$params = [];
|
||||||
|
foreach ($method->getParameters() as $parameter) {
|
||||||
|
$type = $parameter->getType();
|
||||||
|
$params[] = ($type ? "{$type} $" : '$') . $parameter->getName();
|
||||||
|
}
|
||||||
|
$params = count($params) > 0 ? join(', ', $params) : '';
|
||||||
|
echo '<div style="color:#666">' . nl2br($method->getDocComment()) . '</div>';
|
||||||
|
echo "<div style='color:#00E'>{$object->getShortName()}::{$method->getName()}({$params})</div><br>";
|
||||||
|
}
|
||||||
|
} catch (\Exception $exception) {
|
||||||
|
echo "<h3>[{$exception->getCode()}] {$exception->getMessage()}</h3>";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user