瀏覽代碼

Remove vendor dir

Maurits van der Schee 4 年之前
父節點
當前提交
a7403b278c
共有 72 個文件被更改,包括 396 次插入5275 次删除
  1. 1
    2
      .gitignore
  2. 395
    0
      composer.lock
  3. 0
    7
      vendor/autoload.php
  4. 0
    445
      vendor/composer/ClassLoader.php
  5. 0
    21
      vendor/composer/LICENSE
  6. 0
    9
      vendor/composer/autoload_classmap.php
  7. 0
    9
      vendor/composer/autoload_namespaces.php
  8. 0
    15
      vendor/composer/autoload_psr4.php
  9. 0
    52
      vendor/composer/autoload_real.php
  10. 0
    67
      vendor/composer/autoload_static.php
  11. 0
    388
      vendor/composer/installed.json
  12. 0
    36
      vendor/nyholm/psr7-server/CHANGELOG.md
  13. 0
    21
      vendor/nyholm/psr7-server/LICENSE
  14. 0
    38
      vendor/nyholm/psr7-server/README.md
  15. 0
    41
      vendor/nyholm/psr7-server/composer.json
  16. 0
    271
      vendor/nyholm/psr7-server/src/ServerRequestCreator.php
  17. 0
    58
      vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php
  18. 0
    65
      vendor/nyholm/psr7/CHANGELOG.md
  19. 0
    21
      vendor/nyholm/psr7/LICENSE
  20. 0
    110
      vendor/nyholm/psr7/README.md
  21. 0
    51
      vendor/nyholm/psr7/composer.json
  22. 0
    25
      vendor/nyholm/psr7/phpstan.neon.dist
  23. 0
    40
      vendor/nyholm/psr7/src/Factory/HttplugFactory.php
  24. 0
    68
      vendor/nyholm/psr7/src/Factory/Psr17Factory.php
  25. 0
    202
      vendor/nyholm/psr7/src/MessageTrait.php
  26. 0
    45
      vendor/nyholm/psr7/src/Request.php
  27. 0
    113
      vendor/nyholm/psr7/src/RequestTrait.php
  28. 0
    88
      vendor/nyholm/psr7/src/Response.php
  29. 0
    162
      vendor/nyholm/psr7/src/ServerRequest.php
  30. 0
    257
      vendor/nyholm/psr7/src/Stream.php
  31. 0
    171
      vendor/nyholm/psr7/src/UploadedFile.php
  32. 0
    310
      vendor/nyholm/psr7/src/Uri.php
  33. 0
    65
      vendor/php-http/message-factory/CHANGELOG.md
  34. 0
    19
      vendor/php-http/message-factory/LICENSE
  35. 0
    36
      vendor/php-http/message-factory/README.md
  36. 0
    27
      vendor/php-http/message-factory/composer.json
  37. 0
    43
      vendor/php-http/message-factory/puli.json
  38. 0
    12
      vendor/php-http/message-factory/src/MessageFactory.php
  39. 0
    34
      vendor/php-http/message-factory/src/RequestFactory.php
  40. 0
    35
      vendor/php-http/message-factory/src/ResponseFactory.php
  41. 0
    25
      vendor/php-http/message-factory/src/StreamFactory.php
  42. 0
    24
      vendor/php-http/message-factory/src/UriFactory.php
  43. 0
    2
      vendor/psr/http-factory/.gitignore
  44. 0
    7
      vendor/psr/http-factory/.pullapprove.yml
  45. 0
    21
      vendor/psr/http-factory/LICENSE
  46. 0
    10
      vendor/psr/http-factory/README.md
  47. 0
    35
      vendor/psr/http-factory/composer.json
  48. 0
    18
      vendor/psr/http-factory/src/RequestFactoryInterface.php
  49. 0
    18
      vendor/psr/http-factory/src/ResponseFactoryInterface.php
  50. 0
    24
      vendor/psr/http-factory/src/ServerRequestFactoryInterface.php
  51. 0
    45
      vendor/psr/http-factory/src/StreamFactoryInterface.php
  52. 0
    34
      vendor/psr/http-factory/src/UploadedFileFactoryInterface.php
  53. 0
    17
      vendor/psr/http-factory/src/UriFactoryInterface.php
  54. 0
    36
      vendor/psr/http-message/CHANGELOG.md
  55. 0
    19
      vendor/psr/http-message/LICENSE
  56. 0
    13
      vendor/psr/http-message/README.md
  57. 0
    26
      vendor/psr/http-message/composer.json
  58. 0
    187
      vendor/psr/http-message/src/MessageInterface.php
  59. 0
    129
      vendor/psr/http-message/src/RequestInterface.php
  60. 0
    68
      vendor/psr/http-message/src/ResponseInterface.php
  61. 0
    261
      vendor/psr/http-message/src/ServerRequestInterface.php
  62. 0
    158
      vendor/psr/http-message/src/StreamInterface.php
  63. 0
    123
      vendor/psr/http-message/src/UploadedFileInterface.php
  64. 0
    323
      vendor/psr/http-message/src/UriInterface.php
  65. 0
    21
      vendor/psr/http-server-handler/LICENSE
  66. 0
    6
      vendor/psr/http-server-handler/README.md
  67. 0
    36
      vendor/psr/http-server-handler/composer.json
  68. 0
    22
      vendor/psr/http-server-handler/src/RequestHandlerInterface.php
  69. 0
    21
      vendor/psr/http-server-middleware/LICENSE
  70. 0
    6
      vendor/psr/http-server-middleware/README.md
  71. 0
    36
      vendor/psr/http-server-middleware/composer.json
  72. 0
    25
      vendor/psr/http-server-middleware/src/MiddlewareInterface.php

+ 1
- 2
.gitignore 查看文件

@@ -1,3 +1,2 @@
1 1
 composer.phar
2
-composer.lock
3
-.git
2
+vendor/

+ 395
- 0
composer.lock 查看文件

@@ -0,0 +1,395 @@
1
+{
2
+    "_readme": [
3
+        "This file locks the dependencies of your project to a known state",
4
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+        "This file is @generated automatically"
6
+    ],
7
+    "content-hash": "3667d105fa59f4e36775fe664aef0f2f",
8
+    "packages": [
9
+        {
10
+            "name": "nyholm/psr7",
11
+            "version": "1.1.0",
12
+            "source": {
13
+                "type": "git",
14
+                "url": "https://github.com/Nyholm/psr7.git",
15
+                "reference": "701fe7ea8c12c07b985b156d589134d328160cf7"
16
+            },
17
+            "dist": {
18
+                "type": "zip",
19
+                "url": "https://api.github.com/repos/Nyholm/psr7/zipball/701fe7ea8c12c07b985b156d589134d328160cf7",
20
+                "reference": "701fe7ea8c12c07b985b156d589134d328160cf7",
21
+                "shasum": ""
22
+            },
23
+            "require": {
24
+                "php": "^7.1",
25
+                "php-http/message-factory": "^1.0",
26
+                "psr/http-factory": "^1.0",
27
+                "psr/http-message": "^1.0"
28
+            },
29
+            "provide": {
30
+                "psr/http-factory-implementation": "1.0",
31
+                "psr/http-message-implementation": "1.0"
32
+            },
33
+            "require-dev": {
34
+                "http-interop/http-factory-tests": "dev-master",
35
+                "php-http/psr7-integration-tests": "dev-master",
36
+                "phpunit/phpunit": "^7.5"
37
+            },
38
+            "type": "library",
39
+            "extra": {
40
+                "branch-alias": {
41
+                    "dev-master": "1.0-dev"
42
+                }
43
+            },
44
+            "autoload": {
45
+                "psr-4": {
46
+                    "Nyholm\\Psr7\\": "src/"
47
+                }
48
+            },
49
+            "notification-url": "https://packagist.org/downloads/",
50
+            "license": [
51
+                "MIT"
52
+            ],
53
+            "authors": [
54
+                {
55
+                    "name": "Tobias Nyholm",
56
+                    "email": "tobias.nyholm@gmail.com"
57
+                },
58
+                {
59
+                    "name": "Martijn van der Ven",
60
+                    "email": "martijn@vanderven.se"
61
+                }
62
+            ],
63
+            "description": "A fast PHP7 implementation of PSR-7",
64
+            "homepage": "http://tnyholm.se",
65
+            "keywords": [
66
+                "psr-17",
67
+                "psr-7"
68
+            ],
69
+            "time": "2019-02-16T17:20:43+00:00"
70
+        },
71
+        {
72
+            "name": "nyholm/psr7-server",
73
+            "version": "0.3.0",
74
+            "source": {
75
+                "type": "git",
76
+                "url": "https://github.com/Nyholm/psr7-server.git",
77
+                "reference": "1b71a848fcb066fb805b7a9ab3f41ff65bffcde8"
78
+            },
79
+            "dist": {
80
+                "type": "zip",
81
+                "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/1b71a848fcb066fb805b7a9ab3f41ff65bffcde8",
82
+                "reference": "1b71a848fcb066fb805b7a9ab3f41ff65bffcde8",
83
+                "shasum": ""
84
+            },
85
+            "require": {
86
+                "php": "^7.1",
87
+                "psr/http-factory": "^1.0",
88
+                "psr/http-message": "^1.0"
89
+            },
90
+            "require-dev": {
91
+                "nyholm/nsa": "^1.1",
92
+                "nyholm/psr7": "^1.0",
93
+                "phpunit/phpunit": "^7.0"
94
+            },
95
+            "type": "library",
96
+            "autoload": {
97
+                "psr-4": {
98
+                    "Nyholm\\Psr7Server\\": "src/"
99
+                }
100
+            },
101
+            "notification-url": "https://packagist.org/downloads/",
102
+            "license": [
103
+                "MIT"
104
+            ],
105
+            "authors": [
106
+                {
107
+                    "name": "Tobias Nyholm",
108
+                    "email": "tobias.nyholm@gmail.com"
109
+                },
110
+                {
111
+                    "name": "Martijn van der Ven",
112
+                    "email": "martijn@vanderven.se"
113
+                }
114
+            ],
115
+            "description": "Helper classes to handle PSR-7 server requests",
116
+            "homepage": "http://tnyholm.se",
117
+            "keywords": [
118
+                "psr-17",
119
+                "psr-7"
120
+            ],
121
+            "time": "2018-09-02T10:41:28+00:00"
122
+        },
123
+        {
124
+            "name": "php-http/message-factory",
125
+            "version": "v1.0.2",
126
+            "source": {
127
+                "type": "git",
128
+                "url": "https://github.com/php-http/message-factory.git",
129
+                "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
130
+            },
131
+            "dist": {
132
+                "type": "zip",
133
+                "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
134
+                "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
135
+                "shasum": ""
136
+            },
137
+            "require": {
138
+                "php": ">=5.4",
139
+                "psr/http-message": "^1.0"
140
+            },
141
+            "type": "library",
142
+            "extra": {
143
+                "branch-alias": {
144
+                    "dev-master": "1.0-dev"
145
+                }
146
+            },
147
+            "autoload": {
148
+                "psr-4": {
149
+                    "Http\\Message\\": "src/"
150
+                }
151
+            },
152
+            "notification-url": "https://packagist.org/downloads/",
153
+            "license": [
154
+                "MIT"
155
+            ],
156
+            "authors": [
157
+                {
158
+                    "name": "Márk Sági-Kazár",
159
+                    "email": "mark.sagikazar@gmail.com"
160
+                }
161
+            ],
162
+            "description": "Factory interfaces for PSR-7 HTTP Message",
163
+            "homepage": "http://php-http.org",
164
+            "keywords": [
165
+                "factory",
166
+                "http",
167
+                "message",
168
+                "stream",
169
+                "uri"
170
+            ],
171
+            "time": "2015-12-19T14:08:53+00:00"
172
+        },
173
+        {
174
+            "name": "psr/http-factory",
175
+            "version": "1.0.1",
176
+            "source": {
177
+                "type": "git",
178
+                "url": "https://github.com/php-fig/http-factory.git",
179
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
180
+            },
181
+            "dist": {
182
+                "type": "zip",
183
+                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
184
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
185
+                "shasum": ""
186
+            },
187
+            "require": {
188
+                "php": ">=7.0.0",
189
+                "psr/http-message": "^1.0"
190
+            },
191
+            "type": "library",
192
+            "extra": {
193
+                "branch-alias": {
194
+                    "dev-master": "1.0.x-dev"
195
+                }
196
+            },
197
+            "autoload": {
198
+                "psr-4": {
199
+                    "Psr\\Http\\Message\\": "src/"
200
+                }
201
+            },
202
+            "notification-url": "https://packagist.org/downloads/",
203
+            "license": [
204
+                "MIT"
205
+            ],
206
+            "authors": [
207
+                {
208
+                    "name": "PHP-FIG",
209
+                    "homepage": "http://www.php-fig.org/"
210
+                }
211
+            ],
212
+            "description": "Common interfaces for PSR-7 HTTP message factories",
213
+            "keywords": [
214
+                "factory",
215
+                "http",
216
+                "message",
217
+                "psr",
218
+                "psr-17",
219
+                "psr-7",
220
+                "request",
221
+                "response"
222
+            ],
223
+            "time": "2019-04-30T12:38:16+00:00"
224
+        },
225
+        {
226
+            "name": "psr/http-message",
227
+            "version": "1.0.1",
228
+            "source": {
229
+                "type": "git",
230
+                "url": "https://github.com/php-fig/http-message.git",
231
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
232
+            },
233
+            "dist": {
234
+                "type": "zip",
235
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
236
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
237
+                "shasum": ""
238
+            },
239
+            "require": {
240
+                "php": ">=5.3.0"
241
+            },
242
+            "type": "library",
243
+            "extra": {
244
+                "branch-alias": {
245
+                    "dev-master": "1.0.x-dev"
246
+                }
247
+            },
248
+            "autoload": {
249
+                "psr-4": {
250
+                    "Psr\\Http\\Message\\": "src/"
251
+                }
252
+            },
253
+            "notification-url": "https://packagist.org/downloads/",
254
+            "license": [
255
+                "MIT"
256
+            ],
257
+            "authors": [
258
+                {
259
+                    "name": "PHP-FIG",
260
+                    "homepage": "http://www.php-fig.org/"
261
+                }
262
+            ],
263
+            "description": "Common interface for HTTP messages",
264
+            "homepage": "https://github.com/php-fig/http-message",
265
+            "keywords": [
266
+                "http",
267
+                "http-message",
268
+                "psr",
269
+                "psr-7",
270
+                "request",
271
+                "response"
272
+            ],
273
+            "time": "2016-08-06T14:39:51+00:00"
274
+        },
275
+        {
276
+            "name": "psr/http-server-handler",
277
+            "version": "1.0.1",
278
+            "source": {
279
+                "type": "git",
280
+                "url": "https://github.com/php-fig/http-server-handler.git",
281
+                "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7"
282
+            },
283
+            "dist": {
284
+                "type": "zip",
285
+                "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
286
+                "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
287
+                "shasum": ""
288
+            },
289
+            "require": {
290
+                "php": ">=7.0",
291
+                "psr/http-message": "^1.0"
292
+            },
293
+            "type": "library",
294
+            "extra": {
295
+                "branch-alias": {
296
+                    "dev-master": "1.0.x-dev"
297
+                }
298
+            },
299
+            "autoload": {
300
+                "psr-4": {
301
+                    "Psr\\Http\\Server\\": "src/"
302
+                }
303
+            },
304
+            "notification-url": "https://packagist.org/downloads/",
305
+            "license": [
306
+                "MIT"
307
+            ],
308
+            "authors": [
309
+                {
310
+                    "name": "PHP-FIG",
311
+                    "homepage": "http://www.php-fig.org/"
312
+                }
313
+            ],
314
+            "description": "Common interface for HTTP server-side request handler",
315
+            "keywords": [
316
+                "handler",
317
+                "http",
318
+                "http-interop",
319
+                "psr",
320
+                "psr-15",
321
+                "psr-7",
322
+                "request",
323
+                "response",
324
+                "server"
325
+            ],
326
+            "time": "2018-10-30T16:46:14+00:00"
327
+        },
328
+        {
329
+            "name": "psr/http-server-middleware",
330
+            "version": "1.0.1",
331
+            "source": {
332
+                "type": "git",
333
+                "url": "https://github.com/php-fig/http-server-middleware.git",
334
+                "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5"
335
+            },
336
+            "dist": {
337
+                "type": "zip",
338
+                "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5",
339
+                "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5",
340
+                "shasum": ""
341
+            },
342
+            "require": {
343
+                "php": ">=7.0",
344
+                "psr/http-message": "^1.0",
345
+                "psr/http-server-handler": "^1.0"
346
+            },
347
+            "type": "library",
348
+            "extra": {
349
+                "branch-alias": {
350
+                    "dev-master": "1.0.x-dev"
351
+                }
352
+            },
353
+            "autoload": {
354
+                "psr-4": {
355
+                    "Psr\\Http\\Server\\": "src/"
356
+                }
357
+            },
358
+            "notification-url": "https://packagist.org/downloads/",
359
+            "license": [
360
+                "MIT"
361
+            ],
362
+            "authors": [
363
+                {
364
+                    "name": "PHP-FIG",
365
+                    "homepage": "http://www.php-fig.org/"
366
+                }
367
+            ],
368
+            "description": "Common interface for HTTP server-side middleware",
369
+            "keywords": [
370
+                "http",
371
+                "http-interop",
372
+                "middleware",
373
+                "psr",
374
+                "psr-15",
375
+                "psr-7",
376
+                "request",
377
+                "response"
378
+            ],
379
+            "time": "2018-10-30T17:12:04+00:00"
380
+        }
381
+    ],
382
+    "packages-dev": [],
383
+    "aliases": [],
384
+    "minimum-stability": "stable",
385
+    "stability-flags": [],
386
+    "prefer-stable": false,
387
+    "prefer-lowest": false,
388
+    "platform": {
389
+        "php": ">=7.0.0",
390
+        "ext-zlib": "*",
391
+        "ext-json": "*",
392
+        "ext-pdo": "*"
393
+    },
394
+    "platform-dev": []
395
+}

+ 0
- 7
vendor/autoload.php 查看文件

@@ -1,7 +0,0 @@
1
-<?php
2
-
3
-// autoload.php @generated by Composer
4
-
5
-require_once __DIR__ . '/composer/autoload_real.php';
6
-
7
-return ComposerAutoloaderInit3f8e3ef0f01cbb66788ae8adbae6c82c::getLoader();

+ 0
- 445
vendor/composer/ClassLoader.php 查看文件

@@ -1,445 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- *     Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
-namespace Composer\Autoload;
14
-
15
-/**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- *     $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- *     // register classes with namespaces
21
- *     $loader->add('Symfony\Component', __DIR__.'/component');
22
- *     $loader->add('Symfony',           __DIR__.'/framework');
23
- *
24
- *     // activate the autoloader
25
- *     $loader->register();
26
- *
27
- *     // to enable searching the include path (eg. for PEAR packages)
28
- *     $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see    http://www.php-fig.org/psr/psr-0/
41
- * @see    http://www.php-fig.org/psr/psr-4/
42
- */
43
-class ClassLoader
44
-{
45
-    // PSR-4
46
-    private $prefixLengthsPsr4 = array();
47
-    private $prefixDirsPsr4 = array();
48
-    private $fallbackDirsPsr4 = array();
49
-
50
-    // PSR-0
51
-    private $prefixesPsr0 = array();
52
-    private $fallbackDirsPsr0 = array();
53
-
54
-    private $useIncludePath = false;
55
-    private $classMap = array();
56
-    private $classMapAuthoritative = false;
57
-    private $missingClasses = array();
58
-    private $apcuPrefix;
59
-
60
-    public function getPrefixes()
61
-    {
62
-        if (!empty($this->prefixesPsr0)) {
63
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
64
-        }
65
-
66
-        return array();
67
-    }
68
-
69
-    public function getPrefixesPsr4()
70
-    {
71
-        return $this->prefixDirsPsr4;
72
-    }
73
-
74
-    public function getFallbackDirs()
75
-    {
76
-        return $this->fallbackDirsPsr0;
77
-    }
78
-
79
-    public function getFallbackDirsPsr4()
80
-    {
81
-        return $this->fallbackDirsPsr4;
82
-    }
83
-
84
-    public function getClassMap()
85
-    {
86
-        return $this->classMap;
87
-    }
88
-
89
-    /**
90
-     * @param array $classMap Class to filename map
91
-     */
92
-    public function addClassMap(array $classMap)
93
-    {
94
-        if ($this->classMap) {
95
-            $this->classMap = array_merge($this->classMap, $classMap);
96
-        } else {
97
-            $this->classMap = $classMap;
98
-        }
99
-    }
100
-
101
-    /**
102
-     * Registers a set of PSR-0 directories for a given prefix, either
103
-     * appending or prepending to the ones previously set for this prefix.
104
-     *
105
-     * @param string       $prefix  The prefix
106
-     * @param array|string $paths   The PSR-0 root directories
107
-     * @param bool         $prepend Whether to prepend the directories
108
-     */
109
-    public function add($prefix, $paths, $prepend = false)
110
-    {
111
-        if (!$prefix) {
112
-            if ($prepend) {
113
-                $this->fallbackDirsPsr0 = array_merge(
114
-                    (array) $paths,
115
-                    $this->fallbackDirsPsr0
116
-                );
117
-            } else {
118
-                $this->fallbackDirsPsr0 = array_merge(
119
-                    $this->fallbackDirsPsr0,
120
-                    (array) $paths
121
-                );
122
-            }
123
-
124
-            return;
125
-        }
126
-
127
-        $first = $prefix[0];
128
-        if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
-            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
-
131
-            return;
132
-        }
133
-        if ($prepend) {
134
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
135
-                (array) $paths,
136
-                $this->prefixesPsr0[$first][$prefix]
137
-            );
138
-        } else {
139
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
140
-                $this->prefixesPsr0[$first][$prefix],
141
-                (array) $paths
142
-            );
143
-        }
144
-    }
145
-
146
-    /**
147
-     * Registers a set of PSR-4 directories for a given namespace, either
148
-     * appending or prepending to the ones previously set for this namespace.
149
-     *
150
-     * @param string       $prefix  The prefix/namespace, with trailing '\\'
151
-     * @param array|string $paths   The PSR-4 base directories
152
-     * @param bool         $prepend Whether to prepend the directories
153
-     *
154
-     * @throws \InvalidArgumentException
155
-     */
156
-    public function addPsr4($prefix, $paths, $prepend = false)
157
-    {
158
-        if (!$prefix) {
159
-            // Register directories for the root namespace.
160
-            if ($prepend) {
161
-                $this->fallbackDirsPsr4 = array_merge(
162
-                    (array) $paths,
163
-                    $this->fallbackDirsPsr4
164
-                );
165
-            } else {
166
-                $this->fallbackDirsPsr4 = array_merge(
167
-                    $this->fallbackDirsPsr4,
168
-                    (array) $paths
169
-                );
170
-            }
171
-        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
-            // Register directories for a new namespace.
173
-            $length = strlen($prefix);
174
-            if ('\\' !== $prefix[$length - 1]) {
175
-                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
-            }
177
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
-        } elseif ($prepend) {
180
-            // Prepend directories for an already registered namespace.
181
-            $this->prefixDirsPsr4[$prefix] = array_merge(
182
-                (array) $paths,
183
-                $this->prefixDirsPsr4[$prefix]
184
-            );
185
-        } else {
186
-            // Append directories for an already registered namespace.
187
-            $this->prefixDirsPsr4[$prefix] = array_merge(
188
-                $this->prefixDirsPsr4[$prefix],
189
-                (array) $paths
190
-            );
191
-        }
192
-    }
193
-
194
-    /**
195
-     * Registers a set of PSR-0 directories for a given prefix,
196
-     * replacing any others previously set for this prefix.
197
-     *
198
-     * @param string       $prefix The prefix
199
-     * @param array|string $paths  The PSR-0 base directories
200
-     */
201
-    public function set($prefix, $paths)
202
-    {
203
-        if (!$prefix) {
204
-            $this->fallbackDirsPsr0 = (array) $paths;
205
-        } else {
206
-            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
-        }
208
-    }
209
-
210
-    /**
211
-     * Registers a set of PSR-4 directories for a given namespace,
212
-     * replacing any others previously set for this namespace.
213
-     *
214
-     * @param string       $prefix The prefix/namespace, with trailing '\\'
215
-     * @param array|string $paths  The PSR-4 base directories
216
-     *
217
-     * @throws \InvalidArgumentException
218
-     */
219
-    public function setPsr4($prefix, $paths)
220
-    {
221
-        if (!$prefix) {
222
-            $this->fallbackDirsPsr4 = (array) $paths;
223
-        } else {
224
-            $length = strlen($prefix);
225
-            if ('\\' !== $prefix[$length - 1]) {
226
-                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
-            }
228
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
-        }
231
-    }
232
-
233
-    /**
234
-     * Turns on searching the include path for class files.
235
-     *
236
-     * @param bool $useIncludePath
237
-     */
238
-    public function setUseIncludePath($useIncludePath)
239
-    {
240
-        $this->useIncludePath = $useIncludePath;
241
-    }
242
-
243
-    /**
244
-     * Can be used to check if the autoloader uses the include path to check
245
-     * for classes.
246
-     *
247
-     * @return bool
248
-     */
249
-    public function getUseIncludePath()
250
-    {
251
-        return $this->useIncludePath;
252
-    }
253
-
254
-    /**
255
-     * Turns off searching the prefix and fallback directories for classes
256
-     * that have not been registered with the class map.
257
-     *
258
-     * @param bool $classMapAuthoritative
259
-     */
260
-    public function setClassMapAuthoritative($classMapAuthoritative)
261
-    {
262
-        $this->classMapAuthoritative = $classMapAuthoritative;
263
-    }
264
-
265
-    /**
266
-     * Should class lookup fail if not found in the current class map?
267
-     *
268
-     * @return bool
269
-     */
270
-    public function isClassMapAuthoritative()
271
-    {
272
-        return $this->classMapAuthoritative;
273
-    }
274
-
275
-    /**
276
-     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
-     *
278
-     * @param string|null $apcuPrefix
279
-     */
280
-    public function setApcuPrefix($apcuPrefix)
281
-    {
282
-        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
-    }
284
-
285
-    /**
286
-     * The APCu prefix in use, or null if APCu caching is not enabled.
287
-     *
288
-     * @return string|null
289
-     */
290
-    public function getApcuPrefix()
291
-    {
292
-        return $this->apcuPrefix;
293
-    }
294
-
295
-    /**
296
-     * Registers this instance as an autoloader.
297
-     *
298
-     * @param bool $prepend Whether to prepend the autoloader or not
299
-     */
300
-    public function register($prepend = false)
301
-    {
302
-        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
-    }
304
-
305
-    /**
306
-     * Unregisters this instance as an autoloader.
307
-     */
308
-    public function unregister()
309
-    {
310
-        spl_autoload_unregister(array($this, 'loadClass'));
311
-    }
312
-
313
-    /**
314
-     * Loads the given class or interface.
315
-     *
316
-     * @param  string    $class The name of the class
317
-     * @return bool|null True if loaded, null otherwise
318
-     */
319
-    public function loadClass($class)
320
-    {
321
-        if ($file = $this->findFile($class)) {
322
-            includeFile($file);
323
-
324
-            return true;
325
-        }
326
-    }
327
-
328
-    /**
329
-     * Finds the path to the file where the class is defined.
330
-     *
331
-     * @param string $class The name of the class
332
-     *
333
-     * @return string|false The path if found, false otherwise
334
-     */
335
-    public function findFile($class)
336
-    {
337
-        // class map lookup
338
-        if (isset($this->classMap[$class])) {
339
-            return $this->classMap[$class];
340
-        }
341
-        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
-            return false;
343
-        }
344
-        if (null !== $this->apcuPrefix) {
345
-            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
-            if ($hit) {
347
-                return $file;
348
-            }
349
-        }
350
-
351
-        $file = $this->findFileWithExtension($class, '.php');
352
-
353
-        // Search for Hack files if we are running on HHVM
354
-        if (false === $file && defined('HHVM_VERSION')) {
355
-            $file = $this->findFileWithExtension($class, '.hh');
356
-        }
357
-
358
-        if (null !== $this->apcuPrefix) {
359
-            apcu_add($this->apcuPrefix.$class, $file);
360
-        }
361
-
362
-        if (false === $file) {
363
-            // Remember that this class does not exist.
364
-            $this->missingClasses[$class] = true;
365
-        }
366
-
367
-        return $file;
368
-    }
369
-
370
-    private function findFileWithExtension($class, $ext)
371
-    {
372
-        // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
-
375
-        $first = $class[0];
376
-        if (isset($this->prefixLengthsPsr4[$first])) {
377
-            $subPath = $class;
378
-            while (false !== $lastPos = strrpos($subPath, '\\')) {
379
-                $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
381
-                if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
-                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
385
-                            return $file;
386
-                        }
387
-                    }
388
-                }
389
-            }
390
-        }
391
-
392
-        // PSR-4 fallback dirs
393
-        foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
-                return $file;
396
-            }
397
-        }
398
-
399
-        // PSR-0 lookup
400
-        if (false !== $pos = strrpos($class, '\\')) {
401
-            // namespaced class name
402
-            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
-                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
-        } else {
405
-            // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
-        }
408
-
409
-        if (isset($this->prefixesPsr0[$first])) {
410
-            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
-                if (0 === strpos($class, $prefix)) {
412
-                    foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
-                            return $file;
415
-                        }
416
-                    }
417
-                }
418
-            }
419
-        }
420
-
421
-        // PSR-0 fallback dirs
422
-        foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
-                return $file;
425
-            }
426
-        }
427
-
428
-        // PSR-0 include paths.
429
-        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
-            return $file;
431
-        }
432
-
433
-        return false;
434
-    }
435
-}
436
-
437
-/**
438
- * Scope isolated include.
439
- *
440
- * Prevents access to $this/self from included files.
441
- */
442
-function includeFile($file)
443
-{
444
-    include $file;
445
-}

+ 0
- 21
vendor/composer/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-
2
-Copyright (c) Nils Adermann, Jordi Boggiano
3
-
4
-Permission is hereby granted, free of charge, to any person obtaining a copy
5
-of this software and associated documentation files (the "Software"), to deal
6
-in the Software without restriction, including without limitation the rights
7
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
-copies of the Software, and to permit persons to whom the Software is furnished
9
-to do so, subject to the following conditions:
10
-
11
-The above copyright notice and this permission notice shall be included in all
12
-copies or substantial portions of the Software.
13
-
14
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
-THE SOFTWARE.
21
-

+ 0
- 9
vendor/composer/autoload_classmap.php 查看文件

@@ -1,9 +0,0 @@
1
-<?php
2
-
3
-// autoload_classmap.php @generated by Composer
4
-
5
-$vendorDir = dirname(dirname(__FILE__));
6
-$baseDir = dirname($vendorDir);
7
-
8
-return array(
9
-);

+ 0
- 9
vendor/composer/autoload_namespaces.php 查看文件

@@ -1,9 +0,0 @@
1
-<?php
2
-
3
-// autoload_namespaces.php @generated by Composer
4
-
5
-$vendorDir = dirname(dirname(__FILE__));
6
-$baseDir = dirname($vendorDir);
7
-
8
-return array(
9
-);

+ 0
- 15
vendor/composer/autoload_psr4.php 查看文件

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-// autoload_psr4.php @generated by Composer
4
-
5
-$vendorDir = dirname(dirname(__FILE__));
6
-$baseDir = dirname($vendorDir);
7
-
8
-return array(
9
-    'Tqdev\\PhpCrudApi\\' => array($baseDir . '/src/Tqdev/PhpCrudApi'),
10
-    'Psr\\Http\\Server\\' => array($vendorDir . '/psr/http-server-handler/src', $vendorDir . '/psr/http-server-middleware/src'),
11
-    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
12
-    'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
13
-    'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'),
14
-    'Http\\Message\\' => array($vendorDir . '/php-http/message-factory/src'),
15
-);

+ 0
- 52
vendor/composer/autoload_real.php 查看文件

@@ -1,52 +0,0 @@
1
-<?php
2
-
3
-// autoload_real.php @generated by Composer
4
-
5
-class ComposerAutoloaderInit3f8e3ef0f01cbb66788ae8adbae6c82c
6
-{
7
-    private static $loader;
8
-
9
-    public static function loadClassLoader($class)
10
-    {
11
-        if ('Composer\Autoload\ClassLoader' === $class) {
12
-            require __DIR__ . '/ClassLoader.php';
13
-        }
14
-    }
15
-
16
-    public static function getLoader()
17
-    {
18
-        if (null !== self::$loader) {
19
-            return self::$loader;
20
-        }
21
-
22
-        spl_autoload_register(array('ComposerAutoloaderInit3f8e3ef0f01cbb66788ae8adbae6c82c', 'loadClassLoader'), true, true);
23
-        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
-        spl_autoload_unregister(array('ComposerAutoloaderInit3f8e3ef0f01cbb66788ae8adbae6c82c', 'loadClassLoader'));
25
-
26
-        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
-        if ($useStaticLoader) {
28
-            require_once __DIR__ . '/autoload_static.php';
29
-
30
-            call_user_func(\Composer\Autoload\ComposerStaticInit3f8e3ef0f01cbb66788ae8adbae6c82c::getInitializer($loader));
31
-        } else {
32
-            $map = require __DIR__ . '/autoload_namespaces.php';
33
-            foreach ($map as $namespace => $path) {
34
-                $loader->set($namespace, $path);
35
-            }
36
-
37
-            $map = require __DIR__ . '/autoload_psr4.php';
38
-            foreach ($map as $namespace => $path) {
39
-                $loader->setPsr4($namespace, $path);
40
-            }
41
-
42
-            $classMap = require __DIR__ . '/autoload_classmap.php';
43
-            if ($classMap) {
44
-                $loader->addClassMap($classMap);
45
-            }
46
-        }
47
-
48
-        $loader->register(true);
49
-
50
-        return $loader;
51
-    }
52
-}

+ 0
- 67
vendor/composer/autoload_static.php 查看文件

@@ -1,67 +0,0 @@
1
-<?php
2
-
3
-// autoload_static.php @generated by Composer
4
-
5
-namespace Composer\Autoload;
6
-
7
-class ComposerStaticInit3f8e3ef0f01cbb66788ae8adbae6c82c
8
-{
9
-    public static $prefixLengthsPsr4 = array (
10
-        'T' => 
11
-        array (
12
-            'Tqdev\\PhpCrudApi\\' => 17,
13
-        ),
14
-        'P' => 
15
-        array (
16
-            'Psr\\Http\\Server\\' => 16,
17
-            'Psr\\Http\\Message\\' => 17,
18
-        ),
19
-        'N' => 
20
-        array (
21
-            'Nyholm\\Psr7\\' => 12,
22
-            'Nyholm\\Psr7Server\\' => 18,
23
-        ),
24
-        'H' => 
25
-        array (
26
-            'Http\\Message\\' => 13,
27
-        ),
28
-    );
29
-
30
-    public static $prefixDirsPsr4 = array (
31
-        'Tqdev\\PhpCrudApi\\' => 
32
-        array (
33
-            0 => __DIR__ . '/../..' . '/src/Tqdev/PhpCrudApi',
34
-        ),
35
-        'Psr\\Http\\Server\\' => 
36
-        array (
37
-            0 => __DIR__ . '/..' . '/psr/http-server-handler/src',
38
-            1 => __DIR__ . '/..' . '/psr/http-server-middleware/src',
39
-        ),
40
-        'Psr\\Http\\Message\\' => 
41
-        array (
42
-            0 => __DIR__ . '/..' . '/psr/http-factory/src',
43
-            1 => __DIR__ . '/..' . '/psr/http-message/src',
44
-        ),
45
-        'Nyholm\\Psr7\\' => 
46
-        array (
47
-            0 => __DIR__ . '/..' . '/nyholm/psr7/src',
48
-        ),
49
-        'Nyholm\\Psr7Server\\' => 
50
-        array (
51
-            0 => __DIR__ . '/..' . '/nyholm/psr7-server/src',
52
-        ),
53
-        'Http\\Message\\' => 
54
-        array (
55
-            0 => __DIR__ . '/..' . '/php-http/message-factory/src',
56
-        ),
57
-    );
58
-
59
-    public static function getInitializer(ClassLoader $loader)
60
-    {
61
-        return \Closure::bind(function () use ($loader) {
62
-            $loader->prefixLengthsPsr4 = ComposerStaticInit3f8e3ef0f01cbb66788ae8adbae6c82c::$prefixLengthsPsr4;
63
-            $loader->prefixDirsPsr4 = ComposerStaticInit3f8e3ef0f01cbb66788ae8adbae6c82c::$prefixDirsPsr4;
64
-
65
-        }, null, ClassLoader::class);
66
-    }
67
-}

+ 0
- 388
vendor/composer/installed.json 查看文件

@@ -1,388 +0,0 @@
1
-[
2
-    {
3
-        "name": "nyholm/psr7",
4
-        "version": "1.1.0",
5
-        "version_normalized": "1.1.0.0",
6
-        "source": {
7
-            "type": "git",
8
-            "url": "https://github.com/Nyholm/psr7.git",
9
-            "reference": "701fe7ea8c12c07b985b156d589134d328160cf7"
10
-        },
11
-        "dist": {
12
-            "type": "zip",
13
-            "url": "https://api.github.com/repos/Nyholm/psr7/zipball/701fe7ea8c12c07b985b156d589134d328160cf7",
14
-            "reference": "701fe7ea8c12c07b985b156d589134d328160cf7",
15
-            "shasum": ""
16
-        },
17
-        "require": {
18
-            "php": "^7.1",
19
-            "php-http/message-factory": "^1.0",
20
-            "psr/http-factory": "^1.0",
21
-            "psr/http-message": "^1.0"
22
-        },
23
-        "provide": {
24
-            "psr/http-factory-implementation": "1.0",
25
-            "psr/http-message-implementation": "1.0"
26
-        },
27
-        "require-dev": {
28
-            "http-interop/http-factory-tests": "dev-master",
29
-            "php-http/psr7-integration-tests": "dev-master",
30
-            "phpunit/phpunit": "^7.5"
31
-        },
32
-        "time": "2019-02-16T17:20:43+00:00",
33
-        "type": "library",
34
-        "extra": {
35
-            "branch-alias": {
36
-                "dev-master": "1.0-dev"
37
-            }
38
-        },
39
-        "installation-source": "dist",
40
-        "autoload": {
41
-            "psr-4": {
42
-                "Nyholm\\Psr7\\": "src/"
43
-            }
44
-        },
45
-        "notification-url": "https://packagist.org/downloads/",
46
-        "license": [
47
-            "MIT"
48
-        ],
49
-        "authors": [
50
-            {
51
-                "name": "Tobias Nyholm",
52
-                "email": "tobias.nyholm@gmail.com"
53
-            },
54
-            {
55
-                "name": "Martijn van der Ven",
56
-                "email": "martijn@vanderven.se"
57
-            }
58
-        ],
59
-        "description": "A fast PHP7 implementation of PSR-7",
60
-        "homepage": "http://tnyholm.se",
61
-        "keywords": [
62
-            "psr-17",
63
-            "psr-7"
64
-        ]
65
-    },
66
-    {
67
-        "name": "nyholm/psr7-server",
68
-        "version": "0.3.0",
69
-        "version_normalized": "0.3.0.0",
70
-        "source": {
71
-            "type": "git",
72
-            "url": "https://github.com/Nyholm/psr7-server.git",
73
-            "reference": "1b71a848fcb066fb805b7a9ab3f41ff65bffcde8"
74
-        },
75
-        "dist": {
76
-            "type": "zip",
77
-            "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/1b71a848fcb066fb805b7a9ab3f41ff65bffcde8",
78
-            "reference": "1b71a848fcb066fb805b7a9ab3f41ff65bffcde8",
79
-            "shasum": ""
80
-        },
81
-        "require": {
82
-            "php": "^7.1",
83
-            "psr/http-factory": "^1.0",
84
-            "psr/http-message": "^1.0"
85
-        },
86
-        "require-dev": {
87
-            "nyholm/nsa": "^1.1",
88
-            "nyholm/psr7": "^1.0",
89
-            "phpunit/phpunit": "^7.0"
90
-        },
91
-        "time": "2018-09-02T10:41:28+00:00",
92
-        "type": "library",
93
-        "installation-source": "dist",
94
-        "autoload": {
95
-            "psr-4": {
96
-                "Nyholm\\Psr7Server\\": "src/"
97
-            }
98
-        },
99
-        "notification-url": "https://packagist.org/downloads/",
100
-        "license": [
101
-            "MIT"
102
-        ],
103
-        "authors": [
104
-            {
105
-                "name": "Tobias Nyholm",
106
-                "email": "tobias.nyholm@gmail.com"
107
-            },
108
-            {
109
-                "name": "Martijn van der Ven",
110
-                "email": "martijn@vanderven.se"
111
-            }
112
-        ],
113
-        "description": "Helper classes to handle PSR-7 server requests",
114
-        "homepage": "http://tnyholm.se",
115
-        "keywords": [
116
-            "psr-17",
117
-            "psr-7"
118
-        ]
119
-    },
120
-    {
121
-        "name": "php-http/message-factory",
122
-        "version": "v1.0.2",
123
-        "version_normalized": "1.0.2.0",
124
-        "source": {
125
-            "type": "git",
126
-            "url": "https://github.com/php-http/message-factory.git",
127
-            "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
128
-        },
129
-        "dist": {
130
-            "type": "zip",
131
-            "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
132
-            "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
133
-            "shasum": ""
134
-        },
135
-        "require": {
136
-            "php": ">=5.4",
137
-            "psr/http-message": "^1.0"
138
-        },
139
-        "time": "2015-12-19T14:08:53+00:00",
140
-        "type": "library",
141
-        "extra": {
142
-            "branch-alias": {
143
-                "dev-master": "1.0-dev"
144
-            }
145
-        },
146
-        "installation-source": "dist",
147
-        "autoload": {
148
-            "psr-4": {
149
-                "Http\\Message\\": "src/"
150
-            }
151
-        },
152
-        "notification-url": "https://packagist.org/downloads/",
153
-        "license": [
154
-            "MIT"
155
-        ],
156
-        "authors": [
157
-            {
158
-                "name": "Márk Sági-Kazár",
159
-                "email": "mark.sagikazar@gmail.com"
160
-            }
161
-        ],
162
-        "description": "Factory interfaces for PSR-7 HTTP Message",
163
-        "homepage": "http://php-http.org",
164
-        "keywords": [
165
-            "factory",
166
-            "http",
167
-            "message",
168
-            "stream",
169
-            "uri"
170
-        ]
171
-    },
172
-    {
173
-        "name": "psr/http-factory",
174
-        "version": "1.0.1",
175
-        "version_normalized": "1.0.1.0",
176
-        "source": {
177
-            "type": "git",
178
-            "url": "https://github.com/php-fig/http-factory.git",
179
-            "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
180
-        },
181
-        "dist": {
182
-            "type": "zip",
183
-            "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
184
-            "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
185
-            "shasum": ""
186
-        },
187
-        "require": {
188
-            "php": ">=7.0.0",
189
-            "psr/http-message": "^1.0"
190
-        },
191
-        "time": "2019-04-30T12:38:16+00:00",
192
-        "type": "library",
193
-        "extra": {
194
-            "branch-alias": {
195
-                "dev-master": "1.0.x-dev"
196
-            }
197
-        },
198
-        "installation-source": "dist",
199
-        "autoload": {
200
-            "psr-4": {
201
-                "Psr\\Http\\Message\\": "src/"
202
-            }
203
-        },
204
-        "notification-url": "https://packagist.org/downloads/",
205
-        "license": [
206
-            "MIT"
207
-        ],
208
-        "authors": [
209
-            {
210
-                "name": "PHP-FIG",
211
-                "homepage": "http://www.php-fig.org/"
212
-            }
213
-        ],
214
-        "description": "Common interfaces for PSR-7 HTTP message factories",
215
-        "keywords": [
216
-            "factory",
217
-            "http",
218
-            "message",
219
-            "psr",
220
-            "psr-17",
221
-            "psr-7",
222
-            "request",
223
-            "response"
224
-        ]
225
-    },
226
-    {
227
-        "name": "psr/http-message",
228
-        "version": "1.0.1",
229
-        "version_normalized": "1.0.1.0",
230
-        "source": {
231
-            "type": "git",
232
-            "url": "https://github.com/php-fig/http-message.git",
233
-            "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
234
-        },
235
-        "dist": {
236
-            "type": "zip",
237
-            "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
238
-            "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
239
-            "shasum": ""
240
-        },
241
-        "require": {
242
-            "php": ">=5.3.0"
243
-        },
244
-        "time": "2016-08-06T14:39:51+00:00",
245
-        "type": "library",
246
-        "extra": {
247
-            "branch-alias": {
248
-                "dev-master": "1.0.x-dev"
249
-            }
250
-        },
251
-        "installation-source": "dist",
252
-        "autoload": {
253
-            "psr-4": {
254
-                "Psr\\Http\\Message\\": "src/"
255
-            }
256
-        },
257
-        "notification-url": "https://packagist.org/downloads/",
258
-        "license": [
259
-            "MIT"
260
-        ],
261
-        "authors": [
262
-            {
263
-                "name": "PHP-FIG",
264
-                "homepage": "http://www.php-fig.org/"
265
-            }
266
-        ],
267
-        "description": "Common interface for HTTP messages",
268
-        "homepage": "https://github.com/php-fig/http-message",
269
-        "keywords": [
270
-            "http",
271
-            "http-message",
272
-            "psr",
273
-            "psr-7",
274
-            "request",
275
-            "response"
276
-        ]
277
-    },
278
-    {
279
-        "name": "psr/http-server-handler",
280
-        "version": "1.0.1",
281
-        "version_normalized": "1.0.1.0",
282
-        "source": {
283
-            "type": "git",
284
-            "url": "https://github.com/php-fig/http-server-handler.git",
285
-            "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7"
286
-        },
287
-        "dist": {
288
-            "type": "zip",
289
-            "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
290
-            "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
291
-            "shasum": ""
292
-        },
293
-        "require": {
294
-            "php": ">=7.0",
295
-            "psr/http-message": "^1.0"
296
-        },
297
-        "time": "2018-10-30T16:46:14+00:00",
298
-        "type": "library",
299
-        "extra": {
300
-            "branch-alias": {
301
-                "dev-master": "1.0.x-dev"
302
-            }
303
-        },
304
-        "installation-source": "dist",
305
-        "autoload": {
306
-            "psr-4": {
307
-                "Psr\\Http\\Server\\": "src/"
308
-            }
309
-        },
310
-        "notification-url": "https://packagist.org/downloads/",
311
-        "license": [
312
-            "MIT"
313
-        ],
314
-        "authors": [
315
-            {
316
-                "name": "PHP-FIG",
317
-                "homepage": "http://www.php-fig.org/"
318
-            }
319
-        ],
320
-        "description": "Common interface for HTTP server-side request handler",
321
-        "keywords": [
322
-            "handler",
323
-            "http",
324
-            "http-interop",
325
-            "psr",
326
-            "psr-15",
327
-            "psr-7",
328
-            "request",
329
-            "response",
330
-            "server"
331
-        ]
332
-    },
333
-    {
334
-        "name": "psr/http-server-middleware",
335
-        "version": "1.0.1",
336
-        "version_normalized": "1.0.1.0",
337
-        "source": {
338
-            "type": "git",
339
-            "url": "https://github.com/php-fig/http-server-middleware.git",
340
-            "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5"
341
-        },
342
-        "dist": {
343
-            "type": "zip",
344
-            "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5",
345
-            "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5",
346
-            "shasum": ""
347
-        },
348
-        "require": {
349
-            "php": ">=7.0",
350
-            "psr/http-message": "^1.0",
351
-            "psr/http-server-handler": "^1.0"
352
-        },
353
-        "time": "2018-10-30T17:12:04+00:00",
354
-        "type": "library",
355
-        "extra": {
356
-            "branch-alias": {
357
-                "dev-master": "1.0.x-dev"
358
-            }
359
-        },
360
-        "installation-source": "dist",
361
-        "autoload": {
362
-            "psr-4": {
363
-                "Psr\\Http\\Server\\": "src/"
364
-            }
365
-        },
366
-        "notification-url": "https://packagist.org/downloads/",
367
-        "license": [
368
-            "MIT"
369
-        ],
370
-        "authors": [
371
-            {
372
-                "name": "PHP-FIG",
373
-                "homepage": "http://www.php-fig.org/"
374
-            }
375
-        ],
376
-        "description": "Common interface for HTTP server-side middleware",
377
-        "keywords": [
378
-            "http",
379
-            "http-interop",
380
-            "middleware",
381
-            "psr",
382
-            "psr-15",
383
-            "psr-7",
384
-            "request",
385
-            "response"
386
-        ]
387
-    }
388
-]

+ 0
- 36
vendor/nyholm/psr7-server/CHANGELOG.md 查看文件

@@ -1,36 +0,0 @@
1
-# Changelog
2
-
3
-All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
-
5
-## 0.3.0
6
-
7
-### Added
8
-
9
-- `ServerRequestCreator` is final
10
-
11
-### Fixed
12
-
13
-- Fallback to an empty Stream if UploadedFileFactory fails.
14
-
15
-## 0.2.0
16
-
17
-### Changed
18
-
19
-- Make sure we use psr/http-factory
20
-
21
-## 0.1.2
22
-
23
-### Added 
24
-
25
-- `ServerRequestCreatorInterface`
26
-- `ServerRequestCreator::getHeadersFromServer`
27
-
28
-## 0.1.1
29
-
30
-### Added 
31
-
32
-Better testing
33
-
34
-## 0.1.0
35
-
36
-First release

+ 0
- 21
vendor/nyholm/psr7-server/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-MIT License
2
-
3
-Copyright (c) 2018 Tobias Nyholm
4
-
5
-Permission is hereby granted, free of charge, to any person obtaining a copy
6
-of this software and associated documentation files (the "Software"), to deal
7
-in the Software without restriction, including without limitation the rights
8
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-copies of the Software, and to permit persons to whom the Software is
10
-furnished to do so, subject to the following conditions:
11
-
12
-The above copyright notice and this permission notice shall be included in all
13
-copies or substantial portions of the Software.
14
-
15
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-SOFTWARE.

+ 0
- 38
vendor/nyholm/psr7-server/README.md 查看文件

@@ -1,38 +0,0 @@
1
-# Helper class to create PSR-7 server request
2
-
3
-[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7-server.svg?style=flat-square)](https://github.com/Nyholm/psr7-server/releases)
4
-[![Build Status](https://img.shields.io/travis/Nyholm/psr7-server/master.svg?style=flat-square)](https://travis-ci.org/Nyholm/psr7-server)
5
-[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server)
6
-[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server)
7
-[![Total Downloads](https://poser.pugx.org/nyholm/psr7-server/downloads)](https://packagist.org/packages/nyholm/psr7-server)
8
-[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7-server/d/monthly.png)](https://packagist.org/packages/nyholm/psr7-server)
9
-[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
10
-
11
-A helper class that can create ANY PSR-7 server request. 
12
-
13
-## Installation
14
-
15
-```bash
16
-composer require nyholm/psr7-server
17
-```
18
-
19
-## Usage
20
-
21
-```php
22
-// Instanciate ANY PSR-17 factory implementations. Here is nyholm/psr7 as an example
23
-$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
24
-
25
-$creator = new \Nyholm\Psr7Server\ServerRequestCreator(
26
-    $psr17Factory, // ServerRequestFactory
27
-    $psr17Factory, // UriFactory
28
-    $psr17Factory, // UploadedFileFactory
29
-    $psr17Factory  // StreamFactory
30
-);
31
-
32
-$serverRequest = $creator->fromGlobals();
33
-```
34
-
35
-## Other packages
36
-
37
-* [nyholm/psr7](https://github.com/Nyholm/psr7) - A super fast PSR-7 implementation.
38
-* [zendframework/zend-httphandlerrunner](https://github.com/zendframework/zend-httphandlerrunner) - To send/emit PSR-7 responses

+ 0
- 41
vendor/nyholm/psr7-server/composer.json 查看文件

@@ -1,41 +0,0 @@
1
-{
2
-    "name": "nyholm/psr7-server",
3
-    "description": "Helper classes to handle PSR-7 server requests",
4
-    "license": "MIT",
5
-    "keywords": ["psr-7", "psr-17"],
6
-    "homepage": "http://tnyholm.se",
7
-    "authors": [
8
-        {
9
-            "name": "Tobias Nyholm",
10
-            "email": "tobias.nyholm@gmail.com"
11
-        },
12
-        {
13
-            "name": "Martijn van der Ven",
14
-            "email": "martijn@vanderven.se"
15
-        }
16
-    ],
17
-    "require": {
18
-        "php": "^7.1",
19
-        "psr/http-message": "^1.0",
20
-        "psr/http-factory": "^1.0"
21
-    },
22
-    "require-dev": {
23
-        "phpunit/phpunit": "^7.0",
24
-        "nyholm/psr7": "^1.0",
25
-        "nyholm/nsa": "^1.1"
26
-    },
27
-    "autoload": {
28
-        "psr-4": {
29
-            "Nyholm\\Psr7Server\\": "src/"
30
-        }
31
-    },
32
-    "autoload-dev": {
33
-        "psr-4": {
34
-            "Tests\\Nyholm\\Psr7Server\\": "tests/"
35
-        }
36
-    },
37
-    "scripts": {
38
-        "test": "vendor/bin/phpunit",
39
-        "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
40
-    }
41
-}

+ 0
- 271
vendor/nyholm/psr7-server/src/ServerRequestCreator.php 查看文件

@@ -1,271 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7Server;
6
-
7
-use Psr\Http\Message\ServerRequestFactoryInterface;
8
-use Psr\Http\Message\ServerRequestInterface;
9
-use Psr\Http\Message\StreamFactoryInterface;
10
-use Psr\Http\Message\StreamInterface;
11
-use Psr\Http\Message\UploadedFileFactoryInterface;
12
-use Psr\Http\Message\UploadedFileInterface;
13
-use Psr\Http\Message\UriFactoryInterface;
14
-use Psr\Http\Message\UriInterface;
15
-
16
-/**
17
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
18
- * @author Martijn van der Ven <martijn@vanderven.se>
19
- */
20
-final class ServerRequestCreator implements ServerRequestCreatorInterface
21
-{
22
-    private $serverRequestFactory;
23
-
24
-    private $uriFactory;
25
-
26
-    private $uploadedFileFactory;
27
-
28
-    private $streamFactory;
29
-
30
-    public function __construct(
31
-        ServerRequestFactoryInterface $serverRequestFactory,
32
-        UriFactoryInterface $uriFactory,
33
-        UploadedFileFactoryInterface $uploadedFileFactory,
34
-        StreamFactoryInterface $streamFactory
35
-    ) {
36
-        $this->serverRequestFactory = $serverRequestFactory;
37
-        $this->uriFactory = $uriFactory;
38
-        $this->uploadedFileFactory = $uploadedFileFactory;
39
-        $this->streamFactory = $streamFactory;
40
-    }
41
-
42
-    /**
43
-     * {@inheritdoc}
44
-     */
45
-    public function fromGlobals(): ServerRequestInterface
46
-    {
47
-        $server = $_SERVER;
48
-        if (false === isset($server['REQUEST_METHOD'])) {
49
-            $server['REQUEST_METHOD'] = 'GET';
50
-        }
51
-
52
-        $headers = \function_exists('getallheaders') ? getallheaders() : static::getHeadersFromServer($_SERVER);
53
-
54
-        return $this->fromArrays($server, $headers, $_COOKIE, $_GET, $_POST, $_FILES, fopen('php://input', 'r') ?: null);
55
-    }
56
-
57
-    /**
58
-     * {@inheritdoc}
59
-     */
60
-    public function fromArrays(array $server, array $headers = [], array $cookie = [], array $get = [], array $post = [], array $files = [], $body = null): ServerRequestInterface
61
-    {
62
-        $method = $this->getMethodFromEnv($server);
63
-        $uri = $this->getUriFromEnvWithHTTP($server);
64
-        $protocol = isset($server['SERVER_PROTOCOL']) ? \str_replace('HTTP/', '', $server['SERVER_PROTOCOL']) : '1.1';
65
-
66
-        $serverRequest = $this->serverRequestFactory->createServerRequest($method, $uri, $server);
67
-        foreach ($headers as $name => $value) {
68
-            $serverRequest = $serverRequest->withAddedHeader($name, $value);
69
-        }
70
-
71
-        $serverRequest = $serverRequest
72
-            ->withProtocolVersion($protocol)
73
-            ->withCookieParams($cookie)
74
-            ->withQueryParams($get)
75
-            ->withParsedBody($post)
76
-            ->withUploadedFiles($this->normalizeFiles($files));
77
-
78
-        if (null === $body) {
79
-            return $serverRequest;
80
-        }
81
-
82
-        if (\is_resource($body)) {
83
-            $body = $this->streamFactory->createStreamFromResource($body);
84
-        } elseif (\is_string($body)) {
85
-            $body = $this->streamFactory->createStream($body);
86
-        } elseif (!$body instanceof StreamInterface) {
87
-            throw new \InvalidArgumentException('The $body parameter to ServerRequestCreator::fromArrays must be string, resource or StreamInterface');
88
-        }
89
-
90
-        return $serverRequest->withBody($body);
91
-    }
92
-
93
-    /**
94
-     * Implementation from Zend\Diactoros\marshalHeadersFromSapi().
95
-     */
96
-    public static function getHeadersFromServer(array $server): array
97
-    {
98
-        $headers = [];
99
-        foreach ($server as $key => $value) {
100
-            // Apache prefixes environment variables with REDIRECT_
101
-            // if they are added by rewrite rules
102
-            if (0 === \strpos($key, 'REDIRECT_')) {
103
-                $key = \substr($key, 9);
104
-
105
-                // We will not overwrite existing variables with the
106
-                // prefixed versions, though
107
-                if (\array_key_exists($key, $server)) {
108
-                    continue;
109
-                }
110
-            }
111
-
112
-            if ($value && 0 === \strpos($key, 'HTTP_')) {
113
-                $name = \strtr(\strtolower(\substr($key, 5)), '_', '-');
114
-                $headers[$name] = $value;
115
-
116
-                continue;
117
-            }
118
-
119
-            if ($value && 0 === \strpos($key, 'CONTENT_')) {
120
-                $name = 'content-'.\strtolower(\substr($key, 8));
121
-                $headers[$name] = $value;
122
-
123
-                continue;
124
-            }
125
-        }
126
-
127
-        return $headers;
128
-    }
129
-
130
-    private function getMethodFromEnv(array $environment): string
131
-    {
132
-        if (false === isset($environment['REQUEST_METHOD'])) {
133
-            throw new \InvalidArgumentException('Cannot determine HTTP method');
134
-        }
135
-
136
-        return $environment['REQUEST_METHOD'];
137
-    }
138
-
139
-    private function getUriFromEnvWithHTTP(array $environment): UriInterface
140
-    {
141
-        $uri = $this->createUriFromArray($environment);
142
-        if (empty($uri->getScheme())) {
143
-            $uri = $uri->withScheme('http');
144
-        }
145
-
146
-        return $uri;
147
-    }
148
-
149
-    /**
150
-     * Return an UploadedFile instance array.
151
-     *
152
-     * @param array $files A array which respect $_FILES structure
153
-     *
154
-     * @return UploadedFileInterface[]
155
-     *
156
-     * @throws \InvalidArgumentException for unrecognized values
157
-     */
158
-    private function normalizeFiles(array $files): array
159
-    {
160
-        $normalized = [];
161
-
162
-        foreach ($files as $key => $value) {
163
-            if ($value instanceof UploadedFileInterface) {
164
-                $normalized[$key] = $value;
165
-            } elseif (\is_array($value) && isset($value['tmp_name'])) {
166
-                $normalized[$key] = $this->createUploadedFileFromSpec($value);
167
-            } elseif (\is_array($value)) {
168
-                $normalized[$key] = $this->normalizeFiles($value);
169
-            } else {
170
-                throw new \InvalidArgumentException('Invalid value in files specification');
171
-            }
172
-        }
173
-
174
-        return $normalized;
175
-    }
176
-
177
-    /**
178
-     * Create and return an UploadedFile instance from a $_FILES specification.
179
-     *
180
-     * If the specification represents an array of values, this method will
181
-     * delegate to normalizeNestedFileSpec() and return that return value.
182
-     *
183
-     * @param array $value $_FILES struct
184
-     *
185
-     * @return array|UploadedFileInterface
186
-     */
187
-    private function createUploadedFileFromSpec(array $value)
188
-    {
189
-        if (\is_array($value['tmp_name'])) {
190
-            return $this->normalizeNestedFileSpec($value);
191
-        }
192
-
193
-        try {
194
-            $stream = $this->streamFactory->createStreamFromFile($value['tmp_name']);
195
-        } catch (\RuntimeException $e) {
196
-            $stream = $this->streamFactory->createStream();
197
-        }
198
-
199
-        return $this->uploadedFileFactory->createUploadedFile(
200
-            $stream,
201
-            (int) $value['size'],
202
-            (int) $value['error'],
203
-            $value['name'],
204
-            $value['type']
205
-        );
206
-    }
207
-
208
-    /**
209
-     * Normalize an array of file specifications.
210
-     *
211
-     * Loops through all nested files and returns a normalized array of
212
-     * UploadedFileInterface instances.
213
-     *
214
-     * @param array $files
215
-     *
216
-     * @return UploadedFileInterface[]
217
-     */
218
-    private function normalizeNestedFileSpec(array $files = []): array
219
-    {
220
-        $normalizedFiles = [];
221
-
222
-        foreach (\array_keys($files['tmp_name']) as $key) {
223
-            $spec = [
224
-                'tmp_name' => $files['tmp_name'][$key],
225
-                'size' => $files['size'][$key],
226
-                'error' => $files['error'][$key],
227
-                'name' => $files['name'][$key],
228
-                'type' => $files['type'][$key],
229
-            ];
230
-            $normalizedFiles[$key] = $this->createUploadedFileFromSpec($spec);
231
-        }
232
-
233
-        return $normalizedFiles;
234
-    }
235
-
236
-    /**
237
-     * Create a new uri from server variable.
238
-     *
239
-     * @param array $server typically $_SERVER or similar structure
240
-     */
241
-    private function createUriFromArray(array $server): UriInterface
242
-    {
243
-        $uri = $this->uriFactory->createUri('');
244
-
245
-        if (isset($server['REQUEST_SCHEME'])) {
246
-            $uri = $uri->withScheme($server['REQUEST_SCHEME']);
247
-        } elseif (isset($server['HTTPS'])) {
248
-            $uri = $uri->withScheme('on' === $server['HTTPS'] ? 'https' : 'http');
249
-        }
250
-
251
-        if (isset($server['HTTP_HOST'])) {
252
-            $uri = $uri->withHost($server['HTTP_HOST']);
253
-        } elseif (isset($server['SERVER_NAME'])) {
254
-            $uri = $uri->withHost($server['SERVER_NAME']);
255
-        }
256
-
257
-        if (isset($server['SERVER_PORT'])) {
258
-            $uri = $uri->withPort($server['SERVER_PORT']);
259
-        }
260
-
261
-        if (isset($server['REQUEST_URI'])) {
262
-            $uri = $uri->withPath(\current(\explode('?', $server['REQUEST_URI'])));
263
-        }
264
-
265
-        if (isset($server['QUERY_STRING'])) {
266
-            $uri = $uri->withQuery($server['QUERY_STRING']);
267
-        }
268
-
269
-        return $uri;
270
-    }
271
-}

+ 0
- 58
vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php 查看文件

@@ -1,58 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7Server;
6
-
7
-use Psr\Http\Message\ServerRequestInterface;
8
-use Psr\Http\Message\StreamInterface;
9
-
10
-/**
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-interface ServerRequestCreatorInterface
15
-{
16
-    /**
17
-     * Create a new server request from the current environment variables.
18
-     * Defaults to a GET request to minimise the risk of an \InvalidArgumentException.
19
-     * Includes the current request headers as supplied by the server through `getallheaders()`.
20
-     * If `getallheaders()` is unavailable on the current server it will fallback to its own `getHeadersFromServer()` method.
21
-     * Defaults to php://input for the request body.
22
-     *
23
-     * @throws \InvalidArgumentException if no valid method or URI can be determined
24
-     */
25
-    public function fromGlobals(): ServerRequestInterface;
26
-
27
-    /**
28
-     * Create a new server request from a set of arrays.
29
-     *
30
-     * @param array                                $server  typically $_SERVER or similar structure
31
-     * @param array                                $headers typically the output of getallheaders() or similar structure
32
-     * @param array                                $cookie  typically $_COOKIE or similar structure
33
-     * @param array                                $get     typically $_GET or similar structure
34
-     * @param array                                $post    typically $_POST or similar structure
35
-     * @param array                                $files   typically $_FILES or similar structure
36
-     * @param StreamInterface|resource|string|null $body    Typically stdIn
37
-     *
38
-     * @throws \InvalidArgumentException if no valid method or URI can be determined
39
-     */
40
-    public function fromArrays(
41
-        array $server,
42
-        array $headers = [],
43
-        array $cookie = [],
44
-        array $get = [],
45
-        array $post = [],
46
-        array $files = [],
47
-        $body = null
48
-    ): ServerRequestInterface;
49
-
50
-    /**
51
-     * Get parsed headers from ($_SERVER) array.
52
-     *
53
-     * @param array $server typically $_SERVER or similar structure
54
-     *
55
-     * @return array
56
-     */
57
-    public static function getHeadersFromServer(array $server): array;
58
-}

+ 0
- 65
vendor/nyholm/psr7/CHANGELOG.md 查看文件

@@ -1,65 +0,0 @@
1
-# Changelog
2
-
3
-All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
-
5
-## 1.1.0
6
-
7
-### Added
8
-
9
-- Improved performance
10
-- More tests for `UploadedFile` and `HttplugFactory`
11
-
12
-### Removed
13
-
14
-- Dead code
15
-
16
-## 1.0.1
17
-
18
-### Fixed
19
-
20
-- Handle `fopen` failing in createStreamFromFile according to PSR-7.
21
-- Reduce execution path to speed up performance. 
22
-- Fixed typos.
23
-- Code style.
24
-
25
-## 1.0.0
26
-
27
-### Added
28
-
29
-- Support for final PSR-17 (HTTP factories). (`Psr17Factory`)
30
-- Support for numeric header values. 
31
-- Support for empty header values. 
32
-- All classes are final
33
-- `HttplugFactory` that implements factory interfaces from HTTPlug. 
34
-
35
-### Changed
36
-
37
-- `ServerRequest` does not extend `Request`.
38
-
39
-### Removed
40
-
41
-- The HTTPlug discovery strategy was removed since it is included in php-http/discovery 1.4.
42
-- `UploadedFileFactory()` was removed in favor for `Psr17Factory`.  
43
-- `ServerRequestFactory()` was removed in favor for `Psr17Factory`.  
44
-- `StreamFactory`, `UriFactory`, abd `MessageFactory`. Use `HttplugFactory` instead.  
45
-- `ServerRequestFactory::createServerRequestFromArray`, `ServerRequestFactory::createServerRequestFromArrays` and 
46
-  `ServerRequestFactory::createServerRequestFromGlobals`. Please use the new `nyholm/psr7-server` instead. 
47
-
48
-## 0.3.0
49
-
50
-### Added
51
-
52
-- Return types.
53
-- Many `InvalidArgumentException`s are thrown when you use invalid arguments. 
54
-- Integration tests for `UploadedFile` and `ServerRequest`.
55
-
56
-### Changed
57
-
58
-- We dropped PHP7.0 support. 
59
-- PSR-17 factories have been marked as internal. They do not fall under our BC promise until PSR-17 is accepted.  
60
-- `UploadedFileFactory::createUploadedFile` does not accept a string file path. 
61
-
62
-## 0.2.3
63
-
64
-No changelog before this release
65
-

+ 0
- 21
vendor/nyholm/psr7/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-MIT License
2
-
3
-Copyright (c) 2016 Tobias Nyholm
4
-
5
-Permission is hereby granted, free of charge, to any person obtaining a copy
6
-of this software and associated documentation files (the "Software"), to deal
7
-in the Software without restriction, including without limitation the rights
8
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-copies of the Software, and to permit persons to whom the Software is
10
-furnished to do so, subject to the following conditions:
11
-
12
-The above copyright notice and this permission notice shall be included in all
13
-copies or substantial portions of the Software.
14
-
15
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-SOFTWARE.

+ 0
- 110
vendor/nyholm/psr7/README.md 查看文件

@@ -1,110 +0,0 @@
1
-# PSR-7 implementation
2
-
3
-[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7.svg?style=flat-square)](https://github.com/Nyholm/psr7/releases)
4
-[![Build Status](https://img.shields.io/travis/Nyholm/psr7/master.svg?style=flat-square)](https://travis-ci.org/Nyholm/psr7)
5
-[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Nyholm/psr7.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7)
6
-[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/psr7.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7)
7
-[![Total Downloads](https://poser.pugx.org/nyholm/psr7/downloads)](https://packagist.org/packages/nyholm/psr7)
8
-[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7/d/monthly.png)](https://packagist.org/packages/nyholm/psr7)
9
-[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
10
-
11
-
12
-A super lightweight PSR-7 implementation. Very strict and very fast.
13
-
14
-| Description | Guzzle | Zend | Slim | Nyholm |
15
-| ---- | ------ | ---- | ---- | ------ |
16
-| Lines of code | 3 000 | 3 000 | 1 700 | 1 000 |
17
-| PHP7 | No | Yes | No | Yes |
18
-| PSR-7* | 66% | 100% | 75% | 100% |
19
-| PSR-17 | No | Yes | Yes | Yes |
20
-| HTTPlug | No | No | No | Yes |
21
-| Performance** | 1.34x | 1x | 1.16x | 1.75x |
22
-
23
-\* Percent of completed tests in https://github.com/php-http/psr7-integration-tests
24
-
25
-\** See benchmark at https://github.com/Nyholm/http-client-benchmark (higher is better)
26
-
27
-## Installation
28
-
29
-```bash
30
-composer require nyholm/psr7
31
-```
32
-
33
-If you are using Symfony Flex then you get all message factories registered as services. 
34
-
35
-## Usage
36
-
37
-The PSR-7 objects do not contain any other public methods then those defined in
38
-the [PSR-7 specification](https://www.php-fig.org/psr/psr-7/). 
39
-
40
-### Create objects
41
-
42
-Use the PSR-17 factory to create requests, streams, URIs etc.  
43
-
44
-```php
45
-$factory = new \Nyholm\Psr7\Factory\Psr17Factory();
46
-$request = $factory->createRequest('GET', 'http://tnyholm.se');
47
-$stream = $factory->createStream('foobar');
48
-```
49
-
50
-### Sending a request
51
-
52
-With [HTTPlug](http://httplug.io/) or any other PSR-18 (HTTP client) you may send 
53
-requests like: 
54
-
55
-```bash
56
-composer require kriswallsmith/buzz
57
-```
58
-
59
-```php
60
-$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
61
-$psr18Client = new Buzz\Client\Curl($psr17Factory);
62
-
63
-$request = (new Psr17Factory())->createRequest('GET', 'http://tnyholm.se');
64
-$response = $psr18Client->sendRequest($request);
65
-```
66
-
67
-### Create server requests
68
-
69
-The [`nyholm/psr7-server`](https://github.com/Nyholm/psr7-server) package can be used 
70
-to create server requests from PHP superglobals.
71
-
72
-```bash
73
-composer require nyholm/psr7-server
74
-```
75
-
76
-```php
77
-use Nyholm\Psr7\Factory\Psr17Factory;
78
-
79
-$psr17Factory = new Psr17Factory();
80
-
81
-$creator = new ServerRequestCreator(
82
-    $psr17Factory, // ServerRequestFactory
83
-    $psr17Factory, // UriFactory
84
-    $psr17Factory, // UploadedFileFactory
85
-    $psr17Factory  // StreamFactory
86
-);
87
-
88
-$serverRequest = $creator->fromGlobals();
89
-```
90
-
91
-### Emitting a response
92
-
93
-```bash
94
-composer require zendframework/zend-httphandlerrunner
95
-```
96
-
97
-```php
98
-$response = (new Psr17Factory())->createReponse('200', 'Hello world');
99
-(new \Zend\HttpHandlerRunner\Emitter\SapiEmitter())->emit($response);
100
-```
101
-
102
-## Our goal
103
-
104
-This package is currently maintained by [Tobias Nyholm](http://nyholm.se) and 
105
-[Martijn van der Ven](https://vanderven.se/martijn/). They have decided that the
106
-goal of this library should be to provide a super strict implementation of 
107
-[PSR-7](https://www.php-fig.org/psr/psr-7/) that is blazing fast. 
108
-
109
-The package will never include any extra features nor helper methods. All our classes
110
-and functions exist because they are required to fulfill the PSR-7 specification. 

+ 0
- 51
vendor/nyholm/psr7/composer.json 查看文件

@@ -1,51 +0,0 @@
1
-{
2
-    "name": "nyholm/psr7",
3
-    "description": "A fast PHP7 implementation of PSR-7",
4
-    "license": "MIT",
5
-    "keywords": ["psr-7", "psr-17"],
6
-    "homepage": "http://tnyholm.se",
7
-    "authors": [
8
-        {
9
-            "name": "Tobias Nyholm",
10
-            "email": "tobias.nyholm@gmail.com"
11
-        },
12
-        {
13
-            "name": "Martijn van der Ven",
14
-            "email": "martijn@vanderven.se"
15
-        }
16
-    ],
17
-    "require": {
18
-        "php": "^7.1",
19
-        "psr/http-message": "^1.0",
20
-        "php-http/message-factory": "^1.0",
21
-        "psr/http-factory": "^1.0"
22
-    },
23
-    "require-dev": {
24
-        "phpunit/phpunit": "^7.5",
25
-        "php-http/psr7-integration-tests": "dev-master",
26
-        "http-interop/http-factory-tests": "dev-master"
27
-    },
28
-    "provide": {
29
-        "psr/http-message-implementation": "1.0",
30
-        "psr/http-factory-implementation": "1.0"
31
-    },
32
-    "autoload": {
33
-        "psr-4": {
34
-            "Nyholm\\Psr7\\": "src/"
35
-        }
36
-    },
37
-    "autoload-dev": {
38
-        "psr-4": {
39
-            "Tests\\Nyholm\\Psr7\\": "tests/"
40
-        }
41
-    },
42
-    "scripts": {
43
-        "test": "vendor/bin/phpunit",
44
-        "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
45
-    },
46
-    "extra": {
47
-        "branch-alias": {
48
-            "dev-master": "1.0-dev"
49
-        }
50
-    }
51
-}

+ 0
- 25
vendor/nyholm/psr7/phpstan.neon.dist 查看文件

@@ -1,25 +0,0 @@
1
-parameters:
2
-    level: 5
3
-    paths:
4
-      - src
5
-
6
-    ignoreErrors:
7
-        -
8
-            message: '#Strict comparison using === between false and true will always evaluate to false#'
9
-            path: %currentWorkingDirectory%/src/UploadedFile.php
10
-
11
-        -
12
-            message: '#Strict comparison using === between null and string will always evaluate to false#'
13
-            path: %currentWorkingDirectory%/src/Response.php
14
-
15
-        -
16
-            message: '#Result of && is always false.#'
17
-            path: %currentWorkingDirectory%/src/Response.php
18
-
19
-        -
20
-            message: '#Strict comparison using !== between null and null will always evaluate to false#'
21
-            path: %currentWorkingDirectory%/src/ServerRequest.php
22
-
23
-        -
24
-            message: '#Result of && is always false#'
25
-            path: %currentWorkingDirectory%/src/ServerRequest.php

+ 0
- 40
vendor/nyholm/psr7/src/Factory/HttplugFactory.php 查看文件

@@ -1,40 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7\Factory;
6
-
7
-use Http\Message\{MessageFactory, StreamFactory, UriFactory};
8
-use Nyholm\Psr7\{Request, Response, Stream, Uri};
9
-use Psr\Http\Message\UriInterface;
10
-
11
-/**
12
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
13
- * @author Martijn van der Ven <martijn@vanderven.se>
14
- */
15
-final class HttplugFactory implements MessageFactory, StreamFactory, UriFactory
16
-{
17
-    public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1')
18
-    {
19
-        return new Request($method, $uri, $headers, $body, $protocolVersion);
20
-    }
21
-
22
-    public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1')
23
-    {
24
-        return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase);
25
-    }
26
-
27
-    public function createStream($body = null)
28
-    {
29
-        return Stream::create($body ?? '');
30
-    }
31
-
32
-    public function createUri($uri = ''): UriInterface
33
-    {
34
-        if ($uri instanceof UriInterface) {
35
-            return $uri;
36
-        }
37
-
38
-        return new Uri($uri);
39
-    }
40
-}

+ 0
- 68
vendor/nyholm/psr7/src/Factory/Psr17Factory.php 查看文件

@@ -1,68 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7\Factory;
6
-
7
-use Nyholm\Psr7\{Request, Response, ServerRequest, Stream, UploadedFile, Uri};
8
-use Psr\Http\Message\{RequestFactoryInterface, RequestInterface, ResponseFactoryInterface, ResponseInterface, ServerRequestFactoryInterface, ServerRequestInterface, StreamFactoryInterface, StreamInterface, UploadedFileFactoryInterface, UploadedFileInterface, UriFactoryInterface, UriInterface};
9
-
10
-/**
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-final class Psr17Factory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface
15
-{
16
-    public function createRequest(string $method, $uri): RequestInterface
17
-    {
18
-        return new Request($method, $uri);
19
-    }
20
-
21
-    public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
22
-    {
23
-        return new Response($code, [], null, '1.1', $reasonPhrase);
24
-    }
25
-
26
-    public function createStream(string $content = ''): StreamInterface
27
-    {
28
-        return Stream::create($content);
29
-    }
30
-
31
-    public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
32
-    {
33
-        $resource = @\fopen($filename, $mode);
34
-        if (false === $resource) {
35
-            if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'])) {
36
-                throw new \InvalidArgumentException('The mode ' . $mode . ' is invalid.');
37
-            }
38
-
39
-            throw new \RuntimeException('The file ' . $filename . ' cannot be opened.');
40
-        }
41
-
42
-        return Stream::create($resource);
43
-    }
44
-
45
-    public function createStreamFromResource($resource): StreamInterface
46
-    {
47
-        return Stream::create($resource);
48
-    }
49
-
50
-    public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface
51
-    {
52
-        if (null === $size) {
53
-            $size = $stream->getSize();
54
-        }
55
-
56
-        return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
57
-    }
58
-
59
-    public function createUri(string $uri = ''): UriInterface
60
-    {
61
-        return new Uri($uri);
62
-    }
63
-
64
-    public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
65
-    {
66
-        return new ServerRequest($method, $uri, [], null, '1.1', $serverParams);
67
-    }
68
-}

+ 0
- 202
vendor/nyholm/psr7/src/MessageTrait.php 查看文件

@@ -1,202 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\StreamInterface;
8
-
9
-/**
10
- * Trait implementing functionality common to requests and responses.
11
- *
12
- * @author Michael Dowling and contributors to guzzlehttp/psr7
13
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
14
- * @author Martijn van der Ven <martijn@vanderven.se>
15
- *
16
- * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise
17
- */
18
-trait MessageTrait
19
-{
20
-    /** @var array Map of all registered headers, as original name => array of values */
21
-    private $headers = [];
22
-
23
-    /** @var array Map of lowercase header name => original name at registration */
24
-    private $headerNames = [];
25
-
26
-    /** @var string */
27
-    private $protocol = '1.1';
28
-
29
-    /** @var StreamInterface|null */
30
-    private $stream;
31
-
32
-    public function getProtocolVersion(): string
33
-    {
34
-        return $this->protocol;
35
-    }
36
-
37
-    public function withProtocolVersion($version): self
38
-    {
39
-        if ($this->protocol === $version) {
40
-            return $this;
41
-        }
42
-
43
-        $new = clone $this;
44
-        $new->protocol = $version;
45
-
46
-        return $new;
47
-    }
48
-
49
-    public function getHeaders(): array
50
-    {
51
-        return $this->headers;
52
-    }
53
-
54
-    public function hasHeader($header): bool
55
-    {
56
-        return isset($this->headerNames[\strtolower($header)]);
57
-    }
58
-
59
-    public function getHeader($header): array
60
-    {
61
-        $header = \strtolower($header);
62
-        if (!isset($this->headerNames[$header])) {
63
-            return [];
64
-        }
65
-
66
-        $header = $this->headerNames[$header];
67
-
68
-        return $this->headers[$header];
69
-    }
70
-
71
-    public function getHeaderLine($header): string
72
-    {
73
-        return \implode(', ', $this->getHeader($header));
74
-    }
75
-
76
-    public function withHeader($header, $value): self
77
-    {
78
-        $value = $this->validateAndTrimHeader($header, $value);
79
-        $normalized = \strtolower($header);
80
-
81
-        $new = clone $this;
82
-        if (isset($new->headerNames[$normalized])) {
83
-            unset($new->headers[$new->headerNames[$normalized]]);
84
-        }
85
-        $new->headerNames[$normalized] = $header;
86
-        $new->headers[$header] = $value;
87
-
88
-        return $new;
89
-    }
90
-
91
-    public function withAddedHeader($header, $value): self
92
-    {
93
-        if (!\is_string($header) || '' === $header) {
94
-            throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string.');
95
-        }
96
-
97
-        $new = clone $this;
98
-        $new->setHeaders([$header => $value]);
99
-
100
-        return $new;
101
-    }
102
-
103
-    public function withoutHeader($header): self
104
-    {
105
-        $normalized = \strtolower($header);
106
-        if (!isset($this->headerNames[$normalized])) {
107
-            return $this;
108
-        }
109
-
110
-        $header = $this->headerNames[$normalized];
111
-        $new = clone $this;
112
-        unset($new->headers[$header], $new->headerNames[$normalized]);
113
-
114
-        return $new;
115
-    }
116
-
117
-    public function getBody(): StreamInterface
118
-    {
119
-        if (null === $this->stream) {
120
-            $this->stream = Stream::create('');
121
-        }
122
-
123
-        return $this->stream;
124
-    }
125
-
126
-    public function withBody(StreamInterface $body): self
127
-    {
128
-        if ($body === $this->stream) {
129
-            return $this;
130
-        }
131
-
132
-        $new = clone $this;
133
-        $new->stream = $body;
134
-
135
-        return $new;
136
-    }
137
-
138
-    private function setHeaders(array $headers) /*:void*/
139
-    {
140
-        foreach ($headers as $header => $value) {
141
-            $value = $this->validateAndTrimHeader($header, $value);
142
-            $normalized = \strtolower($header);
143
-            if (isset($this->headerNames[$normalized])) {
144
-                $header = $this->headerNames[$normalized];
145
-                $this->headers[$header] = \array_merge($this->headers[$header], $value);
146
-            } else {
147
-                $this->headerNames[$normalized] = $header;
148
-                $this->headers[$header] = $value;
149
-            }
150
-        }
151
-    }
152
-
153
-    /**
154
-     * Make sure the header complies with RFC 7230.
155
-     *
156
-     * Header names must be a non-empty string consisting of token characters.
157
-     *
158
-     * Header values must be strings consisting of visible characters with all optional
159
-     * leading and trailing whitespace stripped. This method will always strip such
160
-     * optional whitespace. Note that the method does not allow folding whitespace within
161
-     * the values as this was deprecated for almost all instances by the RFC.
162
-     *
163
-     * header-field = field-name ":" OWS field-value OWS
164
-     * field-name   = 1*( "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^"
165
-     *              / "_" / "`" / "|" / "~" / %x30-39 / ( %x41-5A / %x61-7A ) )
166
-     * OWS          = *( SP / HTAB )
167
-     * field-value  = *( ( %x21-7E / %x80-FF ) [ 1*( SP / HTAB ) ( %x21-7E / %x80-FF ) ] )
168
-     *
169
-     * @see https://tools.ietf.org/html/rfc7230#section-3.2.4
170
-     */
171
-    private function validateAndTrimHeader($header, $values): array
172
-    {
173
-        if (!\is_string($header) || 1 !== \preg_match("@^[!#$%&'*+.^_`|~0-9A-Za-z-]+$@", $header)) {
174
-            throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string.');
175
-        }
176
-
177
-        if (!\is_array($values)) {
178
-            // This is simple, just one value.
179
-            if ((!\is_numeric($values) && !\is_string($values)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@", (string) $values)) {
180
-                throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings.');
181
-            }
182
-
183
-            return [\trim((string) $values, " \t")];
184
-        }
185
-
186
-        if (empty($values)) {
187
-            throw new \InvalidArgumentException('Header values must be a string or an array of strings, empty array given.');
188
-        }
189
-
190
-        // Assert Non empty array
191
-        $returnValues = [];
192
-        foreach ($values as $v) {
193
-            if ((!\is_numeric($v) && !\is_string($v)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@", (string) $v)) {
194
-                throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings.');
195
-            }
196
-
197
-            $returnValues[] = \trim((string) $v, " \t");
198
-        }
199
-
200
-        return $returnValues;
201
-    }
202
-}

+ 0
- 45
vendor/nyholm/psr7/src/Request.php 查看文件

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\{RequestInterface, StreamInterface, UriInterface};
8
-
9
-/**
10
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
11
- * @author Martijn van der Ven <martijn@vanderven.se>
12
- */
13
-final class Request implements RequestInterface
14
-{
15
-    use MessageTrait;
16
-    use RequestTrait;
17
-
18
-    /**
19
-     * @param string $method HTTP method
20
-     * @param string|UriInterface $uri URI
21
-     * @param array $headers Request headers
22
-     * @param string|resource|StreamInterface|null $body Request body
23
-     * @param string $version Protocol version
24
-     */
25
-    public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1')
26
-    {
27
-        if (!($uri instanceof UriInterface)) {
28
-            $uri = new Uri($uri);
29
-        }
30
-
31
-        $this->method = $method;
32
-        $this->uri = $uri;
33
-        $this->setHeaders($headers);
34
-        $this->protocol = $version;
35
-
36
-        if (!$this->hasHeader('Host')) {
37
-            $this->updateHostFromUri();
38
-        }
39
-
40
-        // If we got no body, defer initialization of the stream until Request::getBody()
41
-        if ('' !== $body && null !== $body) {
42
-            $this->stream = Stream::create($body);
43
-        }
44
-    }
45
-}

+ 0
- 113
vendor/nyholm/psr7/src/RequestTrait.php 查看文件

@@ -1,113 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\UriInterface;
8
-
9
-/**
10
- * @author Michael Dowling and contributors to guzzlehttp/psr7
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- *
14
- * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise
15
- */
16
-trait RequestTrait
17
-{
18
-    /** @var string */
19
-    private $method;
20
-
21
-    /** @var string|null */
22
-    private $requestTarget;
23
-
24
-    /** @var UriInterface|null */
25
-    private $uri;
26
-
27
-    public function getRequestTarget(): string
28
-    {
29
-        if (null !== $this->requestTarget) {
30
-            return $this->requestTarget;
31
-        }
32
-
33
-        if ('' === $target = $this->uri->getPath()) {
34
-            $target = '/';
35
-        }
36
-        if ('' !== $this->uri->getQuery()) {
37
-            $target .= '?' . $this->uri->getQuery();
38
-        }
39
-
40
-        return $target;
41
-    }
42
-
43
-    public function withRequestTarget($requestTarget): self
44
-    {
45
-        if (\preg_match('#\s#', $requestTarget)) {
46
-            throw new \InvalidArgumentException('Invalid request target provided; cannot contain whitespace');
47
-        }
48
-
49
-        $new = clone $this;
50
-        $new->requestTarget = $requestTarget;
51
-
52
-        return $new;
53
-    }
54
-
55
-    public function getMethod(): string
56
-    {
57
-        return $this->method;
58
-    }
59
-
60
-    public function withMethod($method): self
61
-    {
62
-        if (!\is_string($method)) {
63
-            throw new \InvalidArgumentException('Method must be a string');
64
-        }
65
-
66
-        $new = clone $this;
67
-        $new->method = $method;
68
-
69
-        return $new;
70
-    }
71
-
72
-    public function getUri(): UriInterface
73
-    {
74
-        return $this->uri;
75
-    }
76
-
77
-    public function withUri(UriInterface $uri, $preserveHost = false): self
78
-    {
79
-        if ($uri === $this->uri) {
80
-            return $this;
81
-        }
82
-
83
-        $new = clone $this;
84
-        $new->uri = $uri;
85
-
86
-        if (!$preserveHost || !$this->hasHeader('Host')) {
87
-            $new->updateHostFromUri();
88
-        }
89
-
90
-        return $new;
91
-    }
92
-
93
-    private function updateHostFromUri() /*:void*/
94
-    {
95
-        if ('' === $host = $this->uri->getHost()) {
96
-            return;
97
-        }
98
-
99
-        if (null !== ($port = $this->uri->getPort())) {
100
-            $host .= ':' . $port;
101
-        }
102
-
103
-        if (isset($this->headerNames['host'])) {
104
-            $header = $this->headerNames['host'];
105
-        } else {
106
-            $this->headerNames['host'] = $header = 'Host';
107
-        }
108
-
109
-        // Ensure Host is the first header.
110
-        // See: http://tools.ietf.org/html/rfc7230#section-5.4
111
-        $this->headers = [$header => [$host]] + $this->headers;
112
-    }
113
-}

+ 0
- 88
vendor/nyholm/psr7/src/Response.php 查看文件

@@ -1,88 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\{ResponseInterface, StreamInterface};
8
-
9
-/**
10
- * @author Michael Dowling and contributors to guzzlehttp/psr7
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-final class Response implements ResponseInterface
15
-{
16
-    use MessageTrait;
17
-
18
-    /** @var array Map of standard HTTP status code/reason phrases */
19
-    /*private*/ const PHRASES = [
20
-        100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing',
21
-        200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported',
22
-        300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect',
23
-        400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons',
24
-        500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 511 => 'Network Authentication Required',
25
-    ];
26
-
27
-    /** @var string */
28
-    private $reasonPhrase = '';
29
-
30
-    /** @var int */
31
-    private $statusCode;
32
-
33
-    /**
34
-     * @param int $status Status code
35
-     * @param array $headers Response headers
36
-     * @param string|resource|StreamInterface|null $body Response body
37
-     * @param string $version Protocol version
38
-     * @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
39
-     */
40
-    public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
41
-    {
42
-        // If we got no body, defer initialization of the stream until Response::getBody()
43
-        if ('' !== $body && null !== $body) {
44
-            $this->stream = Stream::create($body);
45
-        }
46
-
47
-        $this->statusCode = $status;
48
-        $this->setHeaders($headers);
49
-        if (null === $reason && isset(self::PHRASES[$this->statusCode])) {
50
-            $this->reasonPhrase = self::PHRASES[$status];
51
-        } else {
52
-            $this->reasonPhrase = $reason;
53
-        }
54
-
55
-        $this->protocol = $version;
56
-    }
57
-
58
-    public function getStatusCode(): int
59
-    {
60
-        return $this->statusCode;
61
-    }
62
-
63
-    public function getReasonPhrase(): string
64
-    {
65
-        return $this->reasonPhrase;
66
-    }
67
-
68
-    public function withStatus($code, $reasonPhrase = ''): self
69
-    {
70
-        if (!\is_int($code) && !\is_string($code)) {
71
-            throw new \InvalidArgumentException('Status code has to be an integer');
72
-        }
73
-
74
-        $code = (int) $code;
75
-        if ($code < 100 || $code > 599) {
76
-            throw new \InvalidArgumentException('Status code has to be an integer between 100 and 599');
77
-        }
78
-
79
-        $new = clone $this;
80
-        $new->statusCode = $code;
81
-        if ((null === $reasonPhrase || '' === $reasonPhrase) && isset(self::PHRASES[$new->statusCode])) {
82
-            $reasonPhrase = self::PHRASES[$new->statusCode];
83
-        }
84
-        $new->reasonPhrase = $reasonPhrase;
85
-
86
-        return $new;
87
-    }
88
-}

+ 0
- 162
vendor/nyholm/psr7/src/ServerRequest.php 查看文件

@@ -1,162 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\{ServerRequestInterface, StreamInterface, UploadedFileInterface, UriInterface};
8
-
9
-/**
10
- * @author Michael Dowling and contributors to guzzlehttp/psr7
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-final class ServerRequest implements ServerRequestInterface
15
-{
16
-    use MessageTrait;
17
-    use RequestTrait;
18
-
19
-    /** @var array */
20
-    private $attributes = [];
21
-
22
-    /** @var array */
23
-    private $cookieParams = [];
24
-
25
-    /** @var array|object|null */
26
-    private $parsedBody;
27
-
28
-    /** @var array */
29
-    private $queryParams = [];
30
-
31
-    /** @var array */
32
-    private $serverParams;
33
-
34
-    /** @var UploadedFileInterface[] */
35
-    private $uploadedFiles = [];
36
-
37
-    /**
38
-     * @param string $method HTTP method
39
-     * @param string|UriInterface $uri URI
40
-     * @param array $headers Request headers
41
-     * @param string|resource|StreamInterface|null $body Request body
42
-     * @param string $version Protocol version
43
-     * @param array $serverParams Typically the $_SERVER superglobal
44
-     */
45
-    public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1', array $serverParams = [])
46
-    {
47
-        $this->serverParams = $serverParams;
48
-
49
-        if (!($uri instanceof UriInterface)) {
50
-            $uri = new Uri($uri);
51
-        }
52
-
53
-        $this->method = $method;
54
-        $this->uri = $uri;
55
-        $this->setHeaders($headers);
56
-        $this->protocol = $version;
57
-
58
-        if (!$this->hasHeader('Host')) {
59
-            $this->updateHostFromUri();
60
-        }
61
-
62
-        // If we got no body, defer initialization of the stream until ServerRequest::getBody()
63
-        if ('' !== $body && null !== $body) {
64
-            $this->stream = Stream::create($body);
65
-        }
66
-    }
67
-
68
-    public function getServerParams(): array
69
-    {
70
-        return $this->serverParams;
71
-    }
72
-
73
-    public function getUploadedFiles(): array
74
-    {
75
-        return $this->uploadedFiles;
76
-    }
77
-
78
-    public function withUploadedFiles(array $uploadedFiles)
79
-    {
80
-        $new = clone $this;
81
-        $new->uploadedFiles = $uploadedFiles;
82
-
83
-        return $new;
84
-    }
85
-
86
-    public function getCookieParams(): array
87
-    {
88
-        return $this->cookieParams;
89
-    }
90
-
91
-    public function withCookieParams(array $cookies)
92
-    {
93
-        $new = clone $this;
94
-        $new->cookieParams = $cookies;
95
-
96
-        return $new;
97
-    }
98
-
99
-    public function getQueryParams(): array
100
-    {
101
-        return $this->queryParams;
102
-    }
103
-
104
-    public function withQueryParams(array $query)
105
-    {
106
-        $new = clone $this;
107
-        $new->queryParams = $query;
108
-
109
-        return $new;
110
-    }
111
-
112
-    public function getParsedBody()
113
-    {
114
-        return $this->parsedBody;
115
-    }
116
-
117
-    public function withParsedBody($data)
118
-    {
119
-        if (!\is_array($data) && !\is_object($data) && null !== $data) {
120
-            throw new \InvalidArgumentException('First parameter to withParsedBody MUST be object, array or null');
121
-        }
122
-
123
-        $new = clone $this;
124
-        $new->parsedBody = $data;
125
-
126
-        return $new;
127
-    }
128
-
129
-    public function getAttributes(): array
130
-    {
131
-        return $this->attributes;
132
-    }
133
-
134
-    public function getAttribute($attribute, $default = null)
135
-    {
136
-        if (false === \array_key_exists($attribute, $this->attributes)) {
137
-            return $default;
138
-        }
139
-
140
-        return $this->attributes[$attribute];
141
-    }
142
-
143
-    public function withAttribute($attribute, $value): self
144
-    {
145
-        $new = clone $this;
146
-        $new->attributes[$attribute] = $value;
147
-
148
-        return $new;
149
-    }
150
-
151
-    public function withoutAttribute($attribute): self
152
-    {
153
-        if (false === \array_key_exists($attribute, $this->attributes)) {
154
-            return $this;
155
-        }
156
-
157
-        $new = clone $this;
158
-        unset($new->attributes[$attribute]);
159
-
160
-        return $new;
161
-    }
162
-}

+ 0
- 257
vendor/nyholm/psr7/src/Stream.php 查看文件

@@ -1,257 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\StreamInterface;
8
-
9
-/**
10
- * @author Michael Dowling and contributors to guzzlehttp/psr7
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-final class Stream implements StreamInterface
15
-{
16
-    /** @var resource|null A resource reference */
17
-    private $stream;
18
-
19
-    /** @var bool */
20
-    private $seekable;
21
-
22
-    /** @var bool */
23
-    private $readable;
24
-
25
-    /** @var bool */
26
-    private $writable;
27
-
28
-    /** @var array|mixed|void|null */
29
-    private $uri;
30
-
31
-    /** @var int|null */
32
-    private $size;
33
-
34
-    /** @var array Hash of readable and writable stream types */
35
-    /*private*/ const READ_WRITE_HASH = [
36
-        'read' => [
37
-            'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
38
-            'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
39
-            'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
40
-            'x+t' => true, 'c+t' => true, 'a+' => true,
41
-        ],
42
-        'write' => [
43
-            'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
44
-            'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true,
45
-            'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
46
-            'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true,
47
-        ],
48
-    ];
49
-
50
-    private function __construct()
51
-    {
52
-    }
53
-
54
-    /**
55
-     * Creates a new PSR-7 stream.
56
-     *
57
-     * @param string|resource|StreamInterface $body
58
-     *
59
-     * @return StreamInterface
60
-     *
61
-     * @throws \InvalidArgumentException
62
-     */
63
-    public static function create($body = ''): StreamInterface
64
-    {
65
-        if ($body instanceof StreamInterface) {
66
-            return $body;
67
-        }
68
-
69
-        if (\is_string($body)) {
70
-            $resource = \fopen('php://temp', 'rw+');
71
-            \fwrite($resource, $body);
72
-            $body = $resource;
73
-        }
74
-
75
-        if (\is_resource($body)) {
76
-            $new = new self();
77
-            $new->stream = $body;
78
-            $meta = \stream_get_meta_data($new->stream);
79
-            $new->seekable = $meta['seekable'];
80
-            $new->readable = isset(self::READ_WRITE_HASH['read'][$meta['mode']]);
81
-            $new->writable = isset(self::READ_WRITE_HASH['write'][$meta['mode']]);
82
-            $new->uri = $new->getMetadata('uri');
83
-
84
-            return $new;
85
-        }
86
-
87
-        throw new \InvalidArgumentException('First argument to Stream::create() must be a string, resource or StreamInterface.');
88
-    }
89
-
90
-    /**
91
-     * Closes the stream when the destructed.
92
-     */
93
-    public function __destruct()
94
-    {
95
-        $this->close();
96
-    }
97
-
98
-    public function __toString(): string
99
-    {
100
-        try {
101
-            if ($this->isSeekable()) {
102
-                $this->seek(0);
103
-            }
104
-
105
-            return $this->getContents();
106
-        } catch (\Exception $e) {
107
-            return '';
108
-        }
109
-    }
110
-
111
-    public function close() /*:void*/
112
-    {
113
-        if (isset($this->stream)) {
114
-            if (\is_resource($this->stream)) {
115
-                \fclose($this->stream);
116
-            }
117
-            $this->detach();
118
-        }
119
-    }
120
-
121
-    public function detach()
122
-    {
123
-        if (!isset($this->stream)) {
124
-            return null;
125
-        }
126
-
127
-        $result = $this->stream;
128
-        unset($this->stream);
129
-        $this->size = $this->uri = null;
130
-        $this->readable = $this->writable = $this->seekable = false;
131
-
132
-        return $result;
133
-    }
134
-
135
-    public function getSize() /*:?int*/
136
-    {
137
-        if (null !== $this->size) {
138
-            return $this->size;
139
-        }
140
-
141
-        if (!isset($this->stream)) {
142
-            return null;
143
-        }
144
-
145
-        // Clear the stat cache if the stream has a URI
146
-        if ($this->uri) {
147
-            \clearstatcache(true, $this->uri);
148
-        }
149
-
150
-        $stats = \fstat($this->stream);
151
-        if (isset($stats['size'])) {
152
-            $this->size = $stats['size'];
153
-
154
-            return $this->size;
155
-        }
156
-
157
-        return null;
158
-    }
159
-
160
-    public function tell(): int
161
-    {
162
-        if (false === $result = \ftell($this->stream)) {
163
-            throw new \RuntimeException('Unable to determine stream position');
164
-        }
165
-
166
-        return $result;
167
-    }
168
-
169
-    public function eof(): bool
170
-    {
171
-        return !$this->stream || \feof($this->stream);
172
-    }
173
-
174
-    public function isSeekable(): bool
175
-    {
176
-        return $this->seekable;
177
-    }
178
-
179
-    public function seek($offset, $whence = \SEEK_SET) /*:void*/
180
-    {
181
-        if (!$this->seekable) {
182
-            throw new \RuntimeException('Stream is not seekable');
183
-        }
184
-
185
-        if (-1 === \fseek($this->stream, $offset, $whence)) {
186
-            throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, true));
187
-        }
188
-    }
189
-
190
-    public function rewind() /*:void*/
191
-    {
192
-        $this->seek(0);
193
-    }
194
-
195
-    public function isWritable(): bool
196
-    {
197
-        return $this->writable;
198
-    }
199
-
200
-    public function write($string): int
201
-    {
202
-        if (!$this->writable) {
203
-            throw new \RuntimeException('Cannot write to a non-writable stream');
204
-        }
205
-
206
-        // We can't know the size after writing anything
207
-        $this->size = null;
208
-
209
-        if (false === $result = \fwrite($this->stream, $string)) {
210
-            throw new \RuntimeException('Unable to write to stream');
211
-        }
212
-
213
-        return $result;
214
-    }
215
-
216
-    public function isReadable(): bool
217
-    {
218
-        return $this->readable;
219
-    }
220
-
221
-    public function read($length): string
222
-    {
223
-        if (!$this->readable) {
224
-            throw new \RuntimeException('Cannot read from non-readable stream');
225
-        }
226
-
227
-        return \fread($this->stream, $length);
228
-    }
229
-
230
-    public function getContents(): string
231
-    {
232
-        if (!isset($this->stream)) {
233
-            throw new \RuntimeException('Unable to read stream contents');
234
-        }
235
-
236
-        if (false === $contents = \stream_get_contents($this->stream)) {
237
-            throw new \RuntimeException('Unable to read stream contents');
238
-        }
239
-
240
-        return $contents;
241
-    }
242
-
243
-    public function getMetadata($key = null)
244
-    {
245
-        if (!isset($this->stream)) {
246
-            return $key ? null : [];
247
-        }
248
-
249
-        $meta = \stream_get_meta_data($this->stream);
250
-
251
-        if (null === $key) {
252
-            return $meta;
253
-        }
254
-
255
-        return $meta[$key] ?? null;
256
-    }
257
-}

+ 0
- 171
vendor/nyholm/psr7/src/UploadedFile.php 查看文件

@@ -1,171 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\{StreamInterface, UploadedFileInterface};
8
-
9
-/**
10
- * @author Michael Dowling and contributors to guzzlehttp/psr7
11
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
12
- * @author Martijn van der Ven <martijn@vanderven.se>
13
- */
14
-final class UploadedFile implements UploadedFileInterface
15
-{
16
-    /** @var array */
17
-    /*private*/ const ERRORS = [
18
-        \UPLOAD_ERR_OK => 1,
19
-        \UPLOAD_ERR_INI_SIZE => 1,
20
-        \UPLOAD_ERR_FORM_SIZE => 1,
21
-        \UPLOAD_ERR_PARTIAL => 1,
22
-        \UPLOAD_ERR_NO_FILE => 1,
23
-        \UPLOAD_ERR_NO_TMP_DIR => 1,
24
-        \UPLOAD_ERR_CANT_WRITE => 1,
25
-        \UPLOAD_ERR_EXTENSION => 1,
26
-    ];
27
-
28
-    /** @var string */
29
-    private $clientFilename;
30
-
31
-    /** @var string */
32
-    private $clientMediaType;
33
-
34
-    /** @var int */
35
-    private $error;
36
-
37
-    /** @var string|null */
38
-    private $file;
39
-
40
-    /** @var bool */
41
-    private $moved = false;
42
-
43
-    /** @var int */
44
-    private $size;
45
-
46
-    /** @var StreamInterface|null */
47
-    private $stream;
48
-
49
-    /**
50
-     * @param StreamInterface|string|resource $streamOrFile
51
-     * @param int $size
52
-     * @param int $errorStatus
53
-     * @param string|null $clientFilename
54
-     * @param string|null $clientMediaType
55
-     */
56
-    public function __construct($streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null)
57
-    {
58
-        if (false === \is_int($errorStatus) || !isset(self::ERRORS[$errorStatus])) {
59
-            throw new \InvalidArgumentException('Upload file error status must be an integer value and one of the "UPLOAD_ERR_*" constants.');
60
-        }
61
-
62
-        if (false === \is_int($size)) {
63
-            throw new \InvalidArgumentException('Upload file size must be an integer');
64
-        }
65
-
66
-        if (null !== $clientFilename && !\is_string($clientFilename)) {
67
-            throw new \InvalidArgumentException('Upload file client filename must be a string or null');
68
-        }
69
-
70
-        if (null !== $clientMediaType && !\is_string($clientMediaType)) {
71
-            throw new \InvalidArgumentException('Upload file client media type must be a string or null');
72
-        }
73
-
74
-        $this->error = $errorStatus;
75
-        $this->size = $size;
76
-        $this->clientFilename = $clientFilename;
77
-        $this->clientMediaType = $clientMediaType;
78
-
79
-        if (\UPLOAD_ERR_OK === $this->error) {
80
-            // Depending on the value set file or stream variable.
81
-            if (\is_string($streamOrFile)) {
82
-                $this->file = $streamOrFile;
83
-            } elseif (\is_resource($streamOrFile)) {
84
-                $this->stream = Stream::create($streamOrFile);
85
-            } elseif ($streamOrFile instanceof StreamInterface) {
86
-                $this->stream = $streamOrFile;
87
-            } else {
88
-                throw new \InvalidArgumentException('Invalid stream or file provided for UploadedFile');
89
-            }
90
-        }
91
-    }
92
-
93
-    /**
94
-     * @throws \RuntimeException if is moved or not ok
95
-     */
96
-    private function validateActive() /*:void*/
97
-    {
98
-        if (\UPLOAD_ERR_OK !== $this->error) {
99
-            throw new \RuntimeException('Cannot retrieve stream due to upload error');
100
-        }
101
-
102
-        if ($this->moved) {
103
-            throw new \RuntimeException('Cannot retrieve stream after it has already been moved');
104
-        }
105
-    }
106
-
107
-    public function getStream(): StreamInterface
108
-    {
109
-        $this->validateActive();
110
-
111
-        if ($this->stream instanceof StreamInterface) {
112
-            return $this->stream;
113
-        }
114
-
115
-        $resource = \fopen($this->file, 'r');
116
-
117
-        return Stream::create($resource);
118
-    }
119
-
120
-    public function moveTo($targetPath) /*:void*/
121
-    {
122
-        $this->validateActive();
123
-
124
-        if (!\is_string($targetPath) || '' === $targetPath) {
125
-            throw new \InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string');
126
-        }
127
-
128
-        if (null !== $this->file) {
129
-            $this->moved = 'cli' === \PHP_SAPI ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath);
130
-        } else {
131
-            $stream = $this->getStream();
132
-            if ($stream->isSeekable()) {
133
-                $stream->rewind();
134
-            }
135
-
136
-            // Copy the contents of a stream into another stream until end-of-file.
137
-            $dest = Stream::create(\fopen($targetPath, 'w'));
138
-            while (!$stream->eof()) {
139
-                if (!$dest->write($stream->read(1048576))) {
140
-                    break;
141
-                }
142
-            }
143
-
144
-            $this->moved = true;
145
-        }
146
-
147
-        if (false === $this->moved) {
148
-            throw new \RuntimeException(\sprintf('Uploaded file could not be moved to %s', $targetPath));
149
-        }
150
-    }
151
-
152
-    public function getSize(): int
153
-    {
154
-        return $this->size;
155
-    }
156
-
157
-    public function getError(): int
158
-    {
159
-        return $this->error;
160
-    }
161
-
162
-    public function getClientFilename() /*:?string*/
163
-    {
164
-        return $this->clientFilename;
165
-    }
166
-
167
-    public function getClientMediaType() /*:?string*/
168
-    {
169
-        return $this->clientMediaType;
170
-    }
171
-}

+ 0
- 310
vendor/nyholm/psr7/src/Uri.php 查看文件

@@ -1,310 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-namespace Nyholm\Psr7;
6
-
7
-use Psr\Http\Message\UriInterface;
8
-
9
-/**
10
- * PSR-7 URI implementation.
11
- *
12
- * @author Michael Dowling
13
- * @author Tobias Schultze
14
- * @author Matthew Weier O'Phinney
15
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
16
- * @author Martijn van der Ven <martijn@vanderven.se>
17
- */
18
-final class Uri implements UriInterface
19
-{
20
-    /*private*/ const SCHEMES = ['http' => 80, 'https' => 443];
21
-
22
-    /*private*/ const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
23
-
24
-    /*private*/ const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
25
-
26
-    /** @var string Uri scheme. */
27
-    private $scheme = '';
28
-
29
-    /** @var string Uri user info. */
30
-    private $userInfo = '';
31
-
32
-    /** @var string Uri host. */
33
-    private $host = '';
34
-
35
-    /** @var int|null Uri port. */
36
-    private $port;
37
-
38
-    /** @var string Uri path. */
39
-    private $path = '';
40
-
41
-    /** @var string Uri query string. */
42
-    private $query = '';
43
-
44
-    /** @var string Uri fragment. */
45
-    private $fragment = '';
46
-
47
-    public function __construct(string $uri = '')
48
-    {
49
-        if ('' !== $uri) {
50
-            if (false === $parts = \parse_url($uri)) {
51
-                throw new \InvalidArgumentException("Unable to parse URI: $uri");
52
-            }
53
-
54
-            // Apply parse_url parts to a URI.
55
-            $this->scheme = isset($parts['scheme']) ? \strtolower($parts['scheme']) : '';
56
-            $this->userInfo = $parts['user'] ?? '';
57
-            $this->host = isset($parts['host']) ? \strtolower($parts['host']) : '';
58
-            $this->port = isset($parts['port']) ? $this->filterPort($parts['port']) : null;
59
-            $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : '';
60
-            $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : '';
61
-            $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : '';
62
-            if (isset($parts['pass'])) {
63
-                $this->userInfo .= ':' . $parts['pass'];
64
-            }
65
-        }
66
-    }
67
-
68
-    public function __toString(): string
69
-    {
70
-        return self::createUriString($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment);
71
-    }
72
-
73
-    public function getScheme(): string
74
-    {
75
-        return $this->scheme;
76
-    }
77
-
78
-    public function getAuthority(): string
79
-    {
80
-        if ('' === $this->host) {
81
-            return '';
82
-        }
83
-
84
-        $authority = $this->host;
85
-        if ('' !== $this->userInfo) {
86
-            $authority = $this->userInfo . '@' . $authority;
87
-        }
88
-
89
-        if (null !== $this->port) {
90
-            $authority .= ':' . $this->port;
91
-        }
92
-
93
-        return $authority;
94
-    }
95
-
96
-    public function getUserInfo(): string
97
-    {
98
-        return $this->userInfo;
99
-    }
100
-
101
-    public function getHost(): string
102
-    {
103
-        return $this->host;
104
-    }
105
-
106
-    public function getPort() /*:?int*/
107
-    {
108
-        return $this->port;
109
-    }
110
-
111
-    public function getPath(): string
112
-    {
113
-        return $this->path;
114
-    }
115
-
116
-    public function getQuery(): string
117
-    {
118
-        return $this->query;
119
-    }
120
-
121
-    public function getFragment(): string
122
-    {
123
-        return $this->fragment;
124
-    }
125
-
126
-    public function withScheme($scheme): self
127
-    {
128
-        if (!\is_string($scheme)) {
129
-            throw new \InvalidArgumentException('Scheme must be a string');
130
-        }
131
-
132
-        if ($this->scheme === $scheme = \strtolower($scheme)) {
133
-            return $this;
134
-        }
135
-
136
-        $new = clone $this;
137
-        $new->scheme = $scheme;
138
-        $new->port = $new->filterPort($new->port);
139
-
140
-        return $new;
141
-    }
142
-
143
-    public function withUserInfo($user, $password = null): self
144
-    {
145
-        $info = $user;
146
-        if (null !== $password && '' !== $password) {
147
-            $info .= ':' . $password;
148
-        }
149
-
150
-        if ($this->userInfo === $info) {
151
-            return $this;
152
-        }
153
-
154
-        $new = clone $this;
155
-        $new->userInfo = $info;
156
-
157
-        return $new;
158
-    }
159
-
160
-    public function withHost($host): self
161
-    {
162
-        if (!\is_string($host)) {
163
-            throw new \InvalidArgumentException('Host must be a string');
164
-        }
165
-
166
-        if ($this->host === $host = \strtolower($host)) {
167
-            return $this;
168
-        }
169
-
170
-        $new = clone $this;
171
-        $new->host = $host;
172
-
173
-        return $new;
174
-    }
175
-
176
-    public function withPort($port): self
177
-    {
178
-        if ($this->port === $port = $this->filterPort($port)) {
179
-            return $this;
180
-        }
181
-
182
-        $new = clone $this;
183
-        $new->port = $port;
184
-
185
-        return $new;
186
-    }
187
-
188
-    public function withPath($path): self
189
-    {
190
-        if ($this->path === $path = $this->filterPath($path)) {
191
-            return $this;
192
-        }
193
-
194
-        $new = clone $this;
195
-        $new->path = $path;
196
-
197
-        return $new;
198
-    }
199
-
200
-    public function withQuery($query): self
201
-    {
202
-        if ($this->query === $query = $this->filterQueryAndFragment($query)) {
203
-            return $this;
204
-        }
205
-
206
-        $new = clone $this;
207
-        $new->query = $query;
208
-
209
-        return $new;
210
-    }
211
-
212
-    public function withFragment($fragment): self
213
-    {
214
-        if ($this->fragment === $fragment = $this->filterQueryAndFragment($fragment)) {
215
-            return $this;
216
-        }
217
-
218
-        $new = clone $this;
219
-        $new->fragment = $fragment;
220
-
221
-        return $new;
222
-    }
223
-
224
-    /**
225
-     * Create a URI string from its various parts.
226
-     */
227
-    private static function createUriString(string $scheme, string $authority, string $path, string $query, string $fragment): string
228
-    {
229
-        $uri = '';
230
-        if ('' !== $scheme) {
231
-            $uri .= $scheme . ':';
232
-        }
233
-
234
-        if ('' !== $authority) {
235
-            $uri .= '//' . $authority;
236
-        }
237
-
238
-        if ('' !== $path) {
239
-            if ('/' !== $path[0]) {
240
-                if ('' !== $authority) {
241
-                    // If the path is rootless and an authority is present, the path MUST be prefixed by "/"
242
-                    $path = '/' . $path;
243
-                }
244
-            } elseif (isset($path[1]) && '/' === $path[1]) {
245
-                if ('' === $authority) {
246
-                    // If the path is starting with more than one "/" and no authority is present, the
247
-                    // starting slashes MUST be reduced to one.
248
-                    $path = '/' . \ltrim($path, '/');
249
-                }
250
-            }
251
-
252
-            $uri .= $path;
253
-        }
254
-
255
-        if ('' !== $query) {
256
-            $uri .= '?' . $query;
257
-        }
258
-
259
-        if ('' !== $fragment) {
260
-            $uri .= '#' . $fragment;
261
-        }
262
-
263
-        return $uri;
264
-    }
265
-
266
-    /**
267
-     * Is a given port non-standard for the current scheme?
268
-     */
269
-    private static function isNonStandardPort(string $scheme, int $port): bool
270
-    {
271
-        return !isset(self::SCHEMES[$scheme]) || $port !== self::SCHEMES[$scheme];
272
-    }
273
-
274
-    private function filterPort($port) /*:?int*/
275
-    {
276
-        if (null === $port) {
277
-            return null;
278
-        }
279
-
280
-        $port = (int) $port;
281
-        if (1 > $port || 0xffff < $port) {
282
-            throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 1 and 65535', $port));
283
-        }
284
-
285
-        return self::isNonStandardPort($this->scheme, $port) ? $port : null;
286
-    }
287
-
288
-    private function filterPath($path): string
289
-    {
290
-        if (!\is_string($path)) {
291
-            throw new \InvalidArgumentException('Path must be a string');
292
-        }
293
-
294
-        return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path);
295
-    }
296
-
297
-    private function filterQueryAndFragment($str): string
298
-    {
299
-        if (!\is_string($str)) {
300
-            throw new \InvalidArgumentException('Query and fragment must be a string');
301
-        }
302
-
303
-        return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str);
304
-    }
305
-
306
-    private static function rawurlencodeMatchZero(array $match): string
307
-    {
308
-        return \rawurlencode($match[0]);
309
-    }
310
-}

+ 0
- 65
vendor/php-http/message-factory/CHANGELOG.md 查看文件

@@ -1,65 +0,0 @@
1
-# Change Log
2
-
3
-
4
-## 1.0.2 - 2015-12-19
5
-
6
-### Added
7
-
8
-- Request and Response factory binding types to Puli
9
-
10
-
11
-## 1.0.1 - 2015-12-17
12
-
13
-### Added
14
-
15
-- Puli configuration and binding types
16
-
17
-
18
-## 1.0.0 - 2015-12-15
19
-
20
-### Added
21
-
22
-- Response Factory in order to be reused in Message and Server Message factories
23
-- Request Factory
24
-
25
-### Changed
26
-
27
-- Message Factory extends Request and Response factories
28
-
29
-
30
-## 1.0.0-RC1 - 2015-12-14
31
-
32
-### Added
33
-
34
-- CS check
35
-
36
-### Changed
37
-
38
-- RuntimeException is thrown when the StreamFactory cannot write to the underlying stream
39
-
40
-
41
-## 0.3.0 - 2015-11-16
42
-
43
-### Removed
44
-
45
-- Client Context Factory
46
-- Factory Awares and Templates
47
-
48
-
49
-## 0.2.0 - 2015-11-16
50
-
51
-### Changed
52
-
53
-- Reordered the parameters when creating a message to have the protocol last,
54
-as its the least likely to need to be changed.
55
-
56
-
57
-## 0.1.0 - 2015-06-01
58
-
59
-### Added
60
-
61
-- Initial release
62
-
63
-### Changed
64
-
65
-- Helpers are renamed to templates

+ 0
- 19
vendor/php-http/message-factory/LICENSE 查看文件

@@ -1,19 +0,0 @@
1
-Copyright (c) 2015 PHP HTTP Team <team@php-http.org>
2
-
3
-Permission is hereby granted, free of charge, to any person obtaining a copy
4
-of this software and associated documentation files (the "Software"), to deal
5
-in the Software without restriction, including without limitation the rights
6
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
-copies of the Software, and to permit persons to whom the Software is furnished
8
-to do so, subject to the following conditions:
9
-
10
-The above copyright notice and this permission notice shall be included in all
11
-copies or substantial portions of the Software.
12
-
13
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
-THE SOFTWARE.

+ 0
- 36
vendor/php-http/message-factory/README.md 查看文件

@@ -1,36 +0,0 @@
1
-# PSR-7 Message Factory
2
-
3
-[![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases)
4
-[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
5
-[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory)
6
-
7
-**Factory interfaces for PSR-7 HTTP Message.**
8
-
9
-
10
-## Install
11
-
12
-Via Composer
13
-
14
-``` bash
15
-$ composer require php-http/message-factory
16
-```
17
-
18
-
19
-## Documentation
20
-
21
-Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/).
22
-
23
-
24
-## Contributing
25
-
26
-Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
27
-
28
-
29
-## Security
30
-
31
-If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org).
32
-
33
-
34
-## License
35
-
36
-The MIT License (MIT). Please see [License File](LICENSE) for more information.

+ 0
- 27
vendor/php-http/message-factory/composer.json 查看文件

@@ -1,27 +0,0 @@
1
-{
2
-    "name": "php-http/message-factory",
3
-    "description": "Factory interfaces for PSR-7 HTTP Message",
4
-    "license": "MIT",
5
-    "keywords": ["http", "factory", "message", "stream", "uri"],
6
-    "homepage": "http://php-http.org",
7
-    "authors": [
8
-        {
9
-            "name": "Márk Sági-Kazár",
10
-            "email": "mark.sagikazar@gmail.com"
11
-        }
12
-    ],
13
-    "require": {
14
-        "php": ">=5.4",
15
-        "psr/http-message": "^1.0"
16
-    },
17
-    "autoload": {
18
-        "psr-4": {
19
-            "Http\\Message\\": "src/"
20
-        }
21
-    },
22
-    "extra": {
23
-        "branch-alias": {
24
-            "dev-master": "1.0-dev"
25
-        }
26
-    }
27
-}

+ 0
- 43
vendor/php-http/message-factory/puli.json 查看文件

@@ -1,43 +0,0 @@
1
-{
2
-    "version": "1.0",
3
-    "binding-types": {
4
-        "Http\\Message\\MessageFactory": {
5
-            "description": "PSR-7 Message Factory",
6
-            "parameters": {
7
-                "depends": {
8
-                    "description": "Optional class dependency which can be checked by consumers"
9
-                }
10
-            }
11
-        },
12
-        "Http\\Message\\RequestFactory": {
13
-            "parameters": {
14
-                "depends": {
15
-                    "description": "Optional class dependency which can be checked by consumers"
16
-                }
17
-            }
18
-        },
19
-        "Http\\Message\\ResponseFactory": {
20
-            "parameters": {
21
-                "depends": {
22
-                    "description": "Optional class dependency which can be checked by consumers"
23
-                }
24
-            }
25
-        },
26
-        "Http\\Message\\StreamFactory": {
27
-            "description": "PSR-7 Stream Factory",
28
-            "parameters": {
29
-                "depends": {
30
-                    "description": "Optional class dependency which can be checked by consumers"
31
-                }
32
-            }
33
-        },
34
-        "Http\\Message\\UriFactory": {
35
-            "description": "PSR-7 URI Factory",
36
-            "parameters": {
37
-                "depends": {
38
-                    "description": "Optional class dependency which can be checked by consumers"
39
-                }
40
-            }
41
-        }
42
-    }
43
-}

+ 0
- 12
vendor/php-http/message-factory/src/MessageFactory.php 查看文件

@@ -1,12 +0,0 @@
1
-<?php
2
-
3
-namespace Http\Message;
4
-
5
-/**
6
- * Factory for PSR-7 Request and Response.
7
- *
8
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
9
- */
10
-interface MessageFactory extends RequestFactory, ResponseFactory
11
-{
12
-}

+ 0
- 34
vendor/php-http/message-factory/src/RequestFactory.php 查看文件

@@ -1,34 +0,0 @@
1
-<?php
2
-
3
-namespace Http\Message;
4
-
5
-use Psr\Http\Message\UriInterface;
6
-use Psr\Http\Message\RequestInterface;
7
-use Psr\Http\Message\StreamInterface;
8
-
9
-/**
10
- * Factory for PSR-7 Request.
11
- *
12
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
13
- */
14
-interface RequestFactory
15
-{
16
-    /**
17
-     * Creates a new PSR-7 request.
18
-     *
19
-     * @param string                               $method
20
-     * @param string|UriInterface                  $uri
21
-     * @param array                                $headers
22
-     * @param resource|string|StreamInterface|null $body
23
-     * @param string                               $protocolVersion
24
-     *
25
-     * @return RequestInterface
26
-     */
27
-    public function createRequest(
28
-        $method,
29
-        $uri,
30
-        array $headers = [],
31
-        $body = null,
32
-        $protocolVersion = '1.1'
33
-    );
34
-}

+ 0
- 35
vendor/php-http/message-factory/src/ResponseFactory.php 查看文件

@@ -1,35 +0,0 @@
1
-<?php
2
-
3
-namespace Http\Message;
4
-
5
-use Psr\Http\Message\ResponseInterface;
6
-use Psr\Http\Message\StreamInterface;
7
-
8
-/**
9
- * Factory for PSR-7 Response.
10
- *
11
- * This factory contract can be reused in Message and Server Message factories.
12
- *
13
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
14
- */
15
-interface ResponseFactory
16
-{
17
-    /**
18
-     * Creates a new PSR-7 response.
19
-     *
20
-     * @param int                                  $statusCode
21
-     * @param string|null                          $reasonPhrase
22
-     * @param array                                $headers
23
-     * @param resource|string|StreamInterface|null $body
24
-     * @param string                               $protocolVersion
25
-     *
26
-     * @return ResponseInterface
27
-     */
28
-    public function createResponse(
29
-        $statusCode = 200,
30
-        $reasonPhrase = null,
31
-        array $headers = [],
32
-        $body = null,
33
-        $protocolVersion = '1.1'
34
-    );
35
-}

+ 0
- 25
vendor/php-http/message-factory/src/StreamFactory.php 查看文件

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-namespace Http\Message;
4
-
5
-use Psr\Http\Message\StreamInterface;
6
-
7
-/**
8
- * Factory for PSR-7 Stream.
9
- *
10
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
11
- */
12
-interface StreamFactory
13
-{
14
-    /**
15
-     * Creates a new PSR-7 stream.
16
-     *
17
-     * @param string|resource|StreamInterface|null $body
18
-     *
19
-     * @return StreamInterface
20
-     *
21
-     * @throws \InvalidArgumentException If the stream body is invalid.
22
-     * @throws \RuntimeException         If creating the stream from $body fails. 
23
-     */
24
-    public function createStream($body = null);
25
-}

+ 0
- 24
vendor/php-http/message-factory/src/UriFactory.php 查看文件

@@ -1,24 +0,0 @@
1
-<?php
2
-
3
-namespace Http\Message;
4
-
5
-use Psr\Http\Message\UriInterface;
6
-
7
-/**
8
- * Factory for PSR-7 URI.
9
- *
10
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
11
- */
12
-interface UriFactory
13
-{
14
-    /**
15
-     * Creates an PSR-7 URI.
16
-     *
17
-     * @param string|UriInterface $uri
18
-     *
19
-     * @return UriInterface
20
-     *
21
-     * @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI.
22
-     */
23
-    public function createUri($uri);
24
-}

+ 0
- 2
vendor/psr/http-factory/.gitignore 查看文件

@@ -1,2 +0,0 @@
1
-composer.lock
2
-vendor/

+ 0
- 7
vendor/psr/http-factory/.pullapprove.yml 查看文件

@@ -1,7 +0,0 @@
1
-extends: default
2
-reviewers:
3
-    -
4
-        name: contributors
5
-        required: 1
6
-        teams:
7
-            - http-factory-contributors

+ 0
- 21
vendor/psr/http-factory/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-MIT License
2
-
3
-Copyright (c) 2018 PHP-FIG
4
-
5
-Permission is hereby granted, free of charge, to any person obtaining a copy
6
-of this software and associated documentation files (the "Software"), to deal
7
-in the Software without restriction, including without limitation the rights
8
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-copies of the Software, and to permit persons to whom the Software is
10
-furnished to do so, subject to the following conditions:
11
-
12
-The above copyright notice and this permission notice shall be included in all
13
-copies or substantial portions of the Software.
14
-
15
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-SOFTWARE.

+ 0
- 10
vendor/psr/http-factory/README.md 查看文件

@@ -1,10 +0,0 @@
1
-HTTP Factories
2
-==============
3
-
4
-This repository holds all interfaces related to [PSR-17 (HTTP Message Factories)][psr-17]. 
5
-Please refer to the specification for a description.
6
-
7
-You can find implementations of the specification by looking for packages providing the 
8
-[psr/http-factory-implementation](https://packagist.org/providers/psr/http-factory-implementation) virtual package.
9
-
10
-[psr-17]: https://www.php-fig.org/psr/psr-17/

+ 0
- 35
vendor/psr/http-factory/composer.json 查看文件

@@ -1,35 +0,0 @@
1
-{
2
-    "name": "psr/http-factory",
3
-    "description": "Common interfaces for PSR-7 HTTP message factories",
4
-    "keywords": [
5
-        "psr",
6
-        "psr-7",
7
-        "psr-17",
8
-        "http",
9
-        "factory",
10
-        "message",
11
-        "request",
12
-        "response"
13
-    ],
14
-    "license": "MIT",
15
-    "authors": [
16
-        {
17
-            "name": "PHP-FIG",
18
-            "homepage": "http://www.php-fig.org/"
19
-        }
20
-    ],
21
-    "require": {
22
-        "php": ">=7.0.0",
23
-        "psr/http-message": "^1.0"
24
-    },
25
-    "autoload": {
26
-        "psr-4": {
27
-            "Psr\\Http\\Message\\": "src/"
28
-        }
29
-    },
30
-    "extra": {
31
-        "branch-alias": {
32
-            "dev-master": "1.0.x-dev"
33
-        }
34
-    }
35
-}

+ 0
- 18
vendor/psr/http-factory/src/RequestFactoryInterface.php 查看文件

@@ -1,18 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface RequestFactoryInterface
6
-{
7
-    /**
8
-     * Create a new request.
9
-     *
10
-     * @param string $method The HTTP method associated with the request.
11
-     * @param UriInterface|string $uri The URI associated with the request. If
12
-     *     the value is a string, the factory MUST create a UriInterface
13
-     *     instance based on it.
14
-     *
15
-     * @return RequestInterface
16
-     */
17
-    public function createRequest(string $method, $uri): RequestInterface;
18
-}

+ 0
- 18
vendor/psr/http-factory/src/ResponseFactoryInterface.php 查看文件

@@ -1,18 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface ResponseFactoryInterface
6
-{
7
-    /**
8
-     * Create a new response.
9
-     *
10
-     * @param int $code HTTP status code; defaults to 200
11
-     * @param string $reasonPhrase Reason phrase to associate with status code
12
-     *     in generated response; if none is provided implementations MAY use
13
-     *     the defaults as suggested in the HTTP specification.
14
-     *
15
-     * @return ResponseInterface
16
-     */
17
-    public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface;
18
-}

+ 0
- 24
vendor/psr/http-factory/src/ServerRequestFactoryInterface.php 查看文件

@@ -1,24 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface ServerRequestFactoryInterface
6
-{
7
-    /**
8
-     * Create a new server request.
9
-     *
10
-     * Note that server-params are taken precisely as given - no parsing/processing
11
-     * of the given values is performed, and, in particular, no attempt is made to
12
-     * determine the HTTP method or URI, which must be provided explicitly.
13
-     *
14
-     * @param string $method The HTTP method associated with the request.
15
-     * @param UriInterface|string $uri The URI associated with the request. If
16
-     *     the value is a string, the factory MUST create a UriInterface
17
-     *     instance based on it.
18
-     * @param array $serverParams Array of SAPI parameters with which to seed
19
-     *     the generated request instance.
20
-     *
21
-     * @return ServerRequestInterface
22
-     */
23
-    public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface;
24
-}

+ 0
- 45
vendor/psr/http-factory/src/StreamFactoryInterface.php 查看文件

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface StreamFactoryInterface
6
-{
7
-    /**
8
-     * Create a new stream from a string.
9
-     *
10
-     * The stream SHOULD be created with a temporary resource.
11
-     *
12
-     * @param string $content String content with which to populate the stream.
13
-     *
14
-     * @return StreamInterface
15
-     */
16
-    public function createStream(string $content = ''): StreamInterface;
17
-
18
-    /**
19
-     * Create a stream from an existing file.
20
-     *
21
-     * The file MUST be opened using the given mode, which may be any mode
22
-     * supported by the `fopen` function.
23
-     *
24
-     * The `$filename` MAY be any string supported by `fopen()`.
25
-     *
26
-     * @param string $filename Filename or stream URI to use as basis of stream.
27
-     * @param string $mode Mode with which to open the underlying filename/stream.
28
-     *
29
-     * @return StreamInterface
30
-     * @throws \RuntimeException If the file cannot be opened.
31
-     * @throws \InvalidArgumentException If the mode is invalid.
32
-     */
33
-    public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface;
34
-
35
-    /**
36
-     * Create a new stream from an existing resource.
37
-     *
38
-     * The stream MUST be readable and may be writable.
39
-     *
40
-     * @param resource $resource PHP resource to use as basis of stream.
41
-     *
42
-     * @return StreamInterface
43
-     */
44
-    public function createStreamFromResource($resource): StreamInterface;
45
-}

+ 0
- 34
vendor/psr/http-factory/src/UploadedFileFactoryInterface.php 查看文件

@@ -1,34 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface UploadedFileFactoryInterface
6
-{
7
-    /**
8
-     * Create a new uploaded file.
9
-     *
10
-     * If a size is not provided it will be determined by checking the size of
11
-     * the file.
12
-     *
13
-     * @see http://php.net/manual/features.file-upload.post-method.php
14
-     * @see http://php.net/manual/features.file-upload.errors.php
15
-     *
16
-     * @param StreamInterface $stream Underlying stream representing the
17
-     *     uploaded file content.
18
-     * @param int $size in bytes
19
-     * @param int $error PHP file upload error
20
-     * @param string $clientFilename Filename as provided by the client, if any.
21
-     * @param string $clientMediaType Media type as provided by the client, if any.
22
-     *
23
-     * @return UploadedFileInterface
24
-     *
25
-     * @throws \InvalidArgumentException If the file resource is not readable.
26
-     */
27
-    public function createUploadedFile(
28
-        StreamInterface $stream,
29
-        int $size = null,
30
-        int $error = \UPLOAD_ERR_OK,
31
-        string $clientFilename = null,
32
-        string $clientMediaType = null
33
-    ): UploadedFileInterface;
34
-}

+ 0
- 17
vendor/psr/http-factory/src/UriFactoryInterface.php 查看文件

@@ -1,17 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-interface UriFactoryInterface
6
-{
7
-    /**
8
-     * Create a new URI.
9
-     *
10
-     * @param string $uri
11
-     *
12
-     * @return UriInterface
13
-     *
14
-     * @throws \InvalidArgumentException If the given URI cannot be parsed.
15
-     */
16
-    public function createUri(string $uri = ''): UriInterface;
17
-}

+ 0
- 36
vendor/psr/http-message/CHANGELOG.md 查看文件

@@ -1,36 +0,0 @@
1
-# Changelog
2
-
3
-All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
-
5
-## 1.0.1 - 2016-08-06
6
-
7
-### Added
8
-
9
-- Nothing.
10
-
11
-### Deprecated
12
-
13
-- Nothing.
14
-
15
-### Removed
16
-
17
-- Nothing.
18
-
19
-### Fixed
20
-
21
-- Updated all `@return self` annotation references in interfaces to use
22
-  `@return static`, which more closelly follows the semantics of the
23
-  specification.
24
-- Updated the `MessageInterface::getHeaders()` return annotation to use the
25
-  value `string[][]`, indicating the format is a nested array of strings.
26
-- Updated the `@link` annotation for `RequestInterface::withRequestTarget()`
27
-  to point to the correct section of RFC 7230.
28
-- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation
29
-  to add the parameter name (`$uploadedFiles`).
30
-- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()`
31
-  method to correctly reference the method parameter (it was referencing an
32
-  incorrect parameter name previously).
33
-
34
-## 1.0.0 - 2016-05-18
35
-
36
-Initial stable release; reflects accepted PSR-7 specification.

+ 0
- 19
vendor/psr/http-message/LICENSE 查看文件

@@ -1,19 +0,0 @@
1
-Copyright (c) 2014 PHP Framework Interoperability Group
2
-
3
-Permission is hereby granted, free of charge, to any person obtaining a copy 
4
-of this software and associated documentation files (the "Software"), to deal
5
-in the Software without restriction, including without limitation the rights 
6
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
7
-copies of the Software, and to permit persons to whom the Software is 
8
-furnished to do so, subject to the following conditions:
9
-
10
-The above copyright notice and this permission notice shall be included in 
11
-all copies or substantial portions of the Software.
12
-
13
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
-THE SOFTWARE.

+ 0
- 13
vendor/psr/http-message/README.md 查看文件

@@ -1,13 +0,0 @@
1
-PSR Http Message
2
-================
3
-
4
-This repository holds all interfaces/classes/traits related to
5
-[PSR-7](http://www.php-fig.org/psr/psr-7/).
6
-
7
-Note that this is not a HTTP message implementation of its own. It is merely an
8
-interface that describes a HTTP message. See the specification for more details.
9
-
10
-Usage
11
------
12
-
13
-We'll certainly need some stuff in here.

+ 0
- 26
vendor/psr/http-message/composer.json 查看文件

@@ -1,26 +0,0 @@
1
-{
2
-    "name": "psr/http-message",
3
-    "description": "Common interface for HTTP messages",
4
-    "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"],
5
-    "homepage": "https://github.com/php-fig/http-message",
6
-    "license": "MIT",
7
-    "authors": [
8
-        {
9
-            "name": "PHP-FIG",
10
-            "homepage": "http://www.php-fig.org/"
11
-        }
12
-    ],
13
-    "require": {
14
-        "php": ">=5.3.0"
15
-    },
16
-    "autoload": {
17
-        "psr-4": {
18
-            "Psr\\Http\\Message\\": "src/"
19
-        }
20
-    },
21
-    "extra": {
22
-        "branch-alias": {
23
-            "dev-master": "1.0.x-dev"
24
-        }
25
-    }
26
-}

+ 0
- 187
vendor/psr/http-message/src/MessageInterface.php 查看文件

@@ -1,187 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * HTTP messages consist of requests from a client to a server and responses
7
- * from a server to a client. This interface defines the methods common to
8
- * each.
9
- *
10
- * Messages are considered immutable; all methods that might change state MUST
11
- * be implemented such that they retain the internal state of the current
12
- * message and return an instance that contains the changed state.
13
- *
14
- * @link http://www.ietf.org/rfc/rfc7230.txt
15
- * @link http://www.ietf.org/rfc/rfc7231.txt
16
- */
17
-interface MessageInterface
18
-{
19
-    /**
20
-     * Retrieves the HTTP protocol version as a string.
21
-     *
22
-     * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
23
-     *
24
-     * @return string HTTP protocol version.
25
-     */
26
-    public function getProtocolVersion();
27
-
28
-    /**
29
-     * Return an instance with the specified HTTP protocol version.
30
-     *
31
-     * The version string MUST contain only the HTTP version number (e.g.,
32
-     * "1.1", "1.0").
33
-     *
34
-     * This method MUST be implemented in such a way as to retain the
35
-     * immutability of the message, and MUST return an instance that has the
36
-     * new protocol version.
37
-     *
38
-     * @param string $version HTTP protocol version
39
-     * @return static
40
-     */
41
-    public function withProtocolVersion($version);
42
-
43
-    /**
44
-     * Retrieves all message header values.
45
-     *
46
-     * The keys represent the header name as it will be sent over the wire, and
47
-     * each value is an array of strings associated with the header.
48
-     *
49
-     *     // Represent the headers as a string
50
-     *     foreach ($message->getHeaders() as $name => $values) {
51
-     *         echo $name . ": " . implode(", ", $values);
52
-     *     }
53
-     *
54
-     *     // Emit headers iteratively:
55
-     *     foreach ($message->getHeaders() as $name => $values) {
56
-     *         foreach ($values as $value) {
57
-     *             header(sprintf('%s: %s', $name, $value), false);
58
-     *         }
59
-     *     }
60
-     *
61
-     * While header names are not case-sensitive, getHeaders() will preserve the
62
-     * exact case in which headers were originally specified.
63
-     *
64
-     * @return string[][] Returns an associative array of the message's headers. Each
65
-     *     key MUST be a header name, and each value MUST be an array of strings
66
-     *     for that header.
67
-     */
68
-    public function getHeaders();
69
-
70
-    /**
71
-     * Checks if a header exists by the given case-insensitive name.
72
-     *
73
-     * @param string $name Case-insensitive header field name.
74
-     * @return bool Returns true if any header names match the given header
75
-     *     name using a case-insensitive string comparison. Returns false if
76
-     *     no matching header name is found in the message.
77
-     */
78
-    public function hasHeader($name);
79
-
80
-    /**
81
-     * Retrieves a message header value by the given case-insensitive name.
82
-     *
83
-     * This method returns an array of all the header values of the given
84
-     * case-insensitive header name.
85
-     *
86
-     * If the header does not appear in the message, this method MUST return an
87
-     * empty array.
88
-     *
89
-     * @param string $name Case-insensitive header field name.
90
-     * @return string[] An array of string values as provided for the given
91
-     *    header. If the header does not appear in the message, this method MUST
92
-     *    return an empty array.
93
-     */
94
-    public function getHeader($name);
95
-
96
-    /**
97
-     * Retrieves a comma-separated string of the values for a single header.
98
-     *
99
-     * This method returns all of the header values of the given
100
-     * case-insensitive header name as a string concatenated together using
101
-     * a comma.
102
-     *
103
-     * NOTE: Not all header values may be appropriately represented using
104
-     * comma concatenation. For such headers, use getHeader() instead
105
-     * and supply your own delimiter when concatenating.
106
-     *
107
-     * If the header does not appear in the message, this method MUST return
108
-     * an empty string.
109
-     *
110
-     * @param string $name Case-insensitive header field name.
111
-     * @return string A string of values as provided for the given header
112
-     *    concatenated together using a comma. If the header does not appear in
113
-     *    the message, this method MUST return an empty string.
114
-     */
115
-    public function getHeaderLine($name);
116
-
117
-    /**
118
-     * Return an instance with the provided value replacing the specified header.
119
-     *
120
-     * While header names are case-insensitive, the casing of the header will
121
-     * be preserved by this function, and returned from getHeaders().
122
-     *
123
-     * This method MUST be implemented in such a way as to retain the
124
-     * immutability of the message, and MUST return an instance that has the
125
-     * new and/or updated header and value.
126
-     *
127
-     * @param string $name Case-insensitive header field name.
128
-     * @param string|string[] $value Header value(s).
129
-     * @return static
130
-     * @throws \InvalidArgumentException for invalid header names or values.
131
-     */
132
-    public function withHeader($name, $value);
133
-
134
-    /**
135
-     * Return an instance with the specified header appended with the given value.
136
-     *
137
-     * Existing values for the specified header will be maintained. The new
138
-     * value(s) will be appended to the existing list. If the header did not
139
-     * exist previously, it will be added.
140
-     *
141
-     * This method MUST be implemented in such a way as to retain the
142
-     * immutability of the message, and MUST return an instance that has the
143
-     * new header and/or value.
144
-     *
145
-     * @param string $name Case-insensitive header field name to add.
146
-     * @param string|string[] $value Header value(s).
147
-     * @return static
148
-     * @throws \InvalidArgumentException for invalid header names or values.
149
-     */
150
-    public function withAddedHeader($name, $value);
151
-
152
-    /**
153
-     * Return an instance without the specified header.
154
-     *
155
-     * Header resolution MUST be done without case-sensitivity.
156
-     *
157
-     * This method MUST be implemented in such a way as to retain the
158
-     * immutability of the message, and MUST return an instance that removes
159
-     * the named header.
160
-     *
161
-     * @param string $name Case-insensitive header field name to remove.
162
-     * @return static
163
-     */
164
-    public function withoutHeader($name);
165
-
166
-    /**
167
-     * Gets the body of the message.
168
-     *
169
-     * @return StreamInterface Returns the body as a stream.
170
-     */
171
-    public function getBody();
172
-
173
-    /**
174
-     * Return an instance with the specified message body.
175
-     *
176
-     * The body MUST be a StreamInterface object.
177
-     *
178
-     * This method MUST be implemented in such a way as to retain the
179
-     * immutability of the message, and MUST return a new instance that has the
180
-     * new body stream.
181
-     *
182
-     * @param StreamInterface $body Body.
183
-     * @return static
184
-     * @throws \InvalidArgumentException When the body is not valid.
185
-     */
186
-    public function withBody(StreamInterface $body);
187
-}

+ 0
- 129
vendor/psr/http-message/src/RequestInterface.php 查看文件

@@ -1,129 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * Representation of an outgoing, client-side request.
7
- *
8
- * Per the HTTP specification, this interface includes properties for
9
- * each of the following:
10
- *
11
- * - Protocol version
12
- * - HTTP method
13
- * - URI
14
- * - Headers
15
- * - Message body
16
- *
17
- * During construction, implementations MUST attempt to set the Host header from
18
- * a provided URI if no Host header is provided.
19
- *
20
- * Requests are considered immutable; all methods that might change state MUST
21
- * be implemented such that they retain the internal state of the current
22
- * message and return an instance that contains the changed state.
23
- */
24
-interface RequestInterface extends MessageInterface
25
-{
26
-    /**
27
-     * Retrieves the message's request target.
28
-     *
29
-     * Retrieves the message's request-target either as it will appear (for
30
-     * clients), as it appeared at request (for servers), or as it was
31
-     * specified for the instance (see withRequestTarget()).
32
-     *
33
-     * In most cases, this will be the origin-form of the composed URI,
34
-     * unless a value was provided to the concrete implementation (see
35
-     * withRequestTarget() below).
36
-     *
37
-     * If no URI is available, and no request-target has been specifically
38
-     * provided, this method MUST return the string "/".
39
-     *
40
-     * @return string
41
-     */
42
-    public function getRequestTarget();
43
-
44
-    /**
45
-     * Return an instance with the specific request-target.
46
-     *
47
-     * If the request needs a non-origin-form request-target — e.g., for
48
-     * specifying an absolute-form, authority-form, or asterisk-form —
49
-     * this method may be used to create an instance with the specified
50
-     * request-target, verbatim.
51
-     *
52
-     * This method MUST be implemented in such a way as to retain the
53
-     * immutability of the message, and MUST return an instance that has the
54
-     * changed request target.
55
-     *
56
-     * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
57
-     *     request-target forms allowed in request messages)
58
-     * @param mixed $requestTarget
59
-     * @return static
60
-     */
61
-    public function withRequestTarget($requestTarget);
62
-
63
-    /**
64
-     * Retrieves the HTTP method of the request.
65
-     *
66
-     * @return string Returns the request method.
67
-     */
68
-    public function getMethod();
69
-
70
-    /**
71
-     * Return an instance with the provided HTTP method.
72
-     *
73
-     * While HTTP method names are typically all uppercase characters, HTTP
74
-     * method names are case-sensitive and thus implementations SHOULD NOT
75
-     * modify the given string.
76
-     *
77
-     * This method MUST be implemented in such a way as to retain the
78
-     * immutability of the message, and MUST return an instance that has the
79
-     * changed request method.
80
-     *
81
-     * @param string $method Case-sensitive method.
82
-     * @return static
83
-     * @throws \InvalidArgumentException for invalid HTTP methods.
84
-     */
85
-    public function withMethod($method);
86
-
87
-    /**
88
-     * Retrieves the URI instance.
89
-     *
90
-     * This method MUST return a UriInterface instance.
91
-     *
92
-     * @link http://tools.ietf.org/html/rfc3986#section-4.3
93
-     * @return UriInterface Returns a UriInterface instance
94
-     *     representing the URI of the request.
95
-     */
96
-    public function getUri();
97
-
98
-    /**
99
-     * Returns an instance with the provided URI.
100
-     *
101
-     * This method MUST update the Host header of the returned request by
102
-     * default if the URI contains a host component. If the URI does not
103
-     * contain a host component, any pre-existing Host header MUST be carried
104
-     * over to the returned request.
105
-     *
106
-     * You can opt-in to preserving the original state of the Host header by
107
-     * setting `$preserveHost` to `true`. When `$preserveHost` is set to
108
-     * `true`, this method interacts with the Host header in the following ways:
109
-     *
110
-     * - If the Host header is missing or empty, and the new URI contains
111
-     *   a host component, this method MUST update the Host header in the returned
112
-     *   request.
113
-     * - If the Host header is missing or empty, and the new URI does not contain a
114
-     *   host component, this method MUST NOT update the Host header in the returned
115
-     *   request.
116
-     * - If a Host header is present and non-empty, this method MUST NOT update
117
-     *   the Host header in the returned request.
118
-     *
119
-     * This method MUST be implemented in such a way as to retain the
120
-     * immutability of the message, and MUST return an instance that has the
121
-     * new UriInterface instance.
122
-     *
123
-     * @link http://tools.ietf.org/html/rfc3986#section-4.3
124
-     * @param UriInterface $uri New request URI to use.
125
-     * @param bool $preserveHost Preserve the original state of the Host header.
126
-     * @return static
127
-     */
128
-    public function withUri(UriInterface $uri, $preserveHost = false);
129
-}

+ 0
- 68
vendor/psr/http-message/src/ResponseInterface.php 查看文件

@@ -1,68 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * Representation of an outgoing, server-side response.
7
- *
8
- * Per the HTTP specification, this interface includes properties for
9
- * each of the following:
10
- *
11
- * - Protocol version
12
- * - Status code and reason phrase
13
- * - Headers
14
- * - Message body
15
- *
16
- * Responses are considered immutable; all methods that might change state MUST
17
- * be implemented such that they retain the internal state of the current
18
- * message and return an instance that contains the changed state.
19
- */
20
-interface ResponseInterface extends MessageInterface
21
-{
22
-    /**
23
-     * Gets the response status code.
24
-     *
25
-     * The status code is a 3-digit integer result code of the server's attempt
26
-     * to understand and satisfy the request.
27
-     *
28
-     * @return int Status code.
29
-     */
30
-    public function getStatusCode();
31
-
32
-    /**
33
-     * Return an instance with the specified status code and, optionally, reason phrase.
34
-     *
35
-     * If no reason phrase is specified, implementations MAY choose to default
36
-     * to the RFC 7231 or IANA recommended reason phrase for the response's
37
-     * status code.
38
-     *
39
-     * This method MUST be implemented in such a way as to retain the
40
-     * immutability of the message, and MUST return an instance that has the
41
-     * updated status and reason phrase.
42
-     *
43
-     * @link http://tools.ietf.org/html/rfc7231#section-6
44
-     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
45
-     * @param int $code The 3-digit integer result code to set.
46
-     * @param string $reasonPhrase The reason phrase to use with the
47
-     *     provided status code; if none is provided, implementations MAY
48
-     *     use the defaults as suggested in the HTTP specification.
49
-     * @return static
50
-     * @throws \InvalidArgumentException For invalid status code arguments.
51
-     */
52
-    public function withStatus($code, $reasonPhrase = '');
53
-
54
-    /**
55
-     * Gets the response reason phrase associated with the status code.
56
-     *
57
-     * Because a reason phrase is not a required element in a response
58
-     * status line, the reason phrase value MAY be null. Implementations MAY
59
-     * choose to return the default RFC 7231 recommended reason phrase (or those
60
-     * listed in the IANA HTTP Status Code Registry) for the response's
61
-     * status code.
62
-     *
63
-     * @link http://tools.ietf.org/html/rfc7231#section-6
64
-     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
65
-     * @return string Reason phrase; must return an empty string if none present.
66
-     */
67
-    public function getReasonPhrase();
68
-}

+ 0
- 261
vendor/psr/http-message/src/ServerRequestInterface.php 查看文件

@@ -1,261 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * Representation of an incoming, server-side HTTP request.
7
- *
8
- * Per the HTTP specification, this interface includes properties for
9
- * each of the following:
10
- *
11
- * - Protocol version
12
- * - HTTP method
13
- * - URI
14
- * - Headers
15
- * - Message body
16
- *
17
- * Additionally, it encapsulates all data as it has arrived to the
18
- * application from the CGI and/or PHP environment, including:
19
- *
20
- * - The values represented in $_SERVER.
21
- * - Any cookies provided (generally via $_COOKIE)
22
- * - Query string arguments (generally via $_GET, or as parsed via parse_str())
23
- * - Upload files, if any (as represented by $_FILES)
24
- * - Deserialized body parameters (generally from $_POST)
25
- *
26
- * $_SERVER values MUST be treated as immutable, as they represent application
27
- * state at the time of request; as such, no methods are provided to allow
28
- * modification of those values. The other values provide such methods, as they
29
- * can be restored from $_SERVER or the request body, and may need treatment
30
- * during the application (e.g., body parameters may be deserialized based on
31
- * content type).
32
- *
33
- * Additionally, this interface recognizes the utility of introspecting a
34
- * request to derive and match additional parameters (e.g., via URI path
35
- * matching, decrypting cookie values, deserializing non-form-encoded body
36
- * content, matching authorization headers to users, etc). These parameters
37
- * are stored in an "attributes" property.
38
- *
39
- * Requests are considered immutable; all methods that might change state MUST
40
- * be implemented such that they retain the internal state of the current
41
- * message and return an instance that contains the changed state.
42
- */
43
-interface ServerRequestInterface extends RequestInterface
44
-{
45
-    /**
46
-     * Retrieve server parameters.
47
-     *
48
-     * Retrieves data related to the incoming request environment,
49
-     * typically derived from PHP's $_SERVER superglobal. The data IS NOT
50
-     * REQUIRED to originate from $_SERVER.
51
-     *
52
-     * @return array
53
-     */
54
-    public function getServerParams();
55
-
56
-    /**
57
-     * Retrieve cookies.
58
-     *
59
-     * Retrieves cookies sent by the client to the server.
60
-     *
61
-     * The data MUST be compatible with the structure of the $_COOKIE
62
-     * superglobal.
63
-     *
64
-     * @return array
65
-     */
66
-    public function getCookieParams();
67
-
68
-    /**
69
-     * Return an instance with the specified cookies.
70
-     *
71
-     * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
72
-     * be compatible with the structure of $_COOKIE. Typically, this data will
73
-     * be injected at instantiation.
74
-     *
75
-     * This method MUST NOT update the related Cookie header of the request
76
-     * instance, nor related values in the server params.
77
-     *
78
-     * This method MUST be implemented in such a way as to retain the
79
-     * immutability of the message, and MUST return an instance that has the
80
-     * updated cookie values.
81
-     *
82
-     * @param array $cookies Array of key/value pairs representing cookies.
83
-     * @return static
84
-     */
85
-    public function withCookieParams(array $cookies);
86
-
87
-    /**
88
-     * Retrieve query string arguments.
89
-     *
90
-     * Retrieves the deserialized query string arguments, if any.
91
-     *
92
-     * Note: the query params might not be in sync with the URI or server
93
-     * params. If you need to ensure you are only getting the original
94
-     * values, you may need to parse the query string from `getUri()->getQuery()`
95
-     * or from the `QUERY_STRING` server param.
96
-     *
97
-     * @return array
98
-     */
99
-    public function getQueryParams();
100
-
101
-    /**
102
-     * Return an instance with the specified query string arguments.
103
-     *
104
-     * These values SHOULD remain immutable over the course of the incoming
105
-     * request. They MAY be injected during instantiation, such as from PHP's
106
-     * $_GET superglobal, or MAY be derived from some other value such as the
107
-     * URI. In cases where the arguments are parsed from the URI, the data
108
-     * MUST be compatible with what PHP's parse_str() would return for
109
-     * purposes of how duplicate query parameters are handled, and how nested
110
-     * sets are handled.
111
-     *
112
-     * Setting query string arguments MUST NOT change the URI stored by the
113
-     * request, nor the values in the server params.
114
-     *
115
-     * This method MUST be implemented in such a way as to retain the
116
-     * immutability of the message, and MUST return an instance that has the
117
-     * updated query string arguments.
118
-     *
119
-     * @param array $query Array of query string arguments, typically from
120
-     *     $_GET.
121
-     * @return static
122
-     */
123
-    public function withQueryParams(array $query);
124
-
125
-    /**
126
-     * Retrieve normalized file upload data.
127
-     *
128
-     * This method returns upload metadata in a normalized tree, with each leaf
129
-     * an instance of Psr\Http\Message\UploadedFileInterface.
130
-     *
131
-     * These values MAY be prepared from $_FILES or the message body during
132
-     * instantiation, or MAY be injected via withUploadedFiles().
133
-     *
134
-     * @return array An array tree of UploadedFileInterface instances; an empty
135
-     *     array MUST be returned if no data is present.
136
-     */
137
-    public function getUploadedFiles();
138
-
139
-    /**
140
-     * Create a new instance with the specified uploaded files.
141
-     *
142
-     * This method MUST be implemented in such a way as to retain the
143
-     * immutability of the message, and MUST return an instance that has the
144
-     * updated body parameters.
145
-     *
146
-     * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
147
-     * @return static
148
-     * @throws \InvalidArgumentException if an invalid structure is provided.
149
-     */
150
-    public function withUploadedFiles(array $uploadedFiles);
151
-
152
-    /**
153
-     * Retrieve any parameters provided in the request body.
154
-     *
155
-     * If the request Content-Type is either application/x-www-form-urlencoded
156
-     * or multipart/form-data, and the request method is POST, this method MUST
157
-     * return the contents of $_POST.
158
-     *
159
-     * Otherwise, this method may return any results of deserializing
160
-     * the request body content; as parsing returns structured content, the
161
-     * potential types MUST be arrays or objects only. A null value indicates
162
-     * the absence of body content.
163
-     *
164
-     * @return null|array|object The deserialized body parameters, if any.
165
-     *     These will typically be an array or object.
166
-     */
167
-    public function getParsedBody();
168
-
169
-    /**
170
-     * Return an instance with the specified body parameters.
171
-     *
172
-     * These MAY be injected during instantiation.
173
-     *
174
-     * If the request Content-Type is either application/x-www-form-urlencoded
175
-     * or multipart/form-data, and the request method is POST, use this method
176
-     * ONLY to inject the contents of $_POST.
177
-     *
178
-     * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
179
-     * deserializing the request body content. Deserialization/parsing returns
180
-     * structured data, and, as such, this method ONLY accepts arrays or objects,
181
-     * or a null value if nothing was available to parse.
182
-     *
183
-     * As an example, if content negotiation determines that the request data
184
-     * is a JSON payload, this method could be used to create a request
185
-     * instance with the deserialized parameters.
186
-     *
187
-     * This method MUST be implemented in such a way as to retain the
188
-     * immutability of the message, and MUST return an instance that has the
189
-     * updated body parameters.
190
-     *
191
-     * @param null|array|object $data The deserialized body data. This will
192
-     *     typically be in an array or object.
193
-     * @return static
194
-     * @throws \InvalidArgumentException if an unsupported argument type is
195
-     *     provided.
196
-     */
197
-    public function withParsedBody($data);
198
-
199
-    /**
200
-     * Retrieve attributes derived from the request.
201
-     *
202
-     * The request "attributes" may be used to allow injection of any
203
-     * parameters derived from the request: e.g., the results of path
204
-     * match operations; the results of decrypting cookies; the results of
205
-     * deserializing non-form-encoded message bodies; etc. Attributes
206
-     * will be application and request specific, and CAN be mutable.
207
-     *
208
-     * @return array Attributes derived from the request.
209
-     */
210
-    public function getAttributes();
211
-
212
-    /**
213
-     * Retrieve a single derived request attribute.
214
-     *
215
-     * Retrieves a single derived request attribute as described in
216
-     * getAttributes(). If the attribute has not been previously set, returns
217
-     * the default value as provided.
218
-     *
219
-     * This method obviates the need for a hasAttribute() method, as it allows
220
-     * specifying a default value to return if the attribute is not found.
221
-     *
222
-     * @see getAttributes()
223
-     * @param string $name The attribute name.
224
-     * @param mixed $default Default value to return if the attribute does not exist.
225
-     * @return mixed
226
-     */
227
-    public function getAttribute($name, $default = null);
228
-
229
-    /**
230
-     * Return an instance with the specified derived request attribute.
231
-     *
232
-     * This method allows setting a single derived request attribute as
233
-     * described in getAttributes().
234
-     *
235
-     * This method MUST be implemented in such a way as to retain the
236
-     * immutability of the message, and MUST return an instance that has the
237
-     * updated attribute.
238
-     *
239
-     * @see getAttributes()
240
-     * @param string $name The attribute name.
241
-     * @param mixed $value The value of the attribute.
242
-     * @return static
243
-     */
244
-    public function withAttribute($name, $value);
245
-
246
-    /**
247
-     * Return an instance that removes the specified derived request attribute.
248
-     *
249
-     * This method allows removing a single derived request attribute as
250
-     * described in getAttributes().
251
-     *
252
-     * This method MUST be implemented in such a way as to retain the
253
-     * immutability of the message, and MUST return an instance that removes
254
-     * the attribute.
255
-     *
256
-     * @see getAttributes()
257
-     * @param string $name The attribute name.
258
-     * @return static
259
-     */
260
-    public function withoutAttribute($name);
261
-}

+ 0
- 158
vendor/psr/http-message/src/StreamInterface.php 查看文件

@@ -1,158 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * Describes a data stream.
7
- *
8
- * Typically, an instance will wrap a PHP stream; this interface provides
9
- * a wrapper around the most common operations, including serialization of
10
- * the entire stream to a string.
11
- */
12
-interface StreamInterface
13
-{
14
-    /**
15
-     * Reads all data from the stream into a string, from the beginning to end.
16
-     *
17
-     * This method MUST attempt to seek to the beginning of the stream before
18
-     * reading data and read the stream until the end is reached.
19
-     *
20
-     * Warning: This could attempt to load a large amount of data into memory.
21
-     *
22
-     * This method MUST NOT raise an exception in order to conform with PHP's
23
-     * string casting operations.
24
-     *
25
-     * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
26
-     * @return string
27
-     */
28
-    public function __toString();
29
-
30
-    /**
31
-     * Closes the stream and any underlying resources.
32
-     *
33
-     * @return void
34
-     */
35
-    public function close();
36
-
37
-    /**
38
-     * Separates any underlying resources from the stream.
39
-     *
40
-     * After the stream has been detached, the stream is in an unusable state.
41
-     *
42
-     * @return resource|null Underlying PHP stream, if any
43
-     */
44
-    public function detach();
45
-
46
-    /**
47
-     * Get the size of the stream if known.
48
-     *
49
-     * @return int|null Returns the size in bytes if known, or null if unknown.
50
-     */
51
-    public function getSize();
52
-
53
-    /**
54
-     * Returns the current position of the file read/write pointer
55
-     *
56
-     * @return int Position of the file pointer
57
-     * @throws \RuntimeException on error.
58
-     */
59
-    public function tell();
60
-
61
-    /**
62
-     * Returns true if the stream is at the end of the stream.
63
-     *
64
-     * @return bool
65
-     */
66
-    public function eof();
67
-
68
-    /**
69
-     * Returns whether or not the stream is seekable.
70
-     *
71
-     * @return bool
72
-     */
73
-    public function isSeekable();
74
-
75
-    /**
76
-     * Seek to a position in the stream.
77
-     *
78
-     * @link http://www.php.net/manual/en/function.fseek.php
79
-     * @param int $offset Stream offset
80
-     * @param int $whence Specifies how the cursor position will be calculated
81
-     *     based on the seek offset. Valid values are identical to the built-in
82
-     *     PHP $whence values for `fseek()`.  SEEK_SET: Set position equal to
83
-     *     offset bytes SEEK_CUR: Set position to current location plus offset
84
-     *     SEEK_END: Set position to end-of-stream plus offset.
85
-     * @throws \RuntimeException on failure.
86
-     */
87
-    public function seek($offset, $whence = SEEK_SET);
88
-
89
-    /**
90
-     * Seek to the beginning of the stream.
91
-     *
92
-     * If the stream is not seekable, this method will raise an exception;
93
-     * otherwise, it will perform a seek(0).
94
-     *
95
-     * @see seek()
96
-     * @link http://www.php.net/manual/en/function.fseek.php
97
-     * @throws \RuntimeException on failure.
98
-     */
99
-    public function rewind();
100
-
101
-    /**
102
-     * Returns whether or not the stream is writable.
103
-     *
104
-     * @return bool
105
-     */
106
-    public function isWritable();
107
-
108
-    /**
109
-     * Write data to the stream.
110
-     *
111
-     * @param string $string The string that is to be written.
112
-     * @return int Returns the number of bytes written to the stream.
113
-     * @throws \RuntimeException on failure.
114
-     */
115
-    public function write($string);
116
-
117
-    /**
118
-     * Returns whether or not the stream is readable.
119
-     *
120
-     * @return bool
121
-     */
122
-    public function isReadable();
123
-
124
-    /**
125
-     * Read data from the stream.
126
-     *
127
-     * @param int $length Read up to $length bytes from the object and return
128
-     *     them. Fewer than $length bytes may be returned if underlying stream
129
-     *     call returns fewer bytes.
130
-     * @return string Returns the data read from the stream, or an empty string
131
-     *     if no bytes are available.
132
-     * @throws \RuntimeException if an error occurs.
133
-     */
134
-    public function read($length);
135
-
136
-    /**
137
-     * Returns the remaining contents in a string
138
-     *
139
-     * @return string
140
-     * @throws \RuntimeException if unable to read or an error occurs while
141
-     *     reading.
142
-     */
143
-    public function getContents();
144
-
145
-    /**
146
-     * Get stream metadata as an associative array or retrieve a specific key.
147
-     *
148
-     * The keys returned are identical to the keys returned from PHP's
149
-     * stream_get_meta_data() function.
150
-     *
151
-     * @link http://php.net/manual/en/function.stream-get-meta-data.php
152
-     * @param string $key Specific metadata to retrieve.
153
-     * @return array|mixed|null Returns an associative array if no key is
154
-     *     provided. Returns a specific key value if a key is provided and the
155
-     *     value is found, or null if the key is not found.
156
-     */
157
-    public function getMetadata($key = null);
158
-}

+ 0
- 123
vendor/psr/http-message/src/UploadedFileInterface.php 查看文件

@@ -1,123 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Message;
4
-
5
-/**
6
- * Value object representing a file uploaded through an HTTP request.
7
- *
8
- * Instances of this interface are considered immutable; all methods that
9
- * might change state MUST be implemented such that they retain the internal
10
- * state of the current instance and return an instance that contains the
11
- * changed state.
12
- */
13
-interface UploadedFileInterface
14
-{
15
-    /**
16
-     * Retrieve a stream representing the uploaded file.
17
-     *
18
-     * This method MUST return a StreamInterface instance, representing the
19
-     * uploaded file. The purpose of this method is to allow utilizing native PHP
20
-     * stream functionality to manipulate the file upload, such as
21
-     * stream_copy_to_stream() (though the result will need to be decorated in a
22
-     * native PHP stream wrapper to work with such functions).
23
-     *
24
-     * If the moveTo() method has been called previously, this method MUST raise
25
-     * an exception.
26
-     *
27
-     * @return StreamInterface Stream representation of the uploaded file.
28
-     * @throws \RuntimeException in cases when no stream is available or can be
29
-     *     created.
30
-     */
31
-    public function getStream();
32
-
33
-    /**
34
-     * Move the uploaded file to a new location.
35
-     *
36
-     * Use this method as an alternative to move_uploaded_file(). This method is
37
-     * guaranteed to work in both SAPI and non-SAPI environments.
38
-     * Implementations must determine which environment they are in, and use the
39
-     * appropriate method (move_uploaded_file(), rename(), or a stream
40
-     * operation) to perform the operation.
41
-     *
42
-     * $targetPath may be an absolute path, or a relative path. If it is a
43
-     * relative path, resolution should be the same as used by PHP's rename()
44
-     * function.
45
-     *
46
-     * The original file or stream MUST be removed on completion.
47
-     *
48
-     * If this method is called more than once, any subsequent calls MUST raise
49
-     * an exception.
50
-     *
51
-     * When used in an SAPI environment where $_FILES is populated, when writing
52
-     * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
53
-     * used to ensure permissions and upload status are verified correctly.
54
-     *
55
-     * If you wish to move to a stream, use getStream(), as SAPI operations
56
-     * cannot guarantee writing to stream destinations.
57
-     *
58
-     * @see http://php.net/is_uploaded_file
59
-     * @see http://php.net/move_uploaded_file
60
-     * @param string $targetPath Path to which to move the uploaded file.
61
-     * @throws \InvalidArgumentException if the $targetPath specified is invalid.
62
-     * @throws \RuntimeException on any error during the move operation, or on
63
-     *     the second or subsequent call to the method.
64
-     */
65
-    public function moveTo($targetPath);
66
-    
67
-    /**
68
-     * Retrieve the file size.
69
-     *
70
-     * Implementations SHOULD return the value stored in the "size" key of
71
-     * the file in the $_FILES array if available, as PHP calculates this based
72
-     * on the actual size transmitted.
73
-     *
74
-     * @return int|null The file size in bytes or null if unknown.
75
-     */
76
-    public function getSize();
77
-    
78
-    /**
79
-     * Retrieve the error associated with the uploaded file.
80
-     *
81
-     * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
82
-     *
83
-     * If the file was uploaded successfully, this method MUST return
84
-     * UPLOAD_ERR_OK.
85
-     *
86
-     * Implementations SHOULD return the value stored in the "error" key of
87
-     * the file in the $_FILES array.
88
-     *
89
-     * @see http://php.net/manual/en/features.file-upload.errors.php
90
-     * @return int One of PHP's UPLOAD_ERR_XXX constants.
91
-     */
92
-    public function getError();
93
-    
94
-    /**
95
-     * Retrieve the filename sent by the client.
96
-     *
97
-     * Do not trust the value returned by this method. A client could send
98
-     * a malicious filename with the intention to corrupt or hack your
99
-     * application.
100
-     *
101
-     * Implementations SHOULD return the value stored in the "name" key of
102
-     * the file in the $_FILES array.
103
-     *
104
-     * @return string|null The filename sent by the client or null if none
105
-     *     was provided.
106
-     */
107
-    public function getClientFilename();
108
-    
109
-    /**
110
-     * Retrieve the media type sent by the client.
111
-     *
112
-     * Do not trust the value returned by this method. A client could send
113
-     * a malicious media type with the intention to corrupt or hack your
114
-     * application.
115
-     *
116
-     * Implementations SHOULD return the value stored in the "type" key of
117
-     * the file in the $_FILES array.
118
-     *
119
-     * @return string|null The media type sent by the client or null if none
120
-     *     was provided.
121
-     */
122
-    public function getClientMediaType();
123
-}

+ 0
- 323
vendor/psr/http-message/src/UriInterface.php 查看文件

@@ -1,323 +0,0 @@
1
-<?php
2
-namespace Psr\Http\Message;
3
-
4
-/**
5
- * Value object representing a URI.
6
- *
7
- * This interface is meant to represent URIs according to RFC 3986 and to
8
- * provide methods for most common operations. Additional functionality for
9
- * working with URIs can be provided on top of the interface or externally.
10
- * Its primary use is for HTTP requests, but may also be used in other
11
- * contexts.
12
- *
13
- * Instances of this interface are considered immutable; all methods that
14
- * might change state MUST be implemented such that they retain the internal
15
- * state of the current instance and return an instance that contains the
16
- * changed state.
17
- *
18
- * Typically the Host header will be also be present in the request message.
19
- * For server-side requests, the scheme will typically be discoverable in the
20
- * server parameters.
21
- *
22
- * @link http://tools.ietf.org/html/rfc3986 (the URI specification)
23
- */
24
-interface UriInterface
25
-{
26
-    /**
27
-     * Retrieve the scheme component of the URI.
28
-     *
29
-     * If no scheme is present, this method MUST return an empty string.
30
-     *
31
-     * The value returned MUST be normalized to lowercase, per RFC 3986
32
-     * Section 3.1.
33
-     *
34
-     * The trailing ":" character is not part of the scheme and MUST NOT be
35
-     * added.
36
-     *
37
-     * @see https://tools.ietf.org/html/rfc3986#section-3.1
38
-     * @return string The URI scheme.
39
-     */
40
-    public function getScheme();
41
-
42
-    /**
43
-     * Retrieve the authority component of the URI.
44
-     *
45
-     * If no authority information is present, this method MUST return an empty
46
-     * string.
47
-     *
48
-     * The authority syntax of the URI is:
49
-     *
50
-     * <pre>
51
-     * [user-info@]host[:port]
52
-     * </pre>
53
-     *
54
-     * If the port component is not set or is the standard port for the current
55
-     * scheme, it SHOULD NOT be included.
56
-     *
57
-     * @see https://tools.ietf.org/html/rfc3986#section-3.2
58
-     * @return string The URI authority, in "[user-info@]host[:port]" format.
59
-     */
60
-    public function getAuthority();
61
-
62
-    /**
63
-     * Retrieve the user information component of the URI.
64
-     *
65
-     * If no user information is present, this method MUST return an empty
66
-     * string.
67
-     *
68
-     * If a user is present in the URI, this will return that value;
69
-     * additionally, if the password is also present, it will be appended to the
70
-     * user value, with a colon (":") separating the values.
71
-     *
72
-     * The trailing "@" character is not part of the user information and MUST
73
-     * NOT be added.
74
-     *
75
-     * @return string The URI user information, in "username[:password]" format.
76
-     */
77
-    public function getUserInfo();
78
-
79
-    /**
80
-     * Retrieve the host component of the URI.
81
-     *
82
-     * If no host is present, this method MUST return an empty string.
83
-     *
84
-     * The value returned MUST be normalized to lowercase, per RFC 3986
85
-     * Section 3.2.2.
86
-     *
87
-     * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
88
-     * @return string The URI host.
89
-     */
90
-    public function getHost();
91
-
92
-    /**
93
-     * Retrieve the port component of the URI.
94
-     *
95
-     * If a port is present, and it is non-standard for the current scheme,
96
-     * this method MUST return it as an integer. If the port is the standard port
97
-     * used with the current scheme, this method SHOULD return null.
98
-     *
99
-     * If no port is present, and no scheme is present, this method MUST return
100
-     * a null value.
101
-     *
102
-     * If no port is present, but a scheme is present, this method MAY return
103
-     * the standard port for that scheme, but SHOULD return null.
104
-     *
105
-     * @return null|int The URI port.
106
-     */
107
-    public function getPort();
108
-
109
-    /**
110
-     * Retrieve the path component of the URI.
111
-     *
112
-     * The path can either be empty or absolute (starting with a slash) or
113
-     * rootless (not starting with a slash). Implementations MUST support all
114
-     * three syntaxes.
115
-     *
116
-     * Normally, the empty path "" and absolute path "/" are considered equal as
117
-     * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
118
-     * do this normalization because in contexts with a trimmed base path, e.g.
119
-     * the front controller, this difference becomes significant. It's the task
120
-     * of the user to handle both "" and "/".
121
-     *
122
-     * The value returned MUST be percent-encoded, but MUST NOT double-encode
123
-     * any characters. To determine what characters to encode, please refer to
124
-     * RFC 3986, Sections 2 and 3.3.
125
-     *
126
-     * As an example, if the value should include a slash ("/") not intended as
127
-     * delimiter between path segments, that value MUST be passed in encoded
128
-     * form (e.g., "%2F") to the instance.
129
-     *
130
-     * @see https://tools.ietf.org/html/rfc3986#section-2
131
-     * @see https://tools.ietf.org/html/rfc3986#section-3.3
132
-     * @return string The URI path.
133
-     */
134
-    public function getPath();
135
-
136
-    /**
137
-     * Retrieve the query string of the URI.
138
-     *
139
-     * If no query string is present, this method MUST return an empty string.
140
-     *
141
-     * The leading "?" character is not part of the query and MUST NOT be
142
-     * added.
143
-     *
144
-     * The value returned MUST be percent-encoded, but MUST NOT double-encode
145
-     * any characters. To determine what characters to encode, please refer to
146
-     * RFC 3986, Sections 2 and 3.4.
147
-     *
148
-     * As an example, if a value in a key/value pair of the query string should
149
-     * include an ampersand ("&") not intended as a delimiter between values,
150
-     * that value MUST be passed in encoded form (e.g., "%26") to the instance.
151
-     *
152
-     * @see https://tools.ietf.org/html/rfc3986#section-2
153
-     * @see https://tools.ietf.org/html/rfc3986#section-3.4
154
-     * @return string The URI query string.
155
-     */
156
-    public function getQuery();
157
-
158
-    /**
159
-     * Retrieve the fragment component of the URI.
160
-     *
161
-     * If no fragment is present, this method MUST return an empty string.
162
-     *
163
-     * The leading "#" character is not part of the fragment and MUST NOT be
164
-     * added.
165
-     *
166
-     * The value returned MUST be percent-encoded, but MUST NOT double-encode
167
-     * any characters. To determine what characters to encode, please refer to
168
-     * RFC 3986, Sections 2 and 3.5.
169
-     *
170
-     * @see https://tools.ietf.org/html/rfc3986#section-2
171
-     * @see https://tools.ietf.org/html/rfc3986#section-3.5
172
-     * @return string The URI fragment.
173
-     */
174
-    public function getFragment();
175
-
176
-    /**
177
-     * Return an instance with the specified scheme.
178
-     *
179
-     * This method MUST retain the state of the current instance, and return
180
-     * an instance that contains the specified scheme.
181
-     *
182
-     * Implementations MUST support the schemes "http" and "https" case
183
-     * insensitively, and MAY accommodate other schemes if required.
184
-     *
185
-     * An empty scheme is equivalent to removing the scheme.
186
-     *
187
-     * @param string $scheme The scheme to use with the new instance.
188
-     * @return static A new instance with the specified scheme.
189
-     * @throws \InvalidArgumentException for invalid or unsupported schemes.
190
-     */
191
-    public function withScheme($scheme);
192
-
193
-    /**
194
-     * Return an instance with the specified user information.
195
-     *
196
-     * This method MUST retain the state of the current instance, and return
197
-     * an instance that contains the specified user information.
198
-     *
199
-     * Password is optional, but the user information MUST include the
200
-     * user; an empty string for the user is equivalent to removing user
201
-     * information.
202
-     *
203
-     * @param string $user The user name to use for authority.
204
-     * @param null|string $password The password associated with $user.
205
-     * @return static A new instance with the specified user information.
206
-     */
207
-    public function withUserInfo($user, $password = null);
208
-
209
-    /**
210
-     * Return an instance with the specified host.
211
-     *
212
-     * This method MUST retain the state of the current instance, and return
213
-     * an instance that contains the specified host.
214
-     *
215
-     * An empty host value is equivalent to removing the host.
216
-     *
217
-     * @param string $host The hostname to use with the new instance.
218
-     * @return static A new instance with the specified host.
219
-     * @throws \InvalidArgumentException for invalid hostnames.
220
-     */
221
-    public function withHost($host);
222
-
223
-    /**
224
-     * Return an instance with the specified port.
225
-     *
226
-     * This method MUST retain the state of the current instance, and return
227
-     * an instance that contains the specified port.
228
-     *
229
-     * Implementations MUST raise an exception for ports outside the
230
-     * established TCP and UDP port ranges.
231
-     *
232
-     * A null value provided for the port is equivalent to removing the port
233
-     * information.
234
-     *
235
-     * @param null|int $port The port to use with the new instance; a null value
236
-     *     removes the port information.
237
-     * @return static A new instance with the specified port.
238
-     * @throws \InvalidArgumentException for invalid ports.
239
-     */
240
-    public function withPort($port);
241
-
242
-    /**
243
-     * Return an instance with the specified path.
244
-     *
245
-     * This method MUST retain the state of the current instance, and return
246
-     * an instance that contains the specified path.
247
-     *
248
-     * The path can either be empty or absolute (starting with a slash) or
249
-     * rootless (not starting with a slash). Implementations MUST support all
250
-     * three syntaxes.
251
-     *
252
-     * If the path is intended to be domain-relative rather than path relative then
253
-     * it must begin with a slash ("/"). Paths not starting with a slash ("/")
254
-     * are assumed to be relative to some base path known to the application or
255
-     * consumer.
256
-     *
257
-     * Users can provide both encoded and decoded path characters.
258
-     * Implementations ensure the correct encoding as outlined in getPath().
259
-     *
260
-     * @param string $path The path to use with the new instance.
261
-     * @return static A new instance with the specified path.
262
-     * @throws \InvalidArgumentException for invalid paths.
263
-     */
264
-    public function withPath($path);
265
-
266
-    /**
267
-     * Return an instance with the specified query string.
268
-     *
269
-     * This method MUST retain the state of the current instance, and return
270
-     * an instance that contains the specified query string.
271
-     *
272
-     * Users can provide both encoded and decoded query characters.
273
-     * Implementations ensure the correct encoding as outlined in getQuery().
274
-     *
275
-     * An empty query string value is equivalent to removing the query string.
276
-     *
277
-     * @param string $query The query string to use with the new instance.
278
-     * @return static A new instance with the specified query string.
279
-     * @throws \InvalidArgumentException for invalid query strings.
280
-     */
281
-    public function withQuery($query);
282
-
283
-    /**
284
-     * Return an instance with the specified URI fragment.
285
-     *
286
-     * This method MUST retain the state of the current instance, and return
287
-     * an instance that contains the specified URI fragment.
288
-     *
289
-     * Users can provide both encoded and decoded fragment characters.
290
-     * Implementations ensure the correct encoding as outlined in getFragment().
291
-     *
292
-     * An empty fragment value is equivalent to removing the fragment.
293
-     *
294
-     * @param string $fragment The fragment to use with the new instance.
295
-     * @return static A new instance with the specified fragment.
296
-     */
297
-    public function withFragment($fragment);
298
-
299
-    /**
300
-     * Return the string representation as a URI reference.
301
-     *
302
-     * Depending on which components of the URI are present, the resulting
303
-     * string is either a full URI or relative reference according to RFC 3986,
304
-     * Section 4.1. The method concatenates the various components of the URI,
305
-     * using the appropriate delimiters:
306
-     *
307
-     * - If a scheme is present, it MUST be suffixed by ":".
308
-     * - If an authority is present, it MUST be prefixed by "//".
309
-     * - The path can be concatenated without delimiters. But there are two
310
-     *   cases where the path has to be adjusted to make the URI reference
311
-     *   valid as PHP does not allow to throw an exception in __toString():
312
-     *     - If the path is rootless and an authority is present, the path MUST
313
-     *       be prefixed by "/".
314
-     *     - If the path is starting with more than one "/" and no authority is
315
-     *       present, the starting slashes MUST be reduced to one.
316
-     * - If a query is present, it MUST be prefixed by "?".
317
-     * - If a fragment is present, it MUST be prefixed by "#".
318
-     *
319
-     * @see http://tools.ietf.org/html/rfc3986#section-4.1
320
-     * @return string
321
-     */
322
-    public function __toString();
323
-}

+ 0
- 21
vendor/psr/http-server-handler/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-The MIT License (MIT)
2
-
3
-Copyright (c) 2016 PHP Framework Interoperability Group
4
-
5
-Permission is hereby granted, free of charge, to any person obtaining a copy
6
-of this software and associated documentation files (the "Software"), to deal
7
-in the Software without restriction, including without limitation the rights
8
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-copies of the Software, and to permit persons to whom the Software is
10
-furnished to do so, subject to the following conditions:
11
-
12
-The above copyright notice and this permission notice shall be included in all
13
-copies or substantial portions of the Software.
14
-
15
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-SOFTWARE.

+ 0
- 6
vendor/psr/http-server-handler/README.md 查看文件

@@ -1,6 +0,0 @@
1
-HTTP Server Handler
2
-===================
3
-
4
-Provides the `RequestHandlerInterface` of [PSR-15][psr-15].
5
-
6
-[psr-15]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-15-request-handlers.md

+ 0
- 36
vendor/psr/http-server-handler/composer.json 查看文件

@@ -1,36 +0,0 @@
1
-{
2
-    "name": "psr/http-server-handler",
3
-    "description": "Common interface for HTTP server-side request handler",
4
-    "keywords": [
5
-        "psr",
6
-        "psr-7",
7
-        "psr-15",
8
-        "http-interop",
9
-        "http",
10
-        "server",
11
-        "handler",
12
-        "request",
13
-        "response"
14
-    ],
15
-    "license": "MIT",
16
-    "authors": [
17
-        {
18
-            "name": "PHP-FIG",
19
-            "homepage": "http://www.php-fig.org/"
20
-        }
21
-    ],
22
-    "require": {
23
-        "php": ">=7.0",
24
-        "psr/http-message": "^1.0"
25
-    },
26
-    "autoload": {
27
-        "psr-4": {
28
-            "Psr\\Http\\Server\\": "src/"
29
-        }
30
-    },
31
-    "extra": {
32
-        "branch-alias": {
33
-            "dev-master": "1.0.x-dev"
34
-        }
35
-    }
36
-}

+ 0
- 22
vendor/psr/http-server-handler/src/RequestHandlerInterface.php 查看文件

@@ -1,22 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Server;
4
-
5
-use Psr\Http\Message\ResponseInterface;
6
-use Psr\Http\Message\ServerRequestInterface;
7
-
8
-/**
9
- * Handles a server request and produces a response.
10
- *
11
- * An HTTP request handler process an HTTP request in order to produce an
12
- * HTTP response.
13
- */
14
-interface RequestHandlerInterface
15
-{
16
-    /**
17
-     * Handles a request and produces a response.
18
-     *
19
-     * May call other collaborating code to generate the response.
20
-     */
21
-    public function handle(ServerRequestInterface $request): ResponseInterface;
22
-}

+ 0
- 21
vendor/psr/http-server-middleware/LICENSE 查看文件

@@ -1,21 +0,0 @@
1
-The MIT License (MIT)
2
-
3
-Copyright (c) 2016 PHP Framework Interoperability Group
4
-
5
-Permission is hereby granted, free of charge, to any person obtaining a copy
6
-of this software and associated documentation files (the "Software"), to deal
7
-in the Software without restriction, including without limitation the rights
8
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-copies of the Software, and to permit persons to whom the Software is
10
-furnished to do so, subject to the following conditions:
11
-
12
-The above copyright notice and this permission notice shall be included in all
13
-copies or substantial portions of the Software.
14
-
15
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-SOFTWARE.

+ 0
- 6
vendor/psr/http-server-middleware/README.md 查看文件

@@ -1,6 +0,0 @@
1
-HTTP Server Middleware
2
-======================
3
-
4
-Provides the `MiddlewareInterface` of [PSR-15][psr-15].
5
-
6
-[psr-15]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-15-request-handlers.md

+ 0
- 36
vendor/psr/http-server-middleware/composer.json 查看文件

@@ -1,36 +0,0 @@
1
-{
2
-    "name": "psr/http-server-middleware",
3
-    "description": "Common interface for HTTP server-side middleware",
4
-    "keywords": [
5
-        "psr",
6
-        "psr-7",
7
-        "psr-15",
8
-        "http-interop",
9
-        "http",
10
-        "middleware",
11
-        "request",
12
-        "response"
13
-    ],
14
-    "license": "MIT",
15
-    "authors": [
16
-        {
17
-            "name": "PHP-FIG",
18
-            "homepage": "http://www.php-fig.org/"
19
-        }
20
-    ],
21
-    "require": {
22
-        "php": ">=7.0",
23
-        "psr/http-message": "^1.0",
24
-        "psr/http-server-handler": "^1.0"
25
-    },
26
-    "autoload": {
27
-        "psr-4": {
28
-            "Psr\\Http\\Server\\": "src/"
29
-        }
30
-    },
31
-    "extra": {
32
-        "branch-alias": {
33
-            "dev-master": "1.0.x-dev"
34
-        }
35
-    }
36
-}

+ 0
- 25
vendor/psr/http-server-middleware/src/MiddlewareInterface.php 查看文件

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-namespace Psr\Http\Server;
4
-
5
-use Psr\Http\Message\ResponseInterface;
6
-use Psr\Http\Message\ServerRequestInterface;
7
-
8
-/**
9
- * Participant in processing a server request and response.
10
- *
11
- * An HTTP middleware component participates in processing an HTTP message:
12
- * by acting on the request, generating the response, or forwarding the
13
- * request to a subsequent middleware and possibly acting on its response.
14
- */
15
-interface MiddlewareInterface
16
-{
17
-    /**
18
-     * Process an incoming server request.
19
-     *
20
-     * Processes an incoming server request in order to produce a response.
21
-     * If unable to produce the response itself, it may delegate to the provided
22
-     * request handler to do so.
23
-     */
24
-    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface;
25
-}

Loading…
取消
儲存