init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
29
vendor/guzzlehttp/guzzle/docs/getting-started/faq.rst
vendored
可执行文件
29
vendor/guzzlehttp/guzzle/docs/getting-started/faq.rst
vendored
可执行文件
@@ -0,0 +1,29 @@
|
||||
===
|
||||
FAQ
|
||||
===
|
||||
|
||||
What should I do if I get this error: Fatal error: Maximum function nesting level of '100' reached, aborting!
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
You could run into this error if you have the XDebug extension installed and you execute a lot of requests in
|
||||
callbacks. This error message comes specifically from the XDebug extension. PHP itself does not have a function
|
||||
nesting limit. Change this setting in your php.ini to increase the limit::
|
||||
|
||||
xdebug.max_nesting_level = 1000
|
||||
|
||||
[`source <http://stackoverflow.com/a/4293870/151504>`_]
|
||||
|
||||
How can I speed up my client?
|
||||
-----------------------------
|
||||
|
||||
There are several things you can do to speed up your client:
|
||||
|
||||
1. Utilize a C based HTTP message parser (e.g. ``Guzzle\Parser\Message\PeclHttpMessageParser``)
|
||||
2. Disable operation validation by setting the ``command.disable_validation`` option to true on a command
|
||||
|
||||
Why am I getting a 417 error response?
|
||||
--------------------------------------
|
||||
|
||||
This can occur for a number of reasons, but if you are sending PUT, POST, or PATCH requests with an
|
||||
``Expect: 100-Continue`` header, a server that does not support this header will return a 417 response. You can work
|
||||
around this by calling ``$request->removeHeader('Expect');`` after setting the entity body of a request.
|
||||
154
vendor/guzzlehttp/guzzle/docs/getting-started/installation.rst
vendored
可执行文件
154
vendor/guzzlehttp/guzzle/docs/getting-started/installation.rst
vendored
可执行文件
@@ -0,0 +1,154 @@
|
||||
============
|
||||
Installation
|
||||
============
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
#. PHP 5.3.3+ compiled with the cURL extension
|
||||
#. A recent version of cURL 7.16.2+ compiled with OpenSSL and zlib
|
||||
|
||||
Installing Guzzle
|
||||
-----------------
|
||||
|
||||
Composer
|
||||
~~~~~~~~
|
||||
|
||||
The recommended way to install Guzzle is with `Composer <http://getcomposer.org>`_. Composer is a dependency
|
||||
management tool for PHP that allows you to declare the dependencies your project needs and installs them into your
|
||||
project.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
# Add Guzzle as a dependency
|
||||
php composer.phar require guzzle/guzzle:~3.7
|
||||
|
||||
After installing, you need to require Composer's autoloader:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
You can find out more on how to install Composer, configure autoloading, and other best-practices for defining
|
||||
dependencies at `getcomposer.org <http://getcomposer.org>`_.
|
||||
|
||||
Using only specific parts of Guzzle
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
While you can always just rely on ``guzzle/guzzle``, Guzzle provides several smaller parts of Guzzle as individual
|
||||
packages available through Composer.
|
||||
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| Package name | Description |
|
||||
+===============================================================================================+==========================================+
|
||||
| `guzzle/common <https://packagist.org/packages/guzzle/common>`_ | Provides ``Guzzle\Common`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/http <https://packagist.org/packages/guzzle/http>`_ | Provides ``Guzzle\Http`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/parser <https://packagist.org/packages/guzzle/parser>`_ | Provides ``Guzzle\Parser`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/batch <https://packagist.org/packages/guzzle/batch>`_ | Provides ``Guzzle\Batch`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/cache <https://packagist.org/packages/guzzle/cache>`_ | Provides ``Guzzle\Cache`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/inflection <https://packagist.org/packages/guzzle/inflection>`_ | Provides ``Guzzle\Inflection`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/iterator <https://packagist.org/packages/guzzle/iterator>`_ | Provides ``Guzzle\Iterator`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/log <https://packagist.org/packages/guzzle/log>`_ | Provides ``Guzzle\Log`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin <https://packagist.org/packages/guzzle/plugin>`_ | Provides ``Guzzle\Plugin`` (all plugins) |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-async <https://packagist.org/packages/guzzle/plugin-async>`_ | Provides ``Guzzle\Plugin\Async`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-backoff <https://packagist.org/packages/guzzle/plugin-backoff>`_ | Provides ``Guzzle\Plugin\BackoffPlugin`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-cache <https://packagist.org/packages/guzzle/plugin-cache>`_ | Provides ``Guzzle\Plugin\Cache`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-cookie <https://packagist.org/packages/guzzle/plugin-cookie>`_ | Provides ``Guzzle\Plugin\Cookie`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-error-response <https://packagist.org/packages/guzzle/plugin-error-response>`_ | Provides ``Guzzle\Plugin\ErrorResponse`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-history <https://packagist.org/packages/guzzle/plugin-history>`_ | Provides ``Guzzle\Plugin\History`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-log <https://packagist.org/packages/guzzle/plugin-log>`_ | Provides ``Guzzle\Plugin\Log`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-md5 <https://packagist.org/packages/guzzle/plugin-md5>`_ | Provides ``Guzzle\Plugin\Md5`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-mock <https://packagist.org/packages/guzzle/plugin-mock>`_ | Provides ``Guzzle\Plugin\Mock`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/plugin-oauth <https://packagist.org/packages/guzzle/plugin-oauth>`_ | Provides ``Guzzle\Plugin\Oauth`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/service <https://packagist.org/packages/guzzle/service>`_ | Provides ``Guzzle\Service`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
| `guzzle/stream <https://packagist.org/packages/guzzle/stream>`_ | Provides ``Guzzle\Stream`` |
|
||||
+-----------------------------------------------------------------------------------------------+------------------------------------------+
|
||||
|
||||
Bleeding edge
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
During your development, you can keep up with the latest changes on the master branch by setting the version
|
||||
requirement for Guzzle to ``dev-master``.
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
{
|
||||
"require": {
|
||||
"guzzle/guzzle": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
PEAR
|
||||
~~~~
|
||||
|
||||
Guzzle can be installed through PEAR:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pear channel-discover guzzlephp.org/pear
|
||||
pear install guzzle/guzzle
|
||||
|
||||
You can install a specific version of Guzzle by providing a version number suffix:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pear install guzzle/guzzle-3.7.0
|
||||
|
||||
Contributing to Guzzle
|
||||
----------------------
|
||||
|
||||
In order to contribute, you'll need to checkout the source from GitHub and install Guzzle's dependencies using
|
||||
Composer:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/guzzle/guzzle.git
|
||||
cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev
|
||||
|
||||
Guzzle is unit tested with PHPUnit. You will need to create your own phpunit.xml file in order to run the unit tests
|
||||
(or just copy phpunit.xml.dist to phpunit.xml). Run the tests using the vendored PHPUnit binary:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
vendor/bin/phpunit
|
||||
|
||||
You'll need to install node.js v0.5.0 or newer in order to test the cURL implementation.
|
||||
|
||||
Framework integrations
|
||||
----------------------
|
||||
|
||||
Using Guzzle with Symfony
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Bundles are available on GitHub:
|
||||
|
||||
- `DdeboerGuzzleBundle <https://github.com/ddeboer/GuzzleBundle>`_ for Guzzle 2
|
||||
- `MisdGuzzleBundle <https://github.com/misd-service-development/guzzle-bundle>`_ for Guzzle 3
|
||||
|
||||
Using Guzzle with Silex
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A `Guzzle Silex service provider <https://github.com/guzzle/guzzle-silex-extension>`_ is available on GitHub.
|
||||
85
vendor/guzzlehttp/guzzle/docs/getting-started/overview.rst
vendored
可执行文件
85
vendor/guzzlehttp/guzzle/docs/getting-started/overview.rst
vendored
可执行文件
@@ -0,0 +1,85 @@
|
||||
=================
|
||||
Welcome to Guzzle
|
||||
=================
|
||||
|
||||
What is Guzzle?
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Guzzle is a PHP HTTP client and framework for building web service clients. Guzzle takes the pain out of sending HTTP
|
||||
requests and the redundancy out of creating web service clients.
|
||||
|
||||
Features at a glance
|
||||
--------------------
|
||||
|
||||
- All the power of cURL with a simple interface.
|
||||
- Persistent connections and parallel requests.
|
||||
- Streams request and response bodies
|
||||
- Service descriptions for quickly building clients.
|
||||
- Powered by the Symfony2 EventDispatcher.
|
||||
- Use all of the code or only specific components.
|
||||
- Plugins for caching, logging, OAuth, mocks, and more
|
||||
- Includes a custom node.js webserver to test your clients.
|
||||
- Service descriptions for defining the inputs and outputs of an API
|
||||
- Resource iterators for traversing paginated resources
|
||||
- Batching for sending a large number of requests as efficiently as possible
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
// Really simple using a static facade
|
||||
Guzzle\Http\StaticClient::mount();
|
||||
$response = Guzzle::get('http://guzzlephp.org');
|
||||
|
||||
// More control using a client class
|
||||
$client = new \Guzzle\Http\Client('http://guzzlephp.org');
|
||||
$request = $client->get('/');
|
||||
$response = $request->send();
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed using the `MIT license <http://opensource.org/licenses/MIT>`_.
|
||||
|
||||
Copyright (c) 2013 Michael Dowling <https://github.com/mtdowling>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Guidelines
|
||||
~~~~~~~~~~
|
||||
|
||||
This is still a work in progress, but there are only a few rules:
|
||||
|
||||
1. Guzzle follows PSR-0, PSR-1, and PSR-2
|
||||
2. All pull requests must include unit tests to ensure the change works as expected and to prevent future regressions
|
||||
|
||||
Reporting a security vulnerability
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We want to ensure that Guzzle is a secure HTTP client library for everyone. If you've discovered a security
|
||||
vulnerability in Guzzle, we appreciate your help in disclosing it to us in a
|
||||
`responsible manner <http://en.wikipedia.org/wiki/Responsible_disclosure>`_.
|
||||
|
||||
Publicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern,
|
||||
please email us at security@guzzlephp.org. We'll work with you to make sure that we understand the scope of the issue,
|
||||
and that we fully address your concern. We consider correspondence sent to security@guzzlephp.org our highest priority,
|
||||
and work to address any issues that arise as quickly as possible.
|
||||
|
||||
After a security vulnerability has been corrected, a security hotfix release will be deployed as soon as possible.
|
||||
在新工单中引用
屏蔽一个用户