4 |
5 |
6 | ## CloudHound - Intro
7 |
8 | [CloudHound][1] is a Console Application Written in PHP Which allows Attacker to Bypass ~~CloudFlare~~ System and Detect Original Server .
9 | in order to do this, CloudHound use Several Private Methods Such as Cross-Site Port Attacking, Query in Guardiran DNS History wide-range Database and etc
10 |
11 |
12 | ## Usage
13 |
14 | Run `application` File in Root Folder via PHP or open terminal and use `php application` Command ; application file is bootstrapper of this script .
15 |
16 | Since App is Running You have 2 Operational Commands in front of your Self :
17 |
18 |
19 | [+] detect guardiran.org
20 |
21 | [+] whois guardiran.org
22 |
23 | [+] help
24 |
25 | [+] exit
26 |
27 |
28 | #### detect
29 | > detect command receives 1 parameter and it should be target hostname ;
30 | > after executing this commands system runs several methods to analyze and detect the target .
31 |
32 | #### whois
33 | > whois command recives 1 parameter and it should be target hostname or IP ;
34 | > it will gather info about registered domain for attacker .
35 |
36 | ## Methods
37 |
38 | | Method | Description |
39 | | ------ | ----------- |
40 | | DNS History | Using Guardiran Private Database (Up to +2M Records) to Detect Original IP |
41 | | Cross-Site Port Attack | Wide-Range XSPA |
42 | | Subdomain Scan | +10K Common Subdomains (Scan Range is Pretty Flexible) |
43 |
44 | ## Credits
45 |
46 | * **RedCoder** (Admin in Guardiran Sec. Team)
47 | * **RT3N** (Admin in Guardiran Sec. Team)
48 |
49 | ## About Us
50 |
51 |
52 |
53 | We are Guardiran Security Team
54 | \
55 | https://www.guardiran.org
56 |
57 | [1]: https://github.com/guardiran/cloudhound
58 |
--------------------------------------------------------------------------------
/app/Bootstrap/Bootstrap.php:
--------------------------------------------------------------------------------
1 | api_service = "http://api.guardiran.org/cloudhound/";
30 | $this->connection = new Client(['base_uri' => $this->api_service]);
31 | }
32 |
33 | public function DNSHistory($hostname){
34 |
35 | $headers = ["content-type" => "application/json;charset=UTF-8",
36 | "API" => "guardiran"];
37 |
38 |
39 | try {
40 | $this->data = $this->connection->request('GET', "v1/dns-history/" . $hostname,
41 | ['headers' => $headers]);
42 | } catch (BadResponseException $e) {
43 | $this->data = "false";
44 | } catch (ConnectException $e){
45 | $this->data = "false";
46 | $this->connection_status = false;
47 | }
48 |
49 | if ($this->connection_status === false) {
50 | return "Connection Error";
51 | }
52 |
53 | $this->connection_status = true;
54 |
55 |
56 |
57 | if ($this->data == "false") {
58 | return false;
59 | } else {
60 | $this->data = $this->data->getBody();
61 | $this->data = json_decode($this->data, true);
62 | return $this->data;
63 | }
64 |
65 | }
66 |
67 | /**
68 | * @return mixed
69 | */
70 | public function getConnectionStatus()
71 | {
72 | return $this->connection_status;
73 | }
74 |
75 | }
--------------------------------------------------------------------------------
/app/Controllers/DatabaseController.php:
--------------------------------------------------------------------------------
1 | api_service = "http://api.guardiran.org/cloudhound/";
27 | $headers = ["content-type" => "application/json;charset=UTF-8",
28 | "API" => "guardiran"];
29 | $this->connection = new Client(['base_uri' => $this->api_service, 'headers' => $headers]);
30 | }
31 |
32 | public function databaseStatus()
33 | {
34 |
35 | try {
36 | $this->data = $this->connection->request('GET', "v1/database-status/");
37 | } catch (BadResponseException $e) {
38 | $this->data = "false";
39 | }
40 |
41 |
42 | if ($this->data == "false") {
43 | return false;
44 | } else {
45 | $this->data = $this->data->getBody();
46 | $this->data = json_decode($this->data, true);
47 | return $this->data;
48 | }
49 | }
50 |
51 | public function infiniteDatabase($hostname, $ip, $subdomain = null)
52 | {
53 |
54 | if ($subdomain == null) {
55 | try {
56 | $this->connection->request('GET', "v1/infinity/" . $hostname . "/" . $ip);
57 | } catch (BadResponseException $e) {
58 | }
59 | } else {
60 | try {
61 | $this->connection->request('GET', "v1/infinity/" . $hostname . "/" . $ip . "/" . $subdomain);
62 | } catch (BadResponseException $e) {
63 | }
64 | }
65 |
66 | }
67 |
68 | }
--------------------------------------------------------------------------------
/app/Controllers/HelpController.php:
--------------------------------------------------------------------------------
1 | fetchData($IP);
23 | $organization = $whois_handler->getOrganization();
24 |
25 | if ($organization == "Cloudflare, Inc.") {
26 | return true;
27 | } else if($organization === false){
28 | return "private_ip";
29 | } else {
30 | return false;
31 | }
32 | }
33 |
34 | public static function cloudFlareDNS($dns)
35 | {
36 | $cloud_flare_domain = "cloudflare.com";
37 | $ns = substr($dns, -14, 14);
38 |
39 | if ($ns == $cloud_flare_domain) {
40 | return true;
41 | } else {
42 | return false;
43 | }
44 |
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/app/Controllers/SubDomainController.php:
--------------------------------------------------------------------------------
1 | model
27 | */
28 |
29 | protected $model;
30 |
31 | public function __construct($hostname)
32 | {
33 |
34 | if (!extension_loaded('pdo_sqlite') && !extension_loaded('php_pdo_sqlite')) {
35 | $this->sqlite_extension = false;
36 | return;
37 | } else {
38 | $this->sqlite_extension = true;
39 | }
40 |
41 | parent::__construct();
42 | $this->hostname = $hostname;
43 | $this->subdomains = $this->model->fetchSubDomainList();
44 | $this->subdomains_count = count($this->subdomains);
45 |
46 | if (!$this->isConnected()) {
47 | $this->connection_status = false;
48 | } else {
49 | $this->connection_status = true;
50 | }
51 |
52 | }
53 |
54 | public function subDomainCheckUp($hostname)
55 | {
56 |
57 | if ($this->sqlite_extension == false) {
58 | echo PHP_EOL . PHP_EOL . " \e[1;31;40m[!] pdo_sqlite Extension is Disabled On your PHP Server ." . PHP_EOL . PHP_EOL .
59 | "\tin Order to Access Subdomain List from SQLite Database you Have to Go to PHP Folder and Modify php.ini" . PHP_EOL .
60 | "\tAnd add the Following Line :" . PHP_EOL .
61 | "\textension=pdo_sqlite" . PHP_EOL;
62 | return false;
63 | }
64 |
65 |
66 | $trigger = 100;
67 | $i = 1;
68 |
69 | echo PHP_EOL . " ";
70 | $this->counter($i);
71 |
72 | foreach ($this->subdomains as $val) {
73 |
74 | if ($i == $trigger) {
75 | $this->counter($i);
76 | $trigger += 100;
77 | }
78 |
79 | if ($this->subdomains_count == $i) {
80 | $this->counter($i);
81 | }
82 |
83 | $url = $val['subdomain'] . "." . $hostname;
84 |
85 | $dns_records = @dns_get_record($url, DNS_A);
86 |
87 | if ($dns_records) {
88 | if (isset($dns_records[0]['ip'])) {
89 |
90 | $cloudflare_status = ProtectionController::cloudFlareIP($dns_records[0]['ip']);
91 |
92 | if ($cloudflare_status) {
93 | continue;
94 | } else if ($cloudflare_status == "private_ip") {
95 | $dns_records['server_ip'] = "Private IP (" . $dns_records[0]['ip'] . ")";
96 | $dns_records['subdomain'] = $url;
97 | return $dns_records;
98 | } else if ($cloudflare_status == false) {
99 | $dns_records['server_ip'] = $dns_records[0]['ip'];
100 | $dns_records['subdomain'] = $url;
101 | return $dns_records;
102 | }
103 | }
104 | }
105 |
106 |
107 | $i++;
108 | }
109 |
110 | return false;
111 | }
112 |
113 | public function counter($counter)
114 | {
115 | $text = "\e[1;36;40m[" . $counter . "/" . $this->subdomains_count . "] \e[1;37;40m" . PHP_EOL . PHP_EOL . " ";
116 |
117 | echo $text;
118 |
119 | }
120 |
121 | public function isConnected()
122 | {
123 | $connected = @fsockopen("www.google.com", 80);
124 | if ($connected) {
125 | fclose($connected);
126 | return true;
127 | }
128 | return false;
129 | }
130 |
131 | /**
132 | * @return mixed
133 | */
134 | public function getConnectionStatus()
135 | {
136 | return $this->connection_status;
137 | }
138 |
139 | public function getSubDomainCount(){
140 | return $this->subdomains_count;
141 | }
142 |
143 | public function sliceSubdomains($length){
144 | $this->subdomains = array_slice($this->subdomains, 0, $length);
145 | $this->subdomains_count = $length;
146 | }
147 |
148 | }
149 |
--------------------------------------------------------------------------------
/app/Models/.gitkeep:
--------------------------------------------------------------------------------
1 | ECHO is on.
2 |
--------------------------------------------------------------------------------
/app/Models/SubDomainModel.php:
--------------------------------------------------------------------------------
1 | setFields([
20 | 'subdomain' => 'any',
21 | ]);
22 |
23 | $this->query("subdomains", READ, DB3);
24 |
25 | return $this->getContent(DB3);
26 |
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/application:
--------------------------------------------------------------------------------
1 | run();
--------------------------------------------------------------------------------
/cloudhound.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuardIran/CloudHound/8422abcd3e4a4ebc1a178832861cb22c952ce772/cloudhound.png
--------------------------------------------------------------------------------
/commands/commands.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
10 | );
11 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
10 | 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
11 | 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
12 | '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
13 | );
14 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_namespaces.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/pear/net_smtp', $vendorDir . '/pear/net_socket'),
10 | 'Mail' => array($vendorDir . '/pear/mail'),
11 | 'Console' => array($vendorDir . '/pear/console_getopt'),
12 | '' => array($vendorDir . '/pear/pear-core-minimal/src'),
13 | );
14 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_psr4.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/redframework/console-core/src/Red'),
10 | 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
11 | 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
12 | 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
13 | 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
14 | 'App\\' => array($baseDir . '/app'),
15 | );
16 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
31 | if ($useStaticLoader) {
32 | require_once __DIR__ . '/autoload_static.php';
33 |
34 | call_user_func(\Composer\Autoload\ComposerStaticInitf66887c085fee74768a27d3c96baf943::getInitializer($loader));
35 | } else {
36 | $map = require __DIR__ . '/autoload_namespaces.php';
37 | foreach ($map as $namespace => $path) {
38 | $loader->set($namespace, $path);
39 | }
40 |
41 | $map = require __DIR__ . '/autoload_psr4.php';
42 | foreach ($map as $namespace => $path) {
43 | $loader->setPsr4($namespace, $path);
44 | }
45 |
46 | $classMap = require __DIR__ . '/autoload_classmap.php';
47 | if ($classMap) {
48 | $loader->addClassMap($classMap);
49 | }
50 | }
51 |
52 | $loader->register(true);
53 |
54 | if ($useStaticLoader) {
55 | $includeFiles = Composer\Autoload\ComposerStaticInitf66887c085fee74768a27d3c96baf943::$files;
56 | } else {
57 | $includeFiles = require __DIR__ . '/autoload_files.php';
58 | }
59 | foreach ($includeFiles as $fileIdentifier => $file) {
60 | composerRequiref66887c085fee74768a27d3c96baf943($fileIdentifier, $file);
61 | }
62 |
63 | return $loader;
64 | }
65 | }
66 |
67 | function composerRequiref66887c085fee74768a27d3c96baf943($fileIdentifier, $file)
68 | {
69 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
70 | require $file;
71 |
72 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_static.php:
--------------------------------------------------------------------------------
1 | __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
11 | 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
12 | 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
13 | '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
14 | );
15 |
16 | public static $prefixLengthsPsr4 = array (
17 | 'R' =>
18 | array (
19 | 'Red\\' => 4,
20 | ),
21 | 'P' =>
22 | array (
23 | 'Psr\\Http\\Message\\' => 17,
24 | ),
25 | 'G' =>
26 | array (
27 | 'GuzzleHttp\\Psr7\\' => 16,
28 | 'GuzzleHttp\\Promise\\' => 19,
29 | 'GuzzleHttp\\' => 11,
30 | ),
31 | 'A' =>
32 | array (
33 | 'App\\' => 4,
34 | ),
35 | );
36 |
37 | public static $prefixDirsPsr4 = array (
38 | 'Red\\' =>
39 | array (
40 | 0 => __DIR__ . '/..' . '/redframework/console-core/src/Red',
41 | ),
42 | 'Psr\\Http\\Message\\' =>
43 | array (
44 | 0 => __DIR__ . '/..' . '/psr/http-message/src',
45 | ),
46 | 'GuzzleHttp\\Psr7\\' =>
47 | array (
48 | 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
49 | ),
50 | 'GuzzleHttp\\Promise\\' =>
51 | array (
52 | 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
53 | ),
54 | 'GuzzleHttp\\' =>
55 | array (
56 | 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
57 | ),
58 | 'App\\' =>
59 | array (
60 | 0 => __DIR__ . '/../..' . '/app',
61 | ),
62 | );
63 |
64 | public static $prefixesPsr0 = array (
65 | 'N' =>
66 | array (
67 | 'Net' =>
68 | array (
69 | 0 => __DIR__ . '/..' . '/pear/net_smtp',
70 | 1 => __DIR__ . '/..' . '/pear/net_socket',
71 | ),
72 | ),
73 | 'M' =>
74 | array (
75 | 'Mail' =>
76 | array (
77 | 0 => __DIR__ . '/..' . '/pear/mail',
78 | ),
79 | ),
80 | 'C' =>
81 | array (
82 | 'Console' =>
83 | array (
84 | 0 => __DIR__ . '/..' . '/pear/console_getopt',
85 | ),
86 | ),
87 | );
88 |
89 | public static $fallbackDirsPsr0 = array (
90 | 0 => __DIR__ . '/..' . '/pear/pear-core-minimal/src',
91 | );
92 |
93 | public static $classMap = array (
94 | 'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
95 | );
96 |
97 | public static function getInitializer(ClassLoader $loader)
98 | {
99 | return \Closure::bind(function () use ($loader) {
100 | $loader->prefixLengthsPsr4 = ComposerStaticInitf66887c085fee74768a27d3c96baf943::$prefixLengthsPsr4;
101 | $loader->prefixDirsPsr4 = ComposerStaticInitf66887c085fee74768a27d3c96baf943::$prefixDirsPsr4;
102 | $loader->prefixesPsr0 = ComposerStaticInitf66887c085fee74768a27d3c96baf943::$prefixesPsr0;
103 | $loader->fallbackDirsPsr0 = ComposerStaticInitf66887c085fee74768a27d3c96baf943::$fallbackDirsPsr0;
104 | $loader->classMap = ComposerStaticInitf66887c085fee74768a27d3c96baf943::$classMap;
105 |
106 | }, null, ClassLoader::class);
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/vendor/composer/include_paths.php:
--------------------------------------------------------------------------------
1 | setRiskyAllowed(true)
5 | ->setRules([
6 | '@PSR2' => true,
7 | 'array_syntax' => ['syntax' => 'short'],
8 | 'declare_strict_types' => false,
9 | 'concat_space' => ['spacing'=>'one'],
10 | 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
11 | 'ordered_imports' => true,
12 | // 'phpdoc_align' => ['align'=>'vertical'],
13 | // 'native_function_invocation' => true,
14 | ])
15 | ->setFinder(
16 | PhpCsFixer\Finder::create()
17 | ->in(__DIR__.'/src')
18 | ->in(__DIR__.'/tests')
19 | ->name('*.php')
20 | )
21 | ;
22 |
23 | return $config;
24 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM composer:latest as setup
2 |
3 | RUN mkdir /guzzle
4 |
5 | WORKDIR /guzzle
6 |
7 | RUN set -xe \
8 | && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár " --no-interaction \
9 | && composer require guzzlehttp/guzzle
10 |
11 |
12 | FROM php:7.3
13 |
14 | RUN mkdir /guzzle
15 |
16 | WORKDIR /guzzle
17 |
18 | COPY --from=setup /guzzle /guzzle
19 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling
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.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/README.md:
--------------------------------------------------------------------------------
1 | Guzzle, PHP HTTP client
2 | =======================
3 |
4 | [](https://github.com/guzzle/guzzle/releases)
5 | [](https://travis-ci.org/guzzle/guzzle)
6 | [](https://packagist.org/packages/guzzlehttp/guzzle)
7 |
8 | Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
9 | trivial to integrate with web services.
10 |
11 | - Simple interface for building query strings, POST requests, streaming large
12 | uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
13 | etc...
14 | - Can send both synchronous and asynchronous requests using the same interface.
15 | - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
16 | to utilize other PSR-7 compatible libraries with Guzzle.
17 | - Abstracts away the underlying HTTP transport, allowing you to write
18 | environment and transport agnostic code; i.e., no hard dependency on cURL,
19 | PHP streams, sockets, or non-blocking event loops.
20 | - Middleware system allows you to augment and compose client behavior.
21 |
22 | ```php
23 | $client = new \GuzzleHttp\Client();
24 | $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
25 |
26 | echo $response->getStatusCode(); # 200
27 | echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
28 | echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
29 |
30 | # Send an asynchronous request.
31 | $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
32 | $promise = $client->sendAsync($request)->then(function ($response) {
33 | echo 'I completed! ' . $response->getBody();
34 | });
35 |
36 | $promise->wait();
37 | ```
38 |
39 | ## Help and docs
40 |
41 | - [Documentation](http://guzzlephp.org/)
42 | - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
43 | - [Gitter](https://gitter.im/guzzle/guzzle)
44 |
45 |
46 | ## Installing Guzzle
47 |
48 | The recommended way to install Guzzle is through
49 | [Composer](http://getcomposer.org).
50 |
51 | ```bash
52 | # Install Composer
53 | curl -sS https://getcomposer.org/installer | php
54 | ```
55 |
56 | Next, run the Composer command to install the latest stable version of Guzzle:
57 |
58 | ```bash
59 | composer require guzzlehttp/guzzle
60 | ```
61 |
62 | After installing, you need to require Composer's autoloader:
63 |
64 | ```php
65 | require 'vendor/autoload.php';
66 | ```
67 |
68 | You can then later update Guzzle using composer:
69 |
70 | ```bash
71 | composer update
72 | ```
73 |
74 |
75 | ## Version Guidance
76 |
77 | | Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
78 | |---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
79 | | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
80 | | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
81 | | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
82 | | 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
83 |
84 | [guzzle-3-repo]: https://github.com/guzzle/guzzle3
85 | [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
86 | [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
87 | [guzzle-6-repo]: https://github.com/guzzle/guzzle
88 | [guzzle-3-docs]: http://guzzle3.readthedocs.org
89 | [guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
90 | [guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
91 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/guzzle",
3 | "type": "library",
4 | "description": "Guzzle is a PHP HTTP client library",
5 | "keywords": [
6 | "framework",
7 | "http",
8 | "rest",
9 | "web service",
10 | "curl",
11 | "client",
12 | "HTTP client"
13 | ],
14 | "homepage": "http://guzzlephp.org/",
15 | "license": "MIT",
16 | "authors": [
17 | {
18 | "name": "Michael Dowling",
19 | "email": "mtdowling@gmail.com",
20 | "homepage": "https://github.com/mtdowling"
21 | }
22 | ],
23 | "require": {
24 | "php": ">=5.5",
25 | "ext-json": "*",
26 | "guzzlehttp/promises": "^1.0",
27 | "guzzlehttp/psr7": "^1.6.1"
28 | },
29 | "require-dev": {
30 | "ext-curl": "*",
31 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
32 | "psr/log": "^1.1"
33 | },
34 | "suggest": {
35 | "psr/log": "Required for using the Log middleware",
36 | "ext-intl": "Required for Internationalized Domain Name (IDN) support"
37 | },
38 | "config": {
39 | "sort-packages": true
40 | },
41 | "extra": {
42 | "branch-alias": {
43 | "dev-master": "6.5-dev"
44 | }
45 | },
46 | "autoload": {
47 | "psr-4": {
48 | "GuzzleHttp\\": "src/"
49 | },
50 | "files": [
51 | "src/functions_include.php"
52 | ]
53 | },
54 | "autoload-dev": {
55 | "psr-4": {
56 | "GuzzleHttp\\Tests\\": "tests/"
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/ClientInterface.php:
--------------------------------------------------------------------------------
1 | filename = $cookieFile;
28 | $this->storeSessionCookies = $storeSessionCookies;
29 |
30 | if (file_exists($cookieFile)) {
31 | $this->load($cookieFile);
32 | }
33 | }
34 |
35 | /**
36 | * Saves the file when shutting down
37 | */
38 | public function __destruct()
39 | {
40 | $this->save($this->filename);
41 | }
42 |
43 | /**
44 | * Saves the cookies to a file.
45 | *
46 | * @param string $filename File to save
47 | * @throws \RuntimeException if the file cannot be found or created
48 | */
49 | public function save($filename)
50 | {
51 | $json = [];
52 | foreach ($this as $cookie) {
53 | /** @var SetCookie $cookie */
54 | if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
55 | $json[] = $cookie->toArray();
56 | }
57 | }
58 |
59 | $jsonStr = \GuzzleHttp\json_encode($json);
60 | if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
61 | throw new \RuntimeException("Unable to save file {$filename}");
62 | }
63 | }
64 |
65 | /**
66 | * Load cookies from a JSON formatted file.
67 | *
68 | * Old cookies are kept unless overwritten by newly loaded ones.
69 | *
70 | * @param string $filename Cookie file to load.
71 | * @throws \RuntimeException if the file cannot be loaded.
72 | */
73 | public function load($filename)
74 | {
75 | $json = file_get_contents($filename);
76 | if (false === $json) {
77 | throw new \RuntimeException("Unable to load file {$filename}");
78 | } elseif ($json === '') {
79 | return;
80 | }
81 |
82 | $data = \GuzzleHttp\json_decode($json, true);
83 | if (is_array($data)) {
84 | foreach (json_decode($json, true) as $cookie) {
85 | $this->setCookie(new SetCookie($cookie));
86 | }
87 | } elseif (strlen($data)) {
88 | throw new \RuntimeException("Invalid cookie file: {$filename}");
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:
--------------------------------------------------------------------------------
1 | sessionKey = $sessionKey;
27 | $this->storeSessionCookies = $storeSessionCookies;
28 | $this->load();
29 | }
30 |
31 | /**
32 | * Saves cookies to session when shutting down
33 | */
34 | public function __destruct()
35 | {
36 | $this->save();
37 | }
38 |
39 | /**
40 | * Save cookies to the client session
41 | */
42 | public function save()
43 | {
44 | $json = [];
45 | foreach ($this as $cookie) {
46 | /** @var SetCookie $cookie */
47 | if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
48 | $json[] = $cookie->toArray();
49 | }
50 | }
51 |
52 | $_SESSION[$this->sessionKey] = json_encode($json);
53 | }
54 |
55 | /**
56 | * Load the contents of the client session into the data array
57 | */
58 | protected function load()
59 | {
60 | if (!isset($_SESSION[$this->sessionKey])) {
61 | return;
62 | }
63 | $data = json_decode($_SESSION[$this->sessionKey], true);
64 | if (is_array($data)) {
65 | foreach ($data as $cookie) {
66 | $this->setCookie(new SetCookie($cookie));
67 | }
68 | } elseif (strlen($data)) {
69 | throw new \RuntimeException("Invalid cookie data");
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
16 | $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
17 | parent::__construct($msg);
18 | }
19 |
20 | /**
21 | * @return StreamInterface
22 | */
23 | public function getStream()
24 | {
25 | return $this->stream;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:
--------------------------------------------------------------------------------
1 | factory = isset($options['handle_factory'])
29 | ? $options['handle_factory']
30 | : new CurlFactory(3);
31 | }
32 |
33 | public function __invoke(RequestInterface $request, array $options)
34 | {
35 | if (isset($options['delay'])) {
36 | usleep($options['delay'] * 1000);
37 | }
38 |
39 | $easy = $this->factory->create($request, $options);
40 | curl_exec($easy->handle);
41 | $easy->errno = curl_errno($easy->handle);
42 |
43 | return CurlFactory::finish($this, $easy, $this->factory);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php:
--------------------------------------------------------------------------------
1 | headers)) {
48 | throw new \RuntimeException('No headers have been received');
49 | }
50 |
51 | // HTTP-version SP status-code SP reason-phrase
52 | $startLine = explode(' ', array_shift($this->headers), 3);
53 | $headers = \GuzzleHttp\headers_from_lines($this->headers);
54 | $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
55 |
56 | if (!empty($this->options['decode_content'])
57 | && isset($normalizedKeys['content-encoding'])
58 | ) {
59 | $headers['x-encoded-content-encoding']
60 | = $headers[$normalizedKeys['content-encoding']];
61 | unset($headers[$normalizedKeys['content-encoding']]);
62 | if (isset($normalizedKeys['content-length'])) {
63 | $headers['x-encoded-content-length']
64 | = $headers[$normalizedKeys['content-length']];
65 |
66 | $bodyLength = (int) $this->sink->getSize();
67 | if ($bodyLength) {
68 | $headers[$normalizedKeys['content-length']] = $bodyLength;
69 | } else {
70 | unset($headers[$normalizedKeys['content-length']]);
71 | }
72 | }
73 | }
74 |
75 | // Attach a response to the easy handle with the parsed headers.
76 | $this->response = new Response(
77 | $startLine[1],
78 | $headers,
79 | $this->sink,
80 | substr($startLine[0], 5),
81 | isset($startLine[2]) ? (string) $startLine[2] : null
82 | );
83 | }
84 |
85 | public function __get($name)
86 | {
87 | $msg = $name === 'handle'
88 | ? 'The EasyHandle has been released'
89 | : 'Invalid property: ' . $name;
90 | throw new \BadMethodCallException($msg);
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:
--------------------------------------------------------------------------------
1 | nextHandler = $nextHandler;
23 | }
24 |
25 | /**
26 | * @param RequestInterface $request
27 | * @param array $options
28 | *
29 | * @return PromiseInterface
30 | */
31 | public function __invoke(RequestInterface $request, array $options)
32 | {
33 | $fn = $this->nextHandler;
34 |
35 | // Don't do anything if the request has no body.
36 | if ($request->getBody()->getSize() === 0) {
37 | return $fn($request, $options);
38 | }
39 |
40 | $modify = [];
41 |
42 | // Add a default content-type if possible.
43 | if (!$request->hasHeader('Content-Type')) {
44 | if ($uri = $request->getBody()->getMetadata('uri')) {
45 | if ($type = Psr7\mimetype_from_filename($uri)) {
46 | $modify['set_headers']['Content-Type'] = $type;
47 | }
48 | }
49 | }
50 |
51 | // Add a default content-length or transfer-encoding header.
52 | if (!$request->hasHeader('Content-Length')
53 | && !$request->hasHeader('Transfer-Encoding')
54 | ) {
55 | $size = $request->getBody()->getSize();
56 | if ($size !== null) {
57 | $modify['set_headers']['Content-Length'] = $size;
58 | } else {
59 | $modify['set_headers']['Transfer-Encoding'] = 'chunked';
60 | }
61 | }
62 |
63 | // Add the expect header if needed.
64 | $this->addExpectHeader($request, $options, $modify);
65 |
66 | return $fn(Psr7\modify_request($request, $modify), $options);
67 | }
68 |
69 | /**
70 | * Add expect header
71 | *
72 | * @return void
73 | */
74 | private function addExpectHeader(
75 | RequestInterface $request,
76 | array $options,
77 | array &$modify
78 | ) {
79 | // Determine if the Expect header should be used
80 | if ($request->hasHeader('Expect')) {
81 | return;
82 | }
83 |
84 | $expect = isset($options['expect']) ? $options['expect'] : null;
85 |
86 | // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
87 | if ($expect === false || $request->getProtocolVersion() < 1.1) {
88 | return;
89 | }
90 |
91 | // The expect header is unconditionally enabled
92 | if ($expect === true) {
93 | $modify['set_headers']['Expect'] = '100-Continue';
94 | return;
95 | }
96 |
97 | // By default, send the expect header when the payload is > 1mb
98 | if ($expect === null) {
99 | $expect = 1048576;
100 | }
101 |
102 | // Always add if the body cannot be rewound, the size cannot be
103 | // determined, or the size is greater than the cutoff threshold
104 | $body = $request->getBody();
105 | $size = $body->getSize();
106 |
107 | if ($size === null || $size >= (int) $expect || !$body->isSeekable()) {
108 | $modify['set_headers']['Expect'] = '100-Continue';
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php:
--------------------------------------------------------------------------------
1 | decider = $decider;
41 | $this->nextHandler = $nextHandler;
42 | $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
43 | }
44 |
45 | /**
46 | * Default exponential backoff delay function.
47 | *
48 | * @param int $retries
49 | *
50 | * @return int milliseconds.
51 | */
52 | public static function exponentialDelay($retries)
53 | {
54 | return (int) pow(2, $retries - 1) * 1000;
55 | }
56 |
57 | /**
58 | * @param RequestInterface $request
59 | * @param array $options
60 | *
61 | * @return PromiseInterface
62 | */
63 | public function __invoke(RequestInterface $request, array $options)
64 | {
65 | if (!isset($options['retries'])) {
66 | $options['retries'] = 0;
67 | }
68 |
69 | $fn = $this->nextHandler;
70 | return $fn($request, $options)
71 | ->then(
72 | $this->onFulfilled($request, $options),
73 | $this->onRejected($request, $options)
74 | );
75 | }
76 |
77 | /**
78 | * Execute fulfilled closure
79 | *
80 | * @return mixed
81 | */
82 | private function onFulfilled(RequestInterface $req, array $options)
83 | {
84 | return function ($value) use ($req, $options) {
85 | if (!call_user_func(
86 | $this->decider,
87 | $options['retries'],
88 | $req,
89 | $value,
90 | null
91 | )) {
92 | return $value;
93 | }
94 | return $this->doRetry($req, $options, $value);
95 | };
96 | }
97 |
98 | /**
99 | * Execute rejected closure
100 | *
101 | * @return callable
102 | */
103 | private function onRejected(RequestInterface $req, array $options)
104 | {
105 | return function ($reason) use ($req, $options) {
106 | if (!call_user_func(
107 | $this->decider,
108 | $options['retries'],
109 | $req,
110 | null,
111 | $reason
112 | )) {
113 | return \GuzzleHttp\Promise\rejection_for($reason);
114 | }
115 | return $this->doRetry($req, $options);
116 | };
117 | }
118 |
119 | /**
120 | * @return self
121 | */
122 | private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
123 | {
124 | $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
125 |
126 | return $this($request, $options);
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/TransferStats.php:
--------------------------------------------------------------------------------
1 | request = $request;
35 | $this->response = $response;
36 | $this->transferTime = $transferTime;
37 | $this->handlerErrorData = $handlerErrorData;
38 | $this->handlerStats = $handlerStats;
39 | }
40 |
41 | /**
42 | * @return RequestInterface
43 | */
44 | public function getRequest()
45 | {
46 | return $this->request;
47 | }
48 |
49 | /**
50 | * Returns the response that was received (if any).
51 | *
52 | * @return ResponseInterface|null
53 | */
54 | public function getResponse()
55 | {
56 | return $this->response;
57 | }
58 |
59 | /**
60 | * Returns true if a response was received.
61 | *
62 | * @return bool
63 | */
64 | public function hasResponse()
65 | {
66 | return $this->response !== null;
67 | }
68 |
69 | /**
70 | * Gets handler specific error data.
71 | *
72 | * This might be an exception, a integer representing an error code, or
73 | * anything else. Relying on this value assumes that you know what handler
74 | * you are using.
75 | *
76 | * @return mixed
77 | */
78 | public function getHandlerErrorData()
79 | {
80 | return $this->handlerErrorData;
81 | }
82 |
83 | /**
84 | * Get the effective URI the request was sent to.
85 | *
86 | * @return UriInterface
87 | */
88 | public function getEffectiveUri()
89 | {
90 | return $this->request->getUri();
91 | }
92 |
93 | /**
94 | * Get the estimated time the request was being transferred by the handler.
95 | *
96 | * @return float|null Time in seconds.
97 | */
98 | public function getTransferTime()
99 | {
100 | return $this->transferTime;
101 | }
102 |
103 | /**
104 | * Gets an array of all of the handler specific transfer data.
105 | *
106 | * @return array
107 | */
108 | public function getHandlerStats()
109 | {
110 | return $this->handlerStats;
111 | }
112 |
113 | /**
114 | * Get a specific handler statistic from the handler by name.
115 | *
116 | * @param string $stat Handler specific transfer stat to retrieve.
117 | *
118 | * @return mixed|null
119 | */
120 | public function getHandlerStat($stat)
121 | {
122 | return isset($this->handlerStats[$stat])
123 | ? $this->handlerStats[$stat]
124 | : null;
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/functions_include.php:
--------------------------------------------------------------------------------
1 |
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.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/Makefile:
--------------------------------------------------------------------------------
1 | all: clean test
2 |
3 | test:
4 | vendor/bin/phpunit
5 |
6 | coverage:
7 | vendor/bin/phpunit --coverage-html=artifacts/coverage
8 |
9 | view-coverage:
10 | open artifacts/coverage/index.html
11 |
12 | clean:
13 | rm -rf artifacts/*
14 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/promises",
3 | "description": "Guzzle promises library",
4 | "keywords": ["promise"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "Michael Dowling",
9 | "email": "mtdowling@gmail.com",
10 | "homepage": "https://github.com/mtdowling"
11 | }
12 | ],
13 | "require": {
14 | "php": ">=5.5.0"
15 | },
16 | "require-dev": {
17 | "phpunit/phpunit": "^4.0"
18 | },
19 | "autoload": {
20 | "psr-4": {
21 | "GuzzleHttp\\Promise\\": "src/"
22 | },
23 | "files": ["src/functions_include.php"]
24 | },
25 | "scripts": {
26 | "test": "vendor/bin/phpunit",
27 | "test-ci": "vendor/bin/phpunit --coverage-text"
28 | },
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "1.4-dev"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/AggregateException.php:
--------------------------------------------------------------------------------
1 | value = $value;
22 | }
23 |
24 | public function then(
25 | callable $onFulfilled = null,
26 | callable $onRejected = null
27 | ) {
28 | // Return itself if there is no onFulfilled function.
29 | if (!$onFulfilled) {
30 | return $this;
31 | }
32 |
33 | $queue = queue();
34 | $p = new Promise([$queue, 'run']);
35 | $value = $this->value;
36 | $queue->add(static function () use ($p, $value, $onFulfilled) {
37 | if ($p->getState() === self::PENDING) {
38 | try {
39 | $p->resolve($onFulfilled($value));
40 | } catch (\Throwable $e) {
41 | $p->reject($e);
42 | } catch (\Exception $e) {
43 | $p->reject($e);
44 | }
45 | }
46 | });
47 |
48 | return $p;
49 | }
50 |
51 | public function otherwise(callable $onRejected)
52 | {
53 | return $this->then(null, $onRejected);
54 | }
55 |
56 | public function wait($unwrap = true, $defaultDelivery = null)
57 | {
58 | return $unwrap ? $this->value : null;
59 | }
60 |
61 | public function getState()
62 | {
63 | return self::FULFILLED;
64 | }
65 |
66 | public function resolve($value)
67 | {
68 | if ($value !== $this->value) {
69 | throw new \LogicException("Cannot resolve a fulfilled promise");
70 | }
71 | }
72 |
73 | public function reject($reason)
74 | {
75 | throw new \LogicException("Cannot reject a fulfilled promise");
76 | }
77 |
78 | public function cancel()
79 | {
80 | // pass
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/PromiseInterface.php:
--------------------------------------------------------------------------------
1 | reason = $reason;
22 | }
23 |
24 | public function then(
25 | callable $onFulfilled = null,
26 | callable $onRejected = null
27 | ) {
28 | // If there's no onRejected callback then just return self.
29 | if (!$onRejected) {
30 | return $this;
31 | }
32 |
33 | $queue = queue();
34 | $reason = $this->reason;
35 | $p = new Promise([$queue, 'run']);
36 | $queue->add(static function () use ($p, $reason, $onRejected) {
37 | if ($p->getState() === self::PENDING) {
38 | try {
39 | // Return a resolved promise if onRejected does not throw.
40 | $p->resolve($onRejected($reason));
41 | } catch (\Throwable $e) {
42 | // onRejected threw, so return a rejected promise.
43 | $p->reject($e);
44 | } catch (\Exception $e) {
45 | // onRejected threw, so return a rejected promise.
46 | $p->reject($e);
47 | }
48 | }
49 | });
50 |
51 | return $p;
52 | }
53 |
54 | public function otherwise(callable $onRejected)
55 | {
56 | return $this->then(null, $onRejected);
57 | }
58 |
59 | public function wait($unwrap = true, $defaultDelivery = null)
60 | {
61 | if ($unwrap) {
62 | throw exception_for($this->reason);
63 | }
64 | }
65 |
66 | public function getState()
67 | {
68 | return self::REJECTED;
69 | }
70 |
71 | public function resolve($value)
72 | {
73 | throw new \LogicException("Cannot resolve a rejected promise");
74 | }
75 |
76 | public function reject($reason)
77 | {
78 | if ($reason !== $this->reason) {
79 | throw new \LogicException("Cannot reject a rejected promise");
80 | }
81 | }
82 |
83 | public function cancel()
84 | {
85 | // pass
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/RejectionException.php:
--------------------------------------------------------------------------------
1 | reason = $reason;
21 |
22 | $message = 'The promise was rejected';
23 |
24 | if ($description) {
25 | $message .= ' with reason: ' . $description;
26 | } elseif (is_string($reason)
27 | || (is_object($reason) && method_exists($reason, '__toString'))
28 | ) {
29 | $message .= ' with reason: ' . $this->reason;
30 | } elseif ($reason instanceof \JsonSerializable) {
31 | $message .= ' with reason: '
32 | . json_encode($this->reason, JSON_PRETTY_PRINT);
33 | }
34 |
35 | parent::__construct($message);
36 | }
37 |
38 | /**
39 | * Returns the rejection reason.
40 | *
41 | * @return mixed
42 | */
43 | public function getReason()
44 | {
45 | return $this->reason;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/TaskQueue.php:
--------------------------------------------------------------------------------
1 | run();
12 | */
13 | class TaskQueue implements TaskQueueInterface
14 | {
15 | private $enableShutdown = true;
16 | private $queue = [];
17 |
18 | public function __construct($withShutdown = true)
19 | {
20 | if ($withShutdown) {
21 | register_shutdown_function(function () {
22 | if ($this->enableShutdown) {
23 | // Only run the tasks if an E_ERROR didn't occur.
24 | $err = error_get_last();
25 | if (!$err || ($err['type'] ^ E_ERROR)) {
26 | $this->run();
27 | }
28 | }
29 | });
30 | }
31 | }
32 |
33 | public function isEmpty()
34 | {
35 | return !$this->queue;
36 | }
37 |
38 | public function add(callable $task)
39 | {
40 | $this->queue[] = $task;
41 | }
42 |
43 | public function run()
44 | {
45 | /** @var callable $task */
46 | while ($task = array_shift($this->queue)) {
47 | $task();
48 | }
49 | }
50 |
51 | /**
52 | * The task queue will be run and exhausted by default when the process
53 | * exits IFF the exit is not the result of a PHP E_ERROR error.
54 | *
55 | * You can disable running the automatic shutdown of the queue by calling
56 | * this function. If you disable the task queue shutdown process, then you
57 | * MUST either run the task queue (as a result of running your event loop
58 | * or manually using the run() method) or wait on each outstanding promise.
59 | *
60 | * Note: This shutdown will occur before any destructors are triggered.
61 | */
62 | public function disableShutdown()
63 | {
64 | $this->enableShutdown = false;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/TaskQueueInterface.php:
--------------------------------------------------------------------------------
1 |
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.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/psr7",
3 | "type": "library",
4 | "description": "PSR-7 message implementation that also provides common utility methods",
5 | "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Michael Dowling",
10 | "email": "mtdowling@gmail.com",
11 | "homepage": "https://github.com/mtdowling"
12 | },
13 | {
14 | "name": "Tobias Schultze",
15 | "homepage": "https://github.com/Tobion"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.4.0",
20 | "psr/http-message": "~1.0",
21 | "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
22 | },
23 | "require-dev": {
24 | "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
25 | "ext-zlib": "*"
26 | },
27 | "provide": {
28 | "psr/http-message-implementation": "1.0"
29 | },
30 | "suggest": {
31 | "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
32 | },
33 | "autoload": {
34 | "psr-4": {
35 | "GuzzleHttp\\Psr7\\": "src/"
36 | },
37 | "files": ["src/functions_include.php"]
38 | },
39 | "autoload-dev": {
40 | "psr-4": {
41 | "GuzzleHttp\\Tests\\Psr7\\": "tests/"
42 | }
43 | },
44 | "extra": {
45 | "branch-alias": {
46 | "dev-master": "1.6-dev"
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/BufferStream.php:
--------------------------------------------------------------------------------
1 | hwm = $hwm;
29 | }
30 |
31 | public function __toString()
32 | {
33 | return $this->getContents();
34 | }
35 |
36 | public function getContents()
37 | {
38 | $buffer = $this->buffer;
39 | $this->buffer = '';
40 |
41 | return $buffer;
42 | }
43 |
44 | public function close()
45 | {
46 | $this->buffer = '';
47 | }
48 |
49 | public function detach()
50 | {
51 | $this->close();
52 | }
53 |
54 | public function getSize()
55 | {
56 | return strlen($this->buffer);
57 | }
58 |
59 | public function isReadable()
60 | {
61 | return true;
62 | }
63 |
64 | public function isWritable()
65 | {
66 | return true;
67 | }
68 |
69 | public function isSeekable()
70 | {
71 | return false;
72 | }
73 |
74 | public function rewind()
75 | {
76 | $this->seek(0);
77 | }
78 |
79 | public function seek($offset, $whence = SEEK_SET)
80 | {
81 | throw new \RuntimeException('Cannot seek a BufferStream');
82 | }
83 |
84 | public function eof()
85 | {
86 | return strlen($this->buffer) === 0;
87 | }
88 |
89 | public function tell()
90 | {
91 | throw new \RuntimeException('Cannot determine the position of a BufferStream');
92 | }
93 |
94 | /**
95 | * Reads data from the buffer.
96 | */
97 | public function read($length)
98 | {
99 | $currentLength = strlen($this->buffer);
100 |
101 | if ($length >= $currentLength) {
102 | // No need to slice the buffer because we don't have enough data.
103 | $result = $this->buffer;
104 | $this->buffer = '';
105 | } else {
106 | // Slice up the result to provide a subset of the buffer.
107 | $result = substr($this->buffer, 0, $length);
108 | $this->buffer = substr($this->buffer, $length);
109 | }
110 |
111 | return $result;
112 | }
113 |
114 | /**
115 | * Writes data to the buffer.
116 | */
117 | public function write($string)
118 | {
119 | $this->buffer .= $string;
120 |
121 | // TODO: What should happen here?
122 | if (strlen($this->buffer) >= $this->hwm) {
123 | return false;
124 | }
125 |
126 | return strlen($string);
127 | }
128 |
129 | public function getMetadata($key = null)
130 | {
131 | if ($key == 'hwm') {
132 | return $this->hwm;
133 | }
134 |
135 | return $key ? null : [];
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/DroppingStream.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
23 | $this->maxLength = $maxLength;
24 | }
25 |
26 | public function write($string)
27 | {
28 | $diff = $this->maxLength - $this->stream->getSize();
29 |
30 | // Begin returning 0 when the underlying stream is too large.
31 | if ($diff <= 0) {
32 | return 0;
33 | }
34 |
35 | // Write the stream or a subset of the stream if needed.
36 | if (strlen($string) < $diff) {
37 | return $this->stream->write($string);
38 | }
39 |
40 | return $this->stream->write(substr($string, 0, $diff));
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/InflateStream.php:
--------------------------------------------------------------------------------
1 | read(10);
25 | $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
26 | // Skip the header, that is 10 + length of filename + 1 (nil) bytes
27 | $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
28 | $resource = StreamWrapper::getResource($stream);
29 | stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
30 | $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
31 | }
32 |
33 | /**
34 | * @param StreamInterface $stream
35 | * @param $header
36 | * @return int
37 | */
38 | private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
39 | {
40 | $filename_header_length = 0;
41 |
42 | if (substr(bin2hex($header), 6, 2) === '08') {
43 | // we have a filename, read until nil
44 | $filename_header_length = 1;
45 | while ($stream->read(1) !== chr(0)) {
46 | $filename_header_length++;
47 | }
48 | }
49 |
50 | return $filename_header_length;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:
--------------------------------------------------------------------------------
1 | filename = $filename;
27 | $this->mode = $mode;
28 | }
29 |
30 | /**
31 | * Creates the underlying stream lazily when required.
32 | *
33 | * @return StreamInterface
34 | */
35 | protected function createStream()
36 | {
37 | return stream_for(try_fopen($this->filename, $this->mode));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/NoSeekStream.php:
--------------------------------------------------------------------------------
1 | assertMethod($method);
40 | if (!($uri instanceof UriInterface)) {
41 | $uri = new Uri($uri);
42 | }
43 |
44 | $this->method = strtoupper($method);
45 | $this->uri = $uri;
46 | $this->setHeaders($headers);
47 | $this->protocol = $version;
48 |
49 | if (!isset($this->headerNames['host'])) {
50 | $this->updateHostFromUri();
51 | }
52 |
53 | if ($body !== '' && $body !== null) {
54 | $this->stream = stream_for($body);
55 | }
56 | }
57 |
58 | public function getRequestTarget()
59 | {
60 | if ($this->requestTarget !== null) {
61 | return $this->requestTarget;
62 | }
63 |
64 | $target = $this->uri->getPath();
65 | if ($target == '') {
66 | $target = '/';
67 | }
68 | if ($this->uri->getQuery() != '') {
69 | $target .= '?' . $this->uri->getQuery();
70 | }
71 |
72 | return $target;
73 | }
74 |
75 | public function withRequestTarget($requestTarget)
76 | {
77 | if (preg_match('#\s#', $requestTarget)) {
78 | throw new InvalidArgumentException(
79 | 'Invalid request target provided; cannot contain whitespace'
80 | );
81 | }
82 |
83 | $new = clone $this;
84 | $new->requestTarget = $requestTarget;
85 | return $new;
86 | }
87 |
88 | public function getMethod()
89 | {
90 | return $this->method;
91 | }
92 |
93 | public function withMethod($method)
94 | {
95 | $this->assertMethod($method);
96 | $new = clone $this;
97 | $new->method = strtoupper($method);
98 | return $new;
99 | }
100 |
101 | public function getUri()
102 | {
103 | return $this->uri;
104 | }
105 |
106 | public function withUri(UriInterface $uri, $preserveHost = false)
107 | {
108 | if ($uri === $this->uri) {
109 | return $this;
110 | }
111 |
112 | $new = clone $this;
113 | $new->uri = $uri;
114 |
115 | if (!$preserveHost || !isset($this->headerNames['host'])) {
116 | $new->updateHostFromUri();
117 | }
118 |
119 | return $new;
120 | }
121 |
122 | private function updateHostFromUri()
123 | {
124 | $host = $this->uri->getHost();
125 |
126 | if ($host == '') {
127 | return;
128 | }
129 |
130 | if (($port = $this->uri->getPort()) !== null) {
131 | $host .= ':' . $port;
132 | }
133 |
134 | if (isset($this->headerNames['host'])) {
135 | $header = $this->headerNames['host'];
136 | } else {
137 | $header = 'Host';
138 | $this->headerNames['host'] = 'Host';
139 | }
140 | // Ensure Host is the first header.
141 | // See: http://tools.ietf.org/html/rfc7230#section-5.4
142 | $this->headers = [$header => [$host]] + $this->headers;
143 | }
144 |
145 | private function assertMethod($method)
146 | {
147 | if (!is_string($method) || $method === '') {
148 | throw new \InvalidArgumentException('Method must be a non-empty string.');
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/Rfc7230.php:
--------------------------------------------------------------------------------
1 | @,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
17 | const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
18 | }
19 |
20 | /**
21 | * Magic method used to create a new stream if streams are not added in
22 | * the constructor of a decorator (e.g., LazyOpenStream).
23 | *
24 | * @param string $name Name of the property (allows "stream" only).
25 | *
26 | * @return StreamInterface
27 | */
28 | public function __get($name)
29 | {
30 | if ($name == 'stream') {
31 | $this->stream = $this->createStream();
32 | return $this->stream;
33 | }
34 |
35 | throw new \UnexpectedValueException("$name not found on class");
36 | }
37 |
38 | public function __toString()
39 | {
40 | try {
41 | if ($this->isSeekable()) {
42 | $this->seek(0);
43 | }
44 | return $this->getContents();
45 | } catch (\Exception $e) {
46 | // Really, PHP? https://bugs.php.net/bug.php?id=53648
47 | trigger_error('StreamDecorator::__toString exception: '
48 | . (string) $e, E_USER_ERROR);
49 | return '';
50 | }
51 | }
52 |
53 | public function getContents()
54 | {
55 | return copy_to_string($this);
56 | }
57 |
58 | /**
59 | * Allow decorators to implement custom methods
60 | *
61 | * @param string $method Missing method name
62 | * @param array $args Method arguments
63 | *
64 | * @return mixed
65 | */
66 | public function __call($method, array $args)
67 | {
68 | $result = call_user_func_array([$this->stream, $method], $args);
69 |
70 | // Always return the wrapped object if the result is a return $this
71 | return $result === $this->stream ? $this : $result;
72 | }
73 |
74 | public function close()
75 | {
76 | $this->stream->close();
77 | }
78 |
79 | public function getMetadata($key = null)
80 | {
81 | return $this->stream->getMetadata($key);
82 | }
83 |
84 | public function detach()
85 | {
86 | return $this->stream->detach();
87 | }
88 |
89 | public function getSize()
90 | {
91 | return $this->stream->getSize();
92 | }
93 |
94 | public function eof()
95 | {
96 | return $this->stream->eof();
97 | }
98 |
99 | public function tell()
100 | {
101 | return $this->stream->tell();
102 | }
103 |
104 | public function isReadable()
105 | {
106 | return $this->stream->isReadable();
107 | }
108 |
109 | public function isWritable()
110 | {
111 | return $this->stream->isWritable();
112 | }
113 |
114 | public function isSeekable()
115 | {
116 | return $this->stream->isSeekable();
117 | }
118 |
119 | public function rewind()
120 | {
121 | $this->seek(0);
122 | }
123 |
124 | public function seek($offset, $whence = SEEK_SET)
125 | {
126 | $this->stream->seek($offset, $whence);
127 | }
128 |
129 | public function read($length)
130 | {
131 | return $this->stream->read($length);
132 | }
133 |
134 | public function write($string)
135 | {
136 | return $this->stream->write($string);
137 | }
138 |
139 | /**
140 | * Implement in subclasses to dynamically create streams when requested.
141 | *
142 | * @return StreamInterface
143 | * @throws \BadMethodCallException
144 | */
145 | protected function createStream()
146 | {
147 | throw new \BadMethodCallException('Not implemented');
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/StreamWrapper.php:
--------------------------------------------------------------------------------
1 | isReadable()) {
33 | $mode = $stream->isWritable() ? 'r+' : 'r';
34 | } elseif ($stream->isWritable()) {
35 | $mode = 'w';
36 | } else {
37 | throw new \InvalidArgumentException('The stream must be readable, '
38 | . 'writable, or both.');
39 | }
40 |
41 | return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
42 | }
43 |
44 | /**
45 | * Creates a stream context that can be used to open a stream as a php stream resource.
46 | *
47 | * @param StreamInterface $stream
48 | *
49 | * @return resource
50 | */
51 | public static function createStreamContext(StreamInterface $stream)
52 | {
53 | return stream_context_create([
54 | 'guzzle' => ['stream' => $stream]
55 | ]);
56 | }
57 |
58 | /**
59 | * Registers the stream wrapper if needed
60 | */
61 | public static function register()
62 | {
63 | if (!in_array('guzzle', stream_get_wrappers())) {
64 | stream_wrapper_register('guzzle', __CLASS__);
65 | }
66 | }
67 |
68 | public function stream_open($path, $mode, $options, &$opened_path)
69 | {
70 | $options = stream_context_get_options($this->context);
71 |
72 | if (!isset($options['guzzle']['stream'])) {
73 | return false;
74 | }
75 |
76 | $this->mode = $mode;
77 | $this->stream = $options['guzzle']['stream'];
78 |
79 | return true;
80 | }
81 |
82 | public function stream_read($count)
83 | {
84 | return $this->stream->read($count);
85 | }
86 |
87 | public function stream_write($data)
88 | {
89 | return (int) $this->stream->write($data);
90 | }
91 |
92 | public function stream_tell()
93 | {
94 | return $this->stream->tell();
95 | }
96 |
97 | public function stream_eof()
98 | {
99 | return $this->stream->eof();
100 | }
101 |
102 | public function stream_seek($offset, $whence)
103 | {
104 | $this->stream->seek($offset, $whence);
105 |
106 | return true;
107 | }
108 |
109 | public function stream_cast($cast_as)
110 | {
111 | $stream = clone($this->stream);
112 |
113 | return $stream->detach();
114 | }
115 |
116 | public function stream_stat()
117 | {
118 | static $modeMap = [
119 | 'r' => 33060,
120 | 'rb' => 33060,
121 | 'r+' => 33206,
122 | 'w' => 33188,
123 | 'wb' => 33188
124 | ];
125 |
126 | return [
127 | 'dev' => 0,
128 | 'ino' => 0,
129 | 'mode' => $modeMap[$this->mode],
130 | 'nlink' => 0,
131 | 'uid' => 0,
132 | 'gid' => 0,
133 | 'rdev' => 0,
134 | 'size' => $this->stream->getSize() ?: 0,
135 | 'atime' => 0,
136 | 'mtime' => 0,
137 | 'ctime' => 0,
138 | 'blksize' => 0,
139 | 'blocks' => 0
140 | ];
141 | }
142 |
143 | public function url_stat($path, $flags)
144 | {
145 | return [
146 | 'dev' => 0,
147 | 'ino' => 0,
148 | 'mode' => 0,
149 | 'nlink' => 0,
150 | 'uid' => 0,
151 | 'gid' => 0,
152 | 'rdev' => 0,
153 | 'size' => 0,
154 | 'atime' => 0,
155 | 'mtime' => 0,
156 | 'ctime' => 0,
157 | 'blksize' => 0,
158 | 'blocks' => 0
159 | ];
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/functions_include.php:
--------------------------------------------------------------------------------
1 | $d) {
18 | if ($i++ > 0) {
19 | print ", ";
20 | }
21 | print $d[0] . '=' . $d[1];
22 | }
23 | print "\n";
24 | print "params: " . implode(", ", $non_opts) . "\n";
25 | print "\n";
26 | }
27 |
28 | test("-abc", "abc");
29 | test("-abc foo", "abc");
30 | test("-abc foo", "abc:");
31 | test("-abc foo bar gazonk", "abc");
32 | test("-abc foo bar gazonk", "abc:");
33 | test("-a -b -c", "abc");
34 | test("-a -b -c", "abc:");
35 | test("-abc", "ab:c");
36 | test("-abc foo -bar gazonk", "abc");
37 | ?>
38 | --EXPECT--
39 | options: a=, b=, c=
40 | params:
41 |
42 | options: a=, b=, c=
43 | params: foo
44 |
45 | options: a=, b=, c=foo
46 | params:
47 |
48 | options: a=, b=, c=
49 | params: foo, bar, gazonk
50 |
51 | options: a=, b=, c=foo
52 | params: bar, gazonk
53 |
54 | options: a=, b=, c=
55 | params:
56 |
57 | Console_Getopt: option requires an argument --c
58 |
59 | options: a=, b=c
60 | params:
61 |
62 | options: a=, b=, c=
63 | params: foo, -bar, gazonk
64 |
--------------------------------------------------------------------------------
/vendor/pear/console_getopt/tests/bug10557.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Console_Getopt [bug 10557]
3 | --SKIPIF--
4 | --FILE--
5 | getMessage()."\n";
14 | echo 'FATAL';
15 | exit;
16 | }
17 |
18 | print_r($ret);
19 | ?>
20 | --EXPECT--
21 | Console_Getopt: option requires an argument --to
22 | FATAL
--------------------------------------------------------------------------------
/vendor/pear/console_getopt/tests/bug11068.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Console_Getopt [bug 11068]
3 | --SKIPIF--
4 | --FILE--
5 | getMessage()."\n";
14 | echo 'FATAL';
15 | exit;
16 | }
17 |
18 | print_r($ret);
19 | ?>
20 | --EXPECT--
21 | Array
22 | (
23 | [0] => Array
24 | (
25 | [0] => Array
26 | (
27 | [0] => f
28 | [1] => jjohnston@mail.com
29 | )
30 |
31 | [1] => Array
32 | (
33 | [0] => --to
34 | [1] => hi
35 | )
36 |
37 | )
38 |
39 | [1] => Array
40 | (
41 | [0] => -
42 | )
43 |
44 | )
--------------------------------------------------------------------------------
/vendor/pear/console_getopt/tests/bug13140.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Console_Getopt [bug 13140]
3 | --SKIPIF--
4 | --FILE--
5 | getopt2($cg->readPHPArgv(), 't', array('test'), true));
13 | print_r($cg->getopt2($cg->readPHPArgv(), 'bar', array('foo'), true));
14 | ?>
15 | --EXPECT--
16 | Array
17 | (
18 | [0] => Array
19 | (
20 | [0] => Array
21 | (
22 | [0] => --test
23 | [1] =>
24 | )
25 |
26 | )
27 |
28 | [1] => Array
29 | (
30 | [0] => thisshouldbehere
31 | )
32 |
33 | )
34 | Array
35 | (
36 | [0] => Array
37 | (
38 | [0] => Array
39 | (
40 | [0] => --foo
41 | [1] =>
42 | )
43 |
44 | [1] => Array
45 | (
46 | [0] => b
47 | [1] =>
48 | )
49 |
50 | [2] => Array
51 | (
52 | [0] => a
53 | [1] =>
54 | )
55 |
56 | [3] => Array
57 | (
58 | [0] => r
59 | [1] =>
60 | )
61 |
62 | [4] => Array
63 | (
64 | [0] => r
65 | [1] =>
66 | )
67 |
68 | )
69 |
70 | [1] => Array
71 | (
72 | [0] => thisshouldbehere
73 | )
74 |
75 | )
76 |
--------------------------------------------------------------------------------
/vendor/pear/mail/.gitignore:
--------------------------------------------------------------------------------
1 | # composer related
2 | composer.lock
3 | composer.phar
4 | vendor
5 |
--------------------------------------------------------------------------------
/vendor/pear/mail/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | sudo: false
3 | php:
4 | - 5.4
5 | - 5.5
6 | - 5.6
7 | - 7.0
8 | - 7.1
9 | - nightly
10 | install:
11 | - pear list
12 | - pear channel-update pear.php.net
13 | - pear upgrade --force pear/pear
14 | - pear list
15 | - pear upgrade --force xml_util
16 | - pear install --force --alldeps package.xml
17 | - pear list
18 | script:
19 | - pear run-tests -d tests/
20 |
--------------------------------------------------------------------------------
/vendor/pear/mail/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 1997-2017, Chuck Hagenbuch
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 |
15 | 3. Neither the name of the copyright holder nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/vendor/pear/mail/Mail/null.php:
--------------------------------------------------------------------------------
1 |
42 | * @copyright 2010-2017 Phil Kernick
43 | * @license http://opensource.org/licenses/BSD-3-Clause New BSD License
44 | * @version CVS: $Id$
45 | * @link http://pear.php.net/package/Mail/
46 | */
47 |
48 | /**
49 | * Null implementation of the PEAR Mail:: interface.
50 | * @access public
51 | * @package Mail
52 | * @version $Revision$
53 | */
54 | class Mail_null extends Mail {
55 |
56 | /**
57 | * Implements Mail_null::send() function. Silently discards all
58 | * mail.
59 | *
60 | * @param mixed $recipients Either a comma-seperated list of recipients
61 | * (RFC822 compliant), or an array of recipients,
62 | * each RFC822 valid. This may contain recipients not
63 | * specified in the headers, for Bcc:, resending
64 | * messages, etc.
65 | *
66 | * @param array $headers The array of headers to send with the mail, in an
67 | * associative array, where the array key is the
68 | * header name (ie, 'Subject'), and the array value
69 | * is the header value (ie, 'test'). The header
70 | * produced from those values would be 'Subject:
71 | * test'.
72 | *
73 | * @param string $body The full text of the message body, including any
74 | * Mime parts, etc.
75 | *
76 | * @return mixed Returns true on success, or a PEAR_Error
77 | * containing a descriptive error message on
78 | * failure.
79 | */
80 | public function send($recipients, $headers, $body)
81 | {
82 | return true;
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/vendor/pear/mail/README.rst:
--------------------------------------------------------------------------------
1 | ****
2 | Mail
3 | ****
4 | Class that provides multiple interfaces for sending emails.
5 |
6 | PEAR's Mail package defines an interface for implementing mailers under the
7 | PEAR hierarchy.
8 | It also provides supporting functions useful to multiple mailer backends.
9 |
10 | Currently supported backends include:
11 |
12 | - PHP's native ``mail()`` function
13 | - sendmail
14 | - SMTP
15 |
16 | This package also provides a `RFC 822`__ email address list validation utility class.
17 |
18 | Use Mail in combination with `Mail_Mime`__ to send HTML emails or emails with
19 | attachments - have a look at the example__.
20 |
21 | __ https://tools.ietf.org/html/rfc822
22 | __ http://pear.php.net/package/Mail_Mime
23 | __ http://pear.php.net/manual/en/package.mail.mail-mime.example.php
24 |
25 | ============
26 | Installation
27 | ============
28 |
29 | PEAR
30 | ====
31 | ::
32 |
33 | $ pear install mail
34 |
35 | Composer
36 | ========
37 | ::
38 |
39 | $ composer require pear/mail
40 |
41 | =====
42 | Links
43 | =====
44 | Homepage
45 | http://pear.php.net/package/Mail
46 | Source code
47 | https://github.com/pear/Mail
48 | Issue tracker
49 | http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Mail
50 | Unit test status
51 | https://travis-ci.org/pear/Mail
52 | Packagist
53 | https://packagist.org/packages/pear/mail
54 |
--------------------------------------------------------------------------------
/vendor/pear/mail/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "authors": [
3 | {
4 | "email": "chuck@horde.org",
5 | "name": "Chuck Hagenbuch",
6 | "role": "Lead"
7 | },
8 | {
9 | "email": "richard@phpguru.org",
10 | "name": "Richard Heyes",
11 | "role": "Developer"
12 | },
13 | {
14 | "email": "alec@alec.pl",
15 | "name": "Aleksander Machniak",
16 | "role": "Developer"
17 | }
18 | ],
19 | "autoload": {
20 | "psr-0": {
21 | "Mail": "./"
22 | }
23 | },
24 | "description": "Class that provides multiple interfaces for sending emails.",
25 | "homepage": "http://pear.php.net/package/Mail",
26 | "include-path": [
27 | "./"
28 | ],
29 | "license": "BSD-2-Clause",
30 | "name": "pear/mail",
31 | "support": {
32 | "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Mail",
33 | "source": "https://github.com/pear/Mail"
34 | },
35 | "type": "library",
36 | "require": {
37 | "php": ">=5.2.1",
38 | "pear/pear-core-minimal": "~1.9"
39 | },
40 | "require-dev": {
41 | "pear/pear": "*"
42 | },
43 | "suggest": {
44 | "pear/net_smtp": "Install optionally via your project's composer.json"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/pear/mail/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Mail
4 | pear.php.net
5 | Class that provides multiple interfaces for sending emails
6 | PEAR's Mail package defines an interface for implementing mailers under the PEAR hierarchy. It also provides supporting functions useful to multiple mailer backends. Currently supported backends include: PHP's native mail() function, sendmail, and SMTP. This package also provides a RFC822 email address list validation utility class.
7 |
8 | Chuck Hagenbuch
9 | chagenbu
10 | chuck@horde.org
11 | no
12 |
13 |
14 | Richard Heyes
15 | richard
16 | richard@phpguru.org
17 | no
18 |
19 |
20 | Aleksander Machniak
21 | alec
22 | alec@alec.pl
23 | yes
24 |
25 | 2017-04-11
26 |
27 | 1.4.1
28 | 1.3.0
29 |
30 |
31 | stable
32 | stable
33 |
34 | New BSD License
35 |
36 | * Loosen recognition of "queued as" server response (PR #10)
37 |
38 | * Bug #20463: domain-literal parsing error
39 | * Bug #20513: Mail_smtp::send() doesn't close socket for smtp connection
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 5.2.1
65 |
66 |
67 | 1.5.6
68 |
69 |
70 |
71 |
72 | Net_SMTP
73 | pear.php.net
74 | 1.4.1
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/13659.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Mail: Test for bug #13659
3 | --FILE--
4 | (test)';
10 | $parser = new Mail_RFC822();
11 | $result = $parser->parseAddressList($address, 'anydomain.com', TRUE);
12 |
13 | if (!PEAR::isError($result) && is_array($result) && is_object($result[0]))
14 | if ($result[0]->personal == '"Test Student"' &&
15 | $result[0]->mailbox == "test" &&
16 | $result[0]->host == "mydomain.com" &&
17 | is_array($result[0]->comment) && $result[0]->comment[0] == 'test')
18 | {
19 | print("OK");
20 | }
21 |
22 |
23 | ?>
24 | --EXPECT--
25 | OK
26 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/9137.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Mail: Test for bug #9137
3 | --FILE--
4 | 'John Doe', 'email' => 'test@example.com'),
11 | array('name' => 'John Doe\\', 'email' => 'test@example.com'),
12 | array('name' => 'John "Doe', 'email' => 'test@example.com'),
13 | array('name' => 'John "Doe\\', 'email' => 'test@example.com'),
14 | );
15 |
16 | for ($i = 0; $i < count($addresses); $i++) {
17 | // construct the address
18 | $address = "\"" . addslashes($addresses[$i]['name']) . "\" ".
19 | "<".$addresses[$i]['email'].">";
20 |
21 | $parsedAddresses = Mail_RFC822::parseAddressList($address);
22 | if (is_a($parsedAddresses, 'PEAR_Error')) {
23 | echo $address." :: Failed to validate\n";
24 | } else {
25 | echo $address." :: Parsed\n";
26 | }
27 | }
28 |
29 | --EXPECT--
30 | "John Doe" :: Parsed
31 | "John Doe\\" :: Parsed
32 | "John \"Doe" :: Parsed
33 | "John \"Doe\\" :: Parsed
34 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/9137_2.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Mail: Test for bug #9137, take 2
3 | --FILE--
4 | '"John Doe" '),
11 | array('raw' => '"John Doe' . chr(92) . '" '),
12 | array('raw' => '"John Doe' . chr(92) . chr(92) . '" '),
13 | array('raw' => '"John Doe' . chr(92) . chr(92) . chr(92) . '" '),
14 | array('raw' => '"John Doe' . chr(92) . chr(92) . chr(92) . chr(92) . '" '),
15 | array('raw' => '"John Doe '),
16 | );
17 |
18 | for ($i = 0; $i < count($addresses); $i++) {
19 | // construct the address
20 | $address = $addresses[$i]['raw'];
21 | $parsedAddresses = Mail_RFC822::parseAddressList($address);
22 | if (PEAR::isError($parsedAddresses)) {
23 | echo $address." :: Failed to validate\n";
24 | } else {
25 | echo $address." :: Parsed\n";
26 | }
27 | }
28 |
29 | --EXPECT--
30 | "John Doe" :: Parsed
31 | "John Doe\" :: Failed to validate
32 | "John Doe\\" :: Parsed
33 | "John Doe\\\" :: Failed to validate
34 | "John Doe\\\\" :: Parsed
35 | "John Doe :: Failed to validate
36 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/Makefile:
--------------------------------------------------------------------------------
1 |
2 | clean:
3 | rm -f *.log *.php *.diff *.exp *.out
4 |
5 |
6 |
7 | test:
8 | cd .. && pear run-tests tests/*.phpt && cd tests;
9 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/bug17178.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Mail_RFC822::parseAddressList does not accept RFC-valid group syntax
3 | --FILE--
4 | parseAddressList($address, null, true, true));
12 |
13 | /* Address groups. */
14 | $address = 'My Group: "Richard" (A comment), ted@example.com (Ted Bloggs), Barney;';
15 | print_r($parser->parseAddressList($address, null, true, true));
16 |
17 | /* A valid address with spaces in the local part. */
18 | $address = '<"Jon Parise"@php.net>';
19 | print_r($parser->parseAddressList($address, null, true, true));
20 |
21 | /* An invalid address with spaces in the local part. */
22 | $address = '';
23 | $result = $parser->parseAddressList($address, null, true, true);
24 | if (is_a($result, 'PEAR_Error')) echo $result->getMessage() . "\n";
25 |
26 | /* A valid address with an uncommon TLD. */
27 | $address = 'jon@host.longtld';
28 | $result = $parser->parseAddressList($address, null, true, true);
29 | if (is_a($result, 'PEAR_Error')) echo $result->getMessage() . "\n";
30 |
31 | --EXPECT--
32 | Array
33 | (
34 | [0] => stdClass Object
35 | (
36 | [personal] =>
37 | [comment] => Array
38 | (
39 | )
40 |
41 | [mailbox] => user
42 | [host] => example.com
43 | )
44 |
45 | )
46 | Array
47 | (
48 | [0] => stdClass Object
49 | (
50 | [groupname] => My Group
51 | [addresses] => Array
52 | (
53 | [0] => stdClass Object
54 | (
55 | [personal] => "Richard"
56 | [comment] => Array
57 | (
58 | [0] => A comment
59 | )
60 |
61 | [mailbox] => richard
62 | [host] => localhost
63 | )
64 |
65 | [1] => stdClass Object
66 | (
67 | [personal] =>
68 | [comment] => Array
69 | (
70 | [0] => Ted Bloggs
71 | )
72 |
73 | [mailbox] => ted
74 | [host] => example.com
75 | )
76 |
77 | [2] => stdClass Object
78 | (
79 | [personal] =>
80 | [comment] => Array
81 | (
82 | )
83 |
84 | [mailbox] => Barney
85 | [host] => localhost
86 | )
87 |
88 | )
89 |
90 | )
91 |
92 | )
93 | Array
94 | (
95 | [0] => stdClass Object
96 | (
97 | [personal] =>
98 | [comment] => Array
99 | (
100 | )
101 |
102 | [mailbox] => "Jon Parise"
103 | [host] => php.net
104 | )
105 |
106 | )
107 | Validation failed for:
108 |
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/smtp_error.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Mail: SMTP Error Reporting
3 | --SKIPIF--
4 | packageExists('Net_SMTP')) die("skip\n");
10 | --FILE--
11 | 'bogus.host.tld');
16 |
17 | /* Create our SMTP-based mailer object. */
18 | $mailer = Mail::factory('smtp', $params);
19 |
20 | /* Attempt to send an empty message in order to trigger an error. */
21 | $e = $mailer->send(array(), array(), '');
22 | if (is_a($e, 'PEAR_Error')) {
23 | $err = $e->getMessage();
24 | if (preg_match('/Failed to connect to bogus.host.tld:25 \[SMTP: Failed to connect socket:.*/i', $err)) {
25 | echo "OK";
26 | }
27 | }
28 |
29 | --EXPECT--
30 | OK
--------------------------------------------------------------------------------
/vendor/pear/mail/tests/validateQuotedString.php:
--------------------------------------------------------------------------------
1 | , postmaster@example.com, root';
4 | // $address_string = "Joe Doe from Somewhere , postmaster@example.com, root";
5 | echo $address_string . "\n";
6 |
7 | $address_array = Mail_RFC822::parseAddressList($address_string, "example.com");
8 | if (!is_array($address_array) || count($address_array) < 1) {
9 | die("something is wrong\n");
10 | }
11 |
12 | foreach ($address_array as $val) {
13 | echo "mailbox : " . $val->mailbox . "\n";
14 | echo "host : " . $val->host . "\n";
15 | echo "personal: " . $val->personal . "\n";
16 | }
17 | print_r($address_array);
18 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Net_SMTP-*.tgz
3 |
4 | # Tests
5 | run-tests.log
6 | /tests/*.diff
7 | /tests/*.exp
8 | /tests/*.log
9 | /tests/*.out
10 | /tests/config.php
11 |
12 | # composer related
13 | composer.lock
14 | composer.phar
15 | vendor
16 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | branches:
3 | only:
4 | - "master"
5 | sudo: false
6 | php:
7 | - 5.6
8 | - 7.0
9 | - 7.1
10 | - 7.2
11 | - 7.3
12 | install:
13 | - pear channel-update pear.php.net
14 | - pear list
15 | - pear upgrade --force pear/pear
16 | - pear list
17 | - pear install package.xml
18 | - pear list
19 | script:
20 | - pear run-tests -d tests/
21 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2002-2017 Jon Parise and Chuck Hagenbuch.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution..
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/README.rst:
--------------------------------------------------------------------------------
1 | docs/guide.txt
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "authors": [
3 | {
4 | "email": "jon@php.net",
5 | "name": "Jon Parise",
6 | "homepage": "https://www.indelible.org",
7 | "role": "Lead"
8 | },
9 | {
10 | "email": "chuck@horde.org",
11 | "name": "Chuck Hagenbuch",
12 | "role": "Lead"
13 | }
14 | ],
15 | "autoload": {
16 | "psr-0": {
17 | "Net": "./"
18 | }
19 | },
20 | "description": "An implementation of the SMTP protocol",
21 | "keywords": [
22 | "smtp",
23 | "mail",
24 | "email"
25 | ],
26 | "include-path": [
27 | "./"
28 | ],
29 | "license": "BSD-2-Clause",
30 | "name": "pear/net_smtp",
31 | "homepage": "https://pear.github.io/Net_SMTP/",
32 | "support": {
33 | "issues": "https://github.com/pear/Net_SMTP/issues",
34 | "source": "https://github.com/pear/Net_SMTP"
35 | },
36 | "type": "library",
37 | "require": {
38 | "php": ">=5.4.0",
39 | "pear/pear-core-minimal": "@stable",
40 | "pear/net_socket": "@stable"
41 | },
42 | "require-dev": {
43 | "phpunit/phpunit": "*"
44 | },
45 | "suggest": {
46 | "pear/auth_sasl": "Install optionally via your project's composer.json"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/docs/docutils.conf:
--------------------------------------------------------------------------------
1 | [general]
2 | source-link: no
3 | no-datestamp: yes
4 | generator: off
5 | strip-comments: yes
6 | toc-backlinks: no
7 |
8 | [standalone reader]
9 | docinfo_xform: no
10 |
11 | [html4css1 writer]
12 | stylesheet-path: docutils.css
13 | embed-stylesheet: yes
14 | field-name-limit: 20
15 | cloak-email-addresses: yes
16 | initial-header-level: 2
17 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/docs/docutils.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Verdana, Helvetica, Arial, sans-serif;
3 | font-size: 0.8em;
4 | letter-spacing: 0.01em;
5 | line-height: 1.5em;
6 | text-align: justify;
7 | margin: 0 auto;
8 | width: 48em;
9 | }
10 |
11 | a:link, a:visited {
12 | color: #00c;
13 | padding-bottom: 0;
14 | text-decoration: none;
15 | border-bottom: 1px solid #dbd5c5;
16 | }
17 |
18 | a:hover {
19 | padding-bottom: 0;
20 | border-bottom: 2px solid #dbd5c5;
21 | }
22 |
23 | h1, h2, h3 {
24 | font-family: Georgia, "Times New Roman", Times, serif;
25 | font-weight: normal;
26 | line-height: normal;
27 | }
28 |
29 | h1 {
30 | font-size: 2.1em;
31 | letter-spacing: -0.02em;
32 | margin-top: 30px;
33 | text-align: center;
34 | }
35 |
36 | h2 {
37 | font-size: 1.6em;
38 | font-style: italic;
39 | margin: 30px 0 10px 0;
40 | }
41 |
42 | h3 {
43 | font-size: 1.3em;
44 | font-style: italic;
45 | margin-top: 20px;
46 | }
47 |
48 | li {
49 | line-height: 135%;
50 | }
51 |
52 | ul, ol {
53 | margin: 0 0 1em 2em;
54 | padding: 0 0 0 1em;
55 | }
56 |
57 | hr {
58 | background-color: #ccc;
59 | border: 0px none;
60 | color: #eee;
61 | height: 1px;
62 | margin: 30px 0px;
63 | }
64 |
65 | blockquote, pre {
66 | background-color: #f9f9f9;
67 | border: 1px solid #eee;
68 | border-left: 2px solid #ccc;
69 | padding: 1em;
70 | }
71 |
72 | blockquote {
73 | color: #666;
74 | line-height: 1.3em;
75 | }
76 |
77 | pre {
78 | line-height: normal;
79 | overflow: auto;
80 | }
81 |
82 | pre.code-block {
83 | padding-bottom: 0;
84 | }
85 |
86 | tt, pre, code, samp, kbd {
87 | color: #333;
88 | font-family: Consolas, 'Lucida Console', monospace;
89 | font-size: 13px;
90 | }
91 |
92 | label em {
93 | font-weight: normal;
94 | }
95 |
96 | form {
97 | margin: 0;
98 | padding: 0;
99 | }
100 |
101 | .code-block .err { border: 1px solid #FF0000 } /* Error */
102 | .code-block .k,.kn { color: #369 } /* Keywords */
103 | .code-block .c,.cm,.cp,.c1 { color: #666; font-style: italic } /* Comments */
104 | .code-block .n { color: #000 } /* Names */
105 | .code-block .p { color: #000 } /* Punctuation */
106 | .code-block .nc,.nf,.nn { color: #333; font-weight: bold } /* Symbol Names */
107 | .code-block .s { color: #933 } /* Literal.String */
108 | .code-block .sd { color: #666 } /* Literal.String.Doc */
109 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/examples/basic.php:
--------------------------------------------------------------------------------
1 | connect())) {
18 | die($e->getMessage() . "\n");
19 | }
20 | $smtp->auth('username','password');
21 | /* Send the 'MAIL FROM:' SMTP command. */
22 | if (PEAR::isError($smtp->mailFrom($from))) {
23 | die("Unable to set sender to <$from>\n");
24 | }
25 |
26 | /* Address the message to each of the recipients. */
27 | foreach ($rcpt as $to) {
28 | if (PEAR::isError($res = $smtp->rcptTo($to))) {
29 | die("Unable to add recipient <$to>: " . $res->getMessage() . "\n");
30 | }
31 | }
32 |
33 | /* Set the body of the message. */
34 | if (PEAR::isError($smtp->data($subj . "\r\n" . $body))) {
35 | die("Unable to send data\n");
36 | }
37 |
38 | /* Disconnect from the SMTP server. */
39 | $smtp->disconnect();
40 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Net_SMTP
4 | pear.php.net
5 | An implementation of the SMTP protocol
6 | Provides an implementation of the SMTP protocol using PEAR's Net_Socket class.
7 |
8 | Jon Parise
9 | jon
10 | jon@php.net
11 | yes
12 |
13 |
14 | Chuck Hagenbuch
15 | chagenbu
16 | chuck@horde.org
17 | yes
18 |
19 | 2019-11-30
20 |
21 | 1.9.0
22 | 1.3.0
23 |
24 |
25 | stable
26 | stable
27 |
28 | BSD-2-Clause
29 |
30 | * Added support for the XOAUTH2 authentication method
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | 5.4.0
54 |
55 |
56 | 1.10.1
57 |
58 |
59 | Net_Socket
60 | pear.php.net
61 | 1.0.7
62 |
63 |
64 |
65 |
66 | Auth_SASL
67 | pear.php.net
68 | 1.0.5
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/phpdoc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | phpdoc -f Net/SMTP.php -t docs/api -p -ti "Net_SMTP Package API" -dn Net_SMTP -dc Net_SMTP -ed examples
4 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/tests/auth.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Net_SMTP: SMTP Authentication
3 | --SKIPIF--
4 | connect())) {
16 | die($e->getMessage() . "\n");
17 | }
18 |
19 | if (PEAR::isError($e = $smtp->auth(TEST_AUTH_USER, TEST_AUTH_PASS))) {
20 | die("Authentication failure\n");
21 | }
22 |
23 | $smtp->disconnect();
24 |
25 | echo 'Success!';
26 |
27 | --EXPECT--
28 | Success!
29 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/tests/basic.phpt:
--------------------------------------------------------------------------------
1 | --TEST--
2 | Net_SMTP: Basic Functionality
3 | --SKIPIF--
4 | connect())) {
16 | die($e->getMessage() . "\n");
17 | }
18 |
19 | if (PEAR::isError($e = $smtp->auth(TEST_AUTH_USER, TEST_AUTH_PASS))) {
20 | die("Authentication failure\n");
21 | }
22 |
23 | if (PEAR::isError($smtp->mailFrom(TEST_FROM))) {
24 | die('Unable to set sender to <' . TEST_FROM . ">\n");
25 | }
26 |
27 | if (PEAR::isError($res = $smtp->rcptTo(TEST_TO))) {
28 | die('Unable to add recipient <' . TEST_TO . '>: ' .
29 | $res->getMessage() . "\n");
30 | }
31 |
32 | $headers = 'Subject: ' . TEST_SUBJECT;
33 | if (PEAR::isError($smtp->data(TEST_BODY, $headers))) {
34 | die("Unable to send data\n");
35 | }
36 |
37 | $smtp->disconnect();
38 |
39 | echo 'Success!';
40 |
41 | --EXPECT--
42 | Success!
43 |
--------------------------------------------------------------------------------
/vendor/pear/net_smtp/tests/config.php.dist:
--------------------------------------------------------------------------------
1 | "\r\n",
11 | "\r\n" => "\r\n",
12 | "\nxx" => "\r\nxx",
13 | "xx\n" => "xx\r\n",
14 | "xx\nxx" => "xx\r\nxx",
15 | "\n\nxx" => "\r\n\r\nxx",
16 | "xx\n\nxx" => "xx\r\n\r\nxx",
17 | "xx\n\n" => "xx\r\n\r\n",
18 | "\r\nxx" => "\r\nxx",
19 | "xx\r\n" => "xx\r\n",
20 | "xx\r\nxx" => "xx\r\nxx",
21 | "\r\n\r\nxx" => "\r\n\r\nxx",
22 | "xx\r\n\r\nxx" => "xx\r\n\r\nxx",
23 | "xx\r\n\r\n" => "xx\r\n\r\n",
24 | "\r\n\nxx" => "\r\n\r\nxx",
25 | "\n\r\nxx" => "\r\n\r\nxx",
26 | "xx\r\n\nxx" => "xx\r\n\r\nxx",
27 | "xx\n\r\nxx" => "xx\r\n\r\nxx",
28 | "xx\r\n\n" => "xx\r\n\r\n",
29 | "xx\n\r\n" => "xx\r\n\r\n",
30 | "\r" => "\r\n",
31 | "\rxx" => "\r\nxx",
32 | "xx\rxx" => "xx\r\nxx",
33 | "xx\r" => "xx\r\n",
34 | "\r\r" => "\r\n\r\n",
35 | "\r\rxx" => "\r\n\r\nxx",
36 | "xx\r\rxx" => "xx\r\n\r\nxx",
37 | "xx\r\r" => "xx\r\n\r\n",
38 | "xx\rxx\nxx\r\nxx" => "xx\r\nxx\r\nxx\r\nxx",
39 | "\r\r\n\n" => "\r\n\r\n\r\n",
40 |
41 | /* Dots */
42 | "." => "..",
43 | "xxx\n." => "xxx\r\n..",
44 | "xxx\n.\nxxx" => "xxx\r\n..\r\nxxx",
45 | "xxx.\n.xxx" => "xxx.\r\n..xxx",
46 | );
47 |
48 | function literal($x)
49 | {
50 | return str_replace(array("\r", "\n"), array('\r', '\n'), $x);
51 | }
52 |
53 | $smtp = new Net_SMTP();
54 | $error = false;
55 | foreach ($tests as $input => $expected) {
56 | $output = $input;
57 | $smtp->quotedata($output);
58 | if ($output != $expected) {
59 | printf("Error: '%s' => '%s' (expected: '%s')",
60 | literal($input), literal($output), literal($expected));
61 | $error = true;
62 | }
63 | }
64 |
65 | if (!$error) {
66 | echo "success\n";
67 | }
68 |
69 | --EXPECT--
70 | success
71 |
--------------------------------------------------------------------------------
/vendor/pear/net_socket/.gitignore:
--------------------------------------------------------------------------------
1 | # composer related
2 | composer.lock
3 | composer.phar
4 | vendor
5 |
--------------------------------------------------------------------------------
/vendor/pear/net_socket/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | install:
3 | - pear install package.xml
4 | php:
5 | - 5.4
6 | script: pear package
--------------------------------------------------------------------------------
/vendor/pear/net_socket/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "authors": [
3 | {
4 | "email": "chuck@horde.org",
5 | "name": "Chuck Hagenbuch",
6 | "role": "Lead"
7 | },
8 | {
9 | "email": "stig@php.net",
10 | "name": "Stig Bakken",
11 | "role": "Lead"
12 | },
13 | {
14 | "email": "alec@php.net",
15 | "name": "Aleksander Machniak",
16 | "role": "Lead"
17 | }
18 | ],
19 | "autoload": {
20 | "psr-0": {
21 | "Net": "./"
22 | }
23 | },
24 | "description": "More info available on: http://pear.php.net/package/Net_Socket",
25 | "include-path": [
26 | "./"
27 | ],
28 | "license": "PHP License",
29 | "name": "pear/net_socket",
30 | "support": {
31 | "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Net_Socket",
32 | "source": "https://github.com/pear/Net_Socket"
33 | },
34 | "type": "library",
35 | "require": {
36 | "pear/pear_exception": "*"
37 | },
38 | "require-dev": {
39 | "phpunit/phpunit": "*"
40 | }
41 | }
--------------------------------------------------------------------------------
/vendor/pear/net_socket/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Net_Socket
4 | pear.php.net
5 | Network Socket Interface
6 | Net_Socket is a class interface to TCP sockets. It provides blocking
7 | and non-blocking operation, with different reading and writing modes
8 | (byte-wise, block-wise, line-wise and special formats like network
9 | byte-order ip addresses).
10 |
11 | Chuck Hagenbuch
12 | chagenbu
13 | chuck@horde.org
14 | yes
15 |
16 |
17 | Stig Bakken
18 | ssb
19 | stig@php.net
20 | no
21 |
22 |
23 | Aleksander Machniak
24 | alec
25 | alec@php.net
26 | yes
27 |
28 | 2013-05-24
29 |
30 |
31 | 1.0.14
32 | 1.0.10
33 |
34 |
35 | stable
36 | stable
37 |
38 | PHP License
39 |
40 | - Fix connecting when host is specified with protocol prefix e.g. ssl://
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 4.3.0
51 |
52 |
53 | 1.4.0b1
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/vendor/pear/pear-core-minimal/README.rst:
--------------------------------------------------------------------------------
1 | ******************************
2 | Minimal set of PEAR core files
3 | ******************************
4 |
5 | This repository provides a set of files from ``pear-core``
6 | that are often used in PEAR packages.
7 |
8 | It follows the `pear-core`__ repository and gets updated whenever a new
9 | PEAR version is released.
10 |
11 | It's meant to be used as dependency for composer packages.
12 |
13 | __ https://github.com/pear/pear-core
14 |
15 | ==============
16 | Included files
17 | ==============
18 | - ``OS/Guess.php``
19 | - ``PEAR.php``
20 | - ``PEAR/Error.php``
21 | - ``PEAR/ErrorStack.php``
22 | - ``System.php``
23 |
24 |
25 | ``PEAR/Error.php`` is a dummy file that only includes ``PEAR.php``,
26 | to make autoloaders work without problems.
27 |
--------------------------------------------------------------------------------
/vendor/pear/pear-core-minimal/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pear/pear-core-minimal",
3 | "description": "Minimal set of PEAR core files to be used as composer dependency",
4 | "license": "BSD-3-Clause",
5 | "authors": [
6 | {
7 | "email": "cweiske@php.net",
8 | "name": "Christian Weiske",
9 | "role": "Lead"
10 | }
11 | ],
12 | "autoload": {
13 | "psr-0": {
14 | "": "src/"
15 | }
16 | },
17 | "include-path": [
18 | "src/"
19 | ],
20 | "support": {
21 | "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR",
22 | "source": "https://github.com/pear/pear-core-minimal"
23 | },
24 | "type": "library",
25 | "require": {
26 | "pear/console_getopt": "~1.4",
27 | "pear/pear_exception": "~1.0"
28 | },
29 | "replace": {
30 | "rsky/pear-core-min": "self.version"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/pear/pear-core-minimal/src/PEAR/Error.php:
--------------------------------------------------------------------------------
1 |
10 | * @license http://opensource.org/licenses/bsd-license.php New BSD License
11 | * @link http://pear.php.net/package/PEAR
12 | */
13 | require_once __DIR__ . '/../PEAR.php';
14 | ?>
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/.gitignore:
--------------------------------------------------------------------------------
1 | PEAR_Exception*.tgz
2 |
3 | # composer related
4 | composer.lock
5 | composer.phar
6 | vendor
7 |
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | php:
3 | - 5.6
4 | - 5.5
5 | - 5.4
6 | script:
7 | - cd tests && phpunit --coverage-text .
8 |
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 1997-2009,
2 | Stig Bakken ,
3 | Gregory Beaver ,
4 | Helgi Þormar Þorbjörnsson ,
5 | Tomas V.V.Cox ,
6 | Martin Jansen .
7 | All rights reserved.
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 | * Redistributions of source code must retain the above copyright notice,
13 | this list of conditions and the following disclaimer.
14 | * Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pear/pear_exception",
3 | "description": "The PEAR Exception base class.",
4 | "type": "class",
5 | "keywords": [
6 | "exception"
7 | ],
8 | "homepage": "https://github.com/pear/PEAR_Exception",
9 | "license": "BSD-2-Clause",
10 | "authors": [
11 | {
12 | "name": "Helgi Thormar",
13 | "email": "dufuz@php.net"
14 | },
15 | {
16 | "name": "Greg Beaver",
17 | "email": "cellog@php.net"
18 | }
19 | ],
20 | "require": {
21 | "php": ">=4.4.0"
22 | },
23 | "autoload": {
24 | "classmap": ["PEAR/"]
25 | },
26 | "extra": {
27 | "branch-alias": {
28 | "dev-master": "1.0.x-dev"
29 | }
30 | },
31 | "include-path": [
32 | "."
33 | ],
34 | "support": {
35 | "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception",
36 | "source": "https://github.com/pear/PEAR_Exception"
37 | },
38 | "require-dev": {
39 | "phpunit/phpunit": "*"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 | PEAR_Exception
9 | pear.php.net
10 | The PEAR Exception base class
11 | PEAR_Exception PHP5 error handling mechanism
12 |
13 |
14 | Christian Weiske
15 | cweiske
16 | cweiske@php.net
17 | yes
18 |
19 |
20 | Helgi Thormar
21 | dufuz
22 | dufuz@php.net
23 | no
24 |
25 |
26 | Greg Beaver
27 | cellog
28 | cellog@php.net
29 | no
30 |
31 |
32 | 2015-02-10
33 |
34 |
35 | 1.0.0
36 | 1.0.0
37 |
38 |
39 | stable
40 | stable
41 |
42 | New BSD License
43 |
44 | This package was split out from the PEAR package.
45 | If you use PEAR_Exception in your package and use nothing from the PEAR package
46 | then it's better to depend on just PEAR_Exception.
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 5.4.0
65 |
66 |
67 | 1.9.5
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 1.0.0
78 | 1.0.0
79 |
80 |
81 | stable
82 | stable
83 |
84 | 2015-02-10
85 | New BSD License
86 | Release stable version
87 |
88 |
89 |
90 |
91 | 1.0.0beta2
92 | 1.0.0
93 |
94 |
95 | beta
96 | stable
97 |
98 | 2014-02-21
99 | New BSD License
100 | Bump up PEAR dependency.
101 |
102 |
103 |
104 |
105 | 1.0.0beta1
106 | 1.0.0
107 |
108 |
109 | beta
110 | stable
111 |
112 | 2012-05-10
113 | New BSD License
114 |
115 | This packge was split out from the PEAR package. If you use PEAR_Exception in your package
116 | and use nothing from the PEAR package then it's better to depend on just PEAR_Exception.
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/vendor/pear/pear_exception/tests/PEAR/ExceptionTest.php:
--------------------------------------------------------------------------------
1 | assertNull($e->getCause());
24 | }
25 |
26 | public function testGetCauseException()
27 | {
28 | $cause = new Exception('foo bar');
29 | $e = new PEAR_Exception('I caught an exception', $cause);
30 | $this->assertNotNull($e->getCause());
31 | $this->assertInstanceOf('Exception', $e->getCause());
32 | $this->assertEquals($cause, $e->getCause());
33 | }
34 |
35 | public function testGetCauseMessage()
36 | {
37 | $cause = new Exception('foo bar');
38 | $e = new PEAR_Exception('I caught an exception', $cause);
39 |
40 | $e->getCauseMessage($causes);
41 | $this->assertEquals('I caught an exception', $causes[0]['message']);
42 | $this->assertEquals('foo bar', $causes[1]['message']);
43 | }
44 |
45 | public function testGetTraceSafe()
46 | {
47 | $e = new PEAR_Exception('oops');
48 | $this->assertInternalType('array', $e->getTraceSafe());
49 | }
50 |
51 | public function testGetErrorClass()
52 | {
53 | $e = new PEAR_Exception('oops');
54 | $this->assertEquals('PEAR_ExceptionTest', $e->getErrorClass());
55 | }
56 |
57 | public function testGetErrorMethod()
58 | {
59 | $e = new PEAR_Exception('oops');
60 | $this->assertEquals('testGetErrorMethod', $e->getErrorMethod());
61 | }
62 |
63 | public function test__toString()
64 | {
65 | $e = new PEAR_Exception('oops');
66 | $this->assertInternalType('string', (string) $e);
67 | $this->assertContains('oops', (string) $e);
68 | }
69 |
70 | public function testToHtml()
71 | {
72 | $e = new PEAR_Exception('oops');
73 | $html = $e->toHtml();
74 | $this->assertInternalType('string', $html);
75 | $this->assertContains('oops', $html);
76 | }
77 | }
78 | ?>
79 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/CHANGELOG.md:
--------------------------------------------------------------------------------
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.
37 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/LICENSE:
--------------------------------------------------------------------------------
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.
20 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/README.md:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
/vendor/psr/http-message/composer.json:
--------------------------------------------------------------------------------
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 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/src/ResponseInterface.php:
--------------------------------------------------------------------------------
1 | = 5.3.
5 |
6 | [](https://travis-ci.org/ralouphie/getallheaders)
7 | [](https://coveralls.io/r/ralouphie/getallheaders?branch=master)
8 | [](https://packagist.org/packages/ralouphie/getallheaders)
9 | [](https://packagist.org/packages/ralouphie/getallheaders)
10 | [](https://packagist.org/packages/ralouphie/getallheaders)
11 |
12 |
13 | This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php).
14 |
15 | ## Install
16 |
17 | For PHP version **`>= 5.6`**:
18 |
19 | ```
20 | composer require ralouphie/getallheaders
21 | ```
22 |
23 | For PHP version **`< 5.6`**:
24 |
25 | ```
26 | composer require ralouphie/getallheaders "^2"
27 | ```
28 |
--------------------------------------------------------------------------------
/vendor/ralouphie/getallheaders/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ralouphie/getallheaders",
3 | "description": "A polyfill for getallheaders.",
4 | "license": "MIT",
5 | "authors": [
6 | {
7 | "name": "Ralph Khattar",
8 | "email": "ralph.khattar@gmail.com"
9 | }
10 | ],
11 | "require": {
12 | "php": ">=5.6"
13 | },
14 | "require-dev": {
15 | "phpunit/phpunit": "^5 || ^6.5",
16 | "php-coveralls/php-coveralls": "^2.1"
17 | },
18 | "autoload": {
19 | "files": ["src/getallheaders.php"]
20 | },
21 | "autoload-dev": {
22 | "psr-4": {
23 | "getallheaders\\Tests\\": "tests/"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/ralouphie/getallheaders/src/getallheaders.php:
--------------------------------------------------------------------------------
1 | 'Content-Type',
16 | 'CONTENT_LENGTH' => 'Content-Length',
17 | 'CONTENT_MD5' => 'Content-Md5',
18 | );
19 |
20 | foreach ($_SERVER as $key => $value) {
21 | if (substr($key, 0, 5) === 'HTTP_') {
22 | $key = substr($key, 5);
23 | if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
24 | $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
25 | $headers[$key] = $value;
26 | }
27 | } elseif (isset($copy_server[$key])) {
28 | $headers[$copy_server[$key]] = $value;
29 | }
30 | }
31 |
32 | if (!isset($headers['Authorization'])) {
33 | if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
34 | $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
35 | } elseif (isset($_SERVER['PHP_AUTH_USER'])) {
36 | $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
37 | $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
38 | } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
39 | $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
40 | }
41 | }
42 |
43 | return $headers;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/redframework/console-core/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 RedCoder (Mahbod Azizkhani)
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.
--------------------------------------------------------------------------------
/vendor/redframework/console-core/README.md:
--------------------------------------------------------------------------------
1 |