AfterShip – WooCommerce Tracking - Version 1.2.0

Version Description

  • Fix the header issues of different server
Download this release

Release Info

Developer aftership
Plugin Icon 128x128 AfterShip – WooCommerce Tracking
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.9 to 1.2.0

Files changed (174) hide show
  1. aftership.php +1 -1
  2. api/class-aftership-api-authentication.php +8 -3
  3. readme.txt +4 -1
  4. trunk/aftership.php +0 -513
  5. trunk/api/class-aftership-api-authentication.php +0 -121
  6. trunk/api/class-aftership-api-json-handler.php +0 -77
  7. trunk/api/class-aftership-api-orders.php +0 -430
  8. trunk/api/class-aftership-api-resource.php +0 -410
  9. trunk/api/class-aftership-api-server.php +0 -766
  10. trunk/api/interface-aftership-api-handler.php +0 -46
  11. trunk/assets/css/admin.css +0 -30
  12. trunk/assets/image/loadingAnimation.gif +0 -0
  13. trunk/assets/js/admin.js +0 -97
  14. trunk/class-aftership-api.php +0 -186
  15. trunk/class-aftership-settings.php +0 -220
  16. trunk/composer.json +0 -5
  17. trunk/composer.lock +0 -223
  18. trunk/readme.txt +0 -152
  19. trunk/vendor/aftership/aftership-php-sdk +0 -1
  20. trunk/vendor/autoload.php +0 -7
  21. trunk/vendor/composer/ClassLoader.php +0 -379
  22. trunk/vendor/composer/autoload_classmap.php +0 -9
  23. trunk/vendor/composer/autoload_namespaces.php +0 -13
  24. trunk/vendor/composer/autoload_psr4.php +0 -9
  25. trunk/vendor/composer/autoload_real.php +0 -50
  26. trunk/vendor/composer/installed.json +0 -204
  27. trunk/vendor/guzzle/guzzle/.gitignore +0 -27
  28. trunk/vendor/guzzle/guzzle/.travis.yml +0 -22
  29. trunk/vendor/guzzle/guzzle/CHANGELOG.md +0 -762
  30. trunk/vendor/guzzle/guzzle/LICENSE +0 -19
  31. trunk/vendor/guzzle/guzzle/README.md +0 -212
  32. trunk/vendor/guzzle/guzzle/UPGRADING.md +0 -537
  33. trunk/vendor/guzzle/guzzle/build.xml +0 -45
  34. trunk/vendor/guzzle/guzzle/composer.json +0 -74
  35. trunk/vendor/guzzle/guzzle/docs/Makefile +0 -153
  36. trunk/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json +0 -176
  37. trunk/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png +0 -0
  38. trunk/vendor/guzzle/guzzle/docs/_static/homepage.css +0 -122
  39. trunk/vendor/guzzle/guzzle/docs/_static/logo.png +0 -0
  40. trunk/vendor/guzzle/guzzle/docs/_static/prettify.css +0 -41
  41. trunk/vendor/guzzle/guzzle/docs/_static/prettify.js +0 -28
  42. trunk/vendor/guzzle/guzzle/docs/_templates/index.html +0 -103
  43. trunk/vendor/guzzle/guzzle/docs/_templates/leftbar.html +0 -0
  44. trunk/vendor/guzzle/guzzle/docs/_templates/nav_links.html +0 -5
  45. trunk/vendor/guzzle/guzzle/docs/batching/batching.rst +0 -183
  46. trunk/vendor/guzzle/guzzle/docs/conf.py +0 -95
  47. trunk/vendor/guzzle/guzzle/docs/docs.rst +0 -73
  48. trunk/vendor/guzzle/guzzle/docs/getting-started/faq.rst +0 -29
  49. trunk/vendor/guzzle/guzzle/docs/getting-started/installation.rst +0 -154
  50. trunk/vendor/guzzle/guzzle/docs/getting-started/overview.rst +0 -85
  51. trunk/vendor/guzzle/guzzle/docs/http-client/client.rst +0 -569
  52. trunk/vendor/guzzle/guzzle/docs/http-client/entity-bodies.rst +0 -151
  53. trunk/vendor/guzzle/guzzle/docs/http-client/http-redirects.rst +0 -99
  54. trunk/vendor/guzzle/guzzle/docs/http-client/request.rst +0 -667
  55. trunk/vendor/guzzle/guzzle/docs/http-client/response.rst +0 -141
  56. trunk/vendor/guzzle/guzzle/docs/http-client/uri-templates.rst +0 -52
  57. trunk/vendor/guzzle/guzzle/docs/index.rst +0 -5
  58. trunk/vendor/guzzle/guzzle/docs/iterators/guzzle-iterators.rst +0 -97
  59. trunk/vendor/guzzle/guzzle/docs/iterators/resource-iterators.rst +0 -149
  60. trunk/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst +0 -18
  61. trunk/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst +0 -22
  62. trunk/vendor/guzzle/guzzle/docs/plugins/cache-plugin.rst +0 -169
  63. trunk/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst +0 -33
  64. trunk/vendor/guzzle/guzzle/docs/plugins/creating-plugins.rst +0 -93
  65. trunk/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst +0 -32
  66. trunk/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst +0 -24
  67. trunk/vendor/guzzle/guzzle/docs/plugins/log-plugin.rst +0 -69
  68. trunk/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst +0 -29
  69. trunk/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst +0 -27
  70. trunk/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst +0 -30
  71. trunk/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc +0 -9
  72. trunk/vendor/guzzle/guzzle/docs/plugins/plugins-overview.rst +0 -59
  73. trunk/vendor/guzzle/guzzle/docs/requirements.txt +0 -2
  74. trunk/vendor/guzzle/guzzle/docs/testing/unit-testing.rst +0 -201
  75. trunk/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst +0 -619
  76. trunk/vendor/guzzle/guzzle/docs/webservice-client/using-the-service-builder.rst +0 -316
  77. trunk/vendor/guzzle/guzzle/docs/webservice-client/webservice-client.rst +0 -659
  78. trunk/vendor/guzzle/guzzle/phar-stub.php +0 -16
  79. trunk/vendor/guzzle/guzzle/phing/build.properties.dist +0 -16
  80. trunk/vendor/guzzle/guzzle/phing/imports/dependencies.xml +0 -33
  81. trunk/vendor/guzzle/guzzle/phing/imports/deploy.xml +0 -142
  82. trunk/vendor/guzzle/guzzle/phing/tasks/ComposerLintTask.php +0 -152
  83. trunk/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php +0 -338
  84. trunk/vendor/guzzle/guzzle/phing/tasks/GuzzleSubSplitTask.php +0 -385
  85. trunk/vendor/guzzle/guzzle/phpunit.xml.dist +0 -48
  86. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/AbstractBatchDecorator.php +0 -66
  87. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/Batch.php +0 -92
  88. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchBuilder.php +0 -199
  89. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureDivisor.php +0 -39
  90. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureTransfer.php +0 -40
  91. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchCommandTransfer.php +0 -75
  92. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php +0 -18
  93. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchInterface.php +0 -32
  94. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchRequestTransfer.php +0 -65
  95. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchSizeDivisor.php +0 -47
  96. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchTransferInterface.php +0 -16
  97. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/Exception/BatchTransferException.php +0 -90
  98. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/ExceptionBufferingBatch.php +0 -50
  99. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/FlushingBatch.php +0 -60
  100. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/HistoryBatch.php +0 -39
  101. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/NotifyingBatch.php +0 -38
  102. trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/composer.json +0 -31
  103. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php +0 -21
  104. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php +0 -117
  105. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php +0 -55
  106. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/ClosureCacheAdapter.php +0 -57
  107. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php +0 -41
  108. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php +0 -31
  109. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf1CacheAdapter.php +0 -44
  110. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php +0 -41
  111. trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/composer.json +0 -27
  112. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php +0 -49
  113. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php +0 -403
  114. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php +0 -52
  115. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php +0 -5
  116. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/ExceptionCollection.php +0 -108
  117. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php +0 -8
  118. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/InvalidArgumentException.php +0 -5
  119. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/RuntimeException.php +0 -5
  120. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/UnexpectedValueException.php +0 -5
  121. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/FromConfigInterface.php +0 -18
  122. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php +0 -54
  123. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/ToArrayInterface.php +0 -16
  124. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Version.php +0 -29
  125. trunk/vendor/guzzle/guzzle/src/Guzzle/Common/composer.json +0 -20
  126. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php +0 -221
  127. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php +0 -229
  128. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php +0 -506
  129. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php +0 -223
  130. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlHandle.php +0 -464
  131. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php +0 -363
  132. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php +0 -58
  133. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php +0 -147
  134. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php +0 -66
  135. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php +0 -147
  136. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBody.php +0 -201
  137. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php +0 -73
  138. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php +0 -69
  139. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php +0 -8
  140. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/CouldNotRewindStreamException.php +0 -7
  141. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/CurlException.php +0 -101
  142. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php +0 -10
  143. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/MultiTransferException.php +0 -145
  144. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php +0 -39
  145. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php +0 -8
  146. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/TooManyRedirectsException.php +0 -5
  147. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/IoEmittingEntityBody.php +0 -83
  148. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php +0 -220
  149. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php +0 -247
  150. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php +0 -137
  151. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header.php +0 -182
  152. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php +0 -121
  153. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php +0 -108
  154. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php +0 -26
  155. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php +0 -19
  156. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderInterface.php +0 -83
  157. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/Link.php +0 -93
  158. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php +0 -102
  159. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFile.php +0 -124
  160. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php +0 -83
  161. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php +0 -638
  162. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php +0 -359
  163. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php +0 -105
  164. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestInterface.php +0 -318
  165. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php +0 -968
  166. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php +0 -962
  167. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php +0 -20
  168. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php +0 -22
  169. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php +0 -27
  170. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php +0 -22
  171. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryString.php +0 -276
  172. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php +0 -105
  173. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php +0 -250
  174. trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem +0 -2439
aftership.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: AfterShip - WooCommerce Tracking
4
  Plugin URI: http://aftership.com/
5
  Description: Add tracking number and carrier name to WooCommerce, display tracking info at order history page, auto import tracking numbers to AfterShip.
6
- Version: 1.1.9
7
  Author: AfterShip
8
  Author URI: http://aftership.com
9
 
3
  Plugin Name: AfterShip - WooCommerce Tracking
4
  Plugin URI: http://aftership.com/
5
  Description: Add tracking number and carrier name to WooCommerce, display tracking info at order history page, auto import tracking numbers to AfterShip.
6
+ Version: 1.2.0
7
  Author: AfterShip
8
  Author URI: http://aftership.com
9
 
api/class-aftership-api-authentication.php CHANGED
@@ -17,7 +17,7 @@ if (!function_exists('getallheaders')) {
17
  $headers = '';
18
  foreach ($_SERVER as $name => $value) {
19
  if (substr($name, 0, 5) == 'HTTP_') {
20
- $headers[substr($name, 5)] = $value;
21
  }
22
  }
23
  return $headers;
@@ -71,9 +71,14 @@ class AfterShip_API_Authentication
71
 
72
  $headers = getallheaders();
73
 
 
 
 
74
  // get aftership wp key
75
- if (!empty($headers['AFTERSHIP_WP_KEY'])) {
76
- $api_key = $headers['AFTERSHIP_WP_KEY'];
 
 
77
  } else {
78
  throw new Exception(__('AfterShip\'s WordPress Key is missing', 'aftership'), 404);
79
  }
17
  $headers = '';
18
  foreach ($_SERVER as $name => $value) {
19
  if (substr($name, 0, 5) == 'HTTP_') {
20
+ $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
21
  }
22
  }
23
  return $headers;
71
 
72
  $headers = getallheaders();
73
 
74
+ $key = 'AFTERSHIP_WP_KEY';
75
+ $key1 = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
76
+
77
  // get aftership wp key
78
+ if (!empty($headers[$key])) {
79
+ $api_key = $headers[$key];
80
+ } else if (!empty($headers[$key1])){
81
+ $api_key = $headers[$key1];
82
  } else {
83
  throw new Exception(__('AfterShip\'s WordPress Key is missing', 'aftership'), 404);
84
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.aftership.com/
4
  Tags: shipping, tracking, ups, usps, fedex, dhl, tnt, dpd, post, shipment, woocommerce, tracking number, aftership, package tracking, fulfilment, tracking link, carrier, courier, woo commerce, woocommerce shipment tracking, shipping details plugin, widget, shipstation, track, package
5
  Requires at least: 2.9
6
  Tested up to: 3.9.2
7
- Stable tag: 1.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -93,6 +93,9 @@ You'll find the FAQ on [AfterShip.com](https://aftership.uservoice.com/knowledge
93
 
94
  == Changelog ==
95
 
 
 
 
96
  = 1.1.9 =
97
  * Fix the header issues of different server
98
 
4
  Tags: shipping, tracking, ups, usps, fedex, dhl, tnt, dpd, post, shipment, woocommerce, tracking number, aftership, package tracking, fulfilment, tracking link, carrier, courier, woo commerce, woocommerce shipment tracking, shipping details plugin, widget, shipstation, track, package
5
  Requires at least: 2.9
6
  Tested up to: 3.9.2
7
+ Stable tag: 1.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
93
 
94
  == Changelog ==
95
 
96
+ = 1.2.0 =
97
+ * Fix the header issues of different server
98
+
99
  = 1.1.9 =
100
  * Fix the header issues of different server
101
 
trunk/aftership.php DELETED
@@ -1,513 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: AfterShip - WooCommerce Tracking
4
- Plugin URI: http://aftership.com/
5
- Description: Add tracking number and carrier name to WooCommerce, display tracking info at order history page, auto import tracking numbers to AfterShip.
6
- Version: 1.1.9
7
- Author: AfterShip
8
- Author URI: http://aftership.com
9
-
10
- Copyright: © AfterShip
11
- */
12
-
13
- /**
14
- * Security Note
15
- */
16
- defined('ABSPATH') or die("No script kiddies please!");
17
-
18
- /**
19
- * Required functions
20
- */
21
- if (!function_exists('is_woocommerce_active'))
22
- require_once('woo-includes/woo-functions.php');
23
-
24
-
25
- /**
26
- * Plugin updates
27
- */
28
-
29
- if (is_woocommerce_active()) {
30
-
31
- /**
32
- * AfterShip class
33
- */
34
- if (!class_exists('AfterShip')) {
35
-
36
- final class AfterShip
37
- {
38
-
39
- protected static $_instance = null;
40
-
41
- public static function instance()
42
- {
43
- if (is_null(self::$_instance)) {
44
- self::$_instance = new self();
45
- }
46
- return self::$_instance;
47
- }
48
-
49
-
50
- /**
51
- * Constructor
52
- */
53
- public function __construct()
54
- {
55
- $this->includes();
56
-
57
- $this->api = new AfterShip_API();
58
-
59
- $options = get_option('aftership_option_name');
60
- if ($options) {
61
- $plugin = $options['plugin'];
62
- if ($plugin == 'aftership') {
63
- add_action('admin_print_scripts', array(&$this, 'library_scripts'));
64
- add_action('admin_print_styles', array(&$this, 'admin_styles'));
65
- add_action('add_meta_boxes', array(&$this, 'add_meta_box'));
66
- add_action('woocommerce_process_shop_order_meta', array(&$this, 'save_meta_box'), 0, 2);
67
- add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));
68
-
69
- add_action('admin_footer', array(&$this, 'aftership_get_couriers'));
70
- add_action('wp_ajax_aftership_get_couriers_callback', array(&$this, 'aftership_get_couriers_callback'));
71
- }
72
-
73
- // View Order Page
74
- $this->plugin = $plugin;
75
- $this->use_track_button = $options['use_track_button'];
76
- add_action('woocommerce_view_order', array(&$this, 'display_tracking_info'));
77
- add_action('woocommerce_email_before_order_table', array(&$this, 'email_display'));
78
- }
79
-
80
- // user profile api key
81
- add_action('show_user_profile', array($this, 'add_api_key_field'));
82
- add_action('edit_user_profile', array($this, 'add_api_key_field'));
83
- add_action('personal_options_update', array($this, 'generate_api_key'));
84
- add_action('edit_user_profile_update', array($this, 'generate_api_key'));
85
-
86
- register_activation_hook(__FILE__, array($this, 'install'));
87
- }
88
-
89
- public function install()
90
- {
91
- global $wp_roles;
92
-
93
- if (class_exists('WP_Roles')) {
94
- if (!isset($wp_roles)) {
95
- $wp_roles = new WP_Roles();
96
- }
97
- }
98
-
99
- if (is_object($wp_roles)) {
100
- $wp_roles->add_cap('administrator', 'manage_aftership');
101
- }
102
- }
103
-
104
- private function includes()
105
- {
106
- include_once('class-aftership-api.php');
107
- include_once('class-aftership-settings.php');
108
- include_once('vendor/autoload.php');
109
- }
110
-
111
- /**
112
- * Localisation
113
- */
114
- public function load_plugin_textdomain()
115
- {
116
- load_plugin_textdomain('aftership', false, dirname(plugin_basename(__FILE__)) . '/languages/');
117
- }
118
-
119
- public function admin_styles()
120
- {
121
- wp_enqueue_style('aftership_styles', plugins_url(basename(dirname(__FILE__))) . '/assets/css/admin.css');
122
- }
123
-
124
- public function library_scripts()
125
- {
126
- wp_enqueue_script('aftership_script', plugins_url(basename(dirname(__FILE__))) . '/assets/js/admin.js');
127
- }
128
-
129
- public function aftership_get_couriers()
130
- {
131
- //todo: not only check shop_order, have to check action=edit too
132
- if (get_post_type(get_the_ID()) == 'shop_order') {
133
- $js = '
134
- jQuery(document).ready(function($) {
135
- var data = {
136
- "action": "aftership_get_couriers_callback"
137
- };
138
- // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
139
- $.post(ajaxurl, data, function(response) {
140
- //alert("Got this from the server: " + response);
141
- fill_meta_box(response);
142
- });
143
- });
144
- ';
145
-
146
- if (function_exists('wc_enqueue_js')) {
147
- wc_enqueue_js($js);
148
- } else {
149
- global $woocommerce;
150
- $woocommerce->add_inline_js($js);
151
- }
152
- }
153
-
154
- }
155
-
156
- public function aftership_get_couriers_callback()
157
- {
158
- $options = get_option('aftership_option_name');
159
- $api_key = $options['api_key'];
160
-
161
- $code = 200;
162
- $message = '';
163
- $response = '';
164
- if (!$api_key) {
165
- $code = 800; // no api key
166
- $message = 'No Api Key';
167
- } else {
168
- $courier = new AfterShip\Couriers($api_key);
169
- $response = $courier->get();
170
- if ($response['meta']['code'] == 401) {
171
- $code = 401;
172
- $message = 'Invalid API';
173
- } else if ($response['meta']['code'] != 200) {
174
- $code = $response['meta']['code'];
175
- $message = $response['meta']['message'];
176
- }
177
- }
178
-
179
- $result = array(
180
- 'code' => $code,
181
- 'message' => $message,
182
- 'response' => $response);
183
- echo json_encode($result);
184
- die;
185
- }
186
-
187
- /**
188
- * Add the meta box for shipment info on the order page
189
- *
190
- * @access public
191
- */
192
- public function add_meta_box()
193
- {
194
- add_meta_box('woocommerce-aftership', __('AfterShip', 'wc_aftership'), array(&$this, 'meta_box'), 'shop_order', 'side', 'high');
195
- }
196
-
197
- /**
198
- * Show the meta box for shipment info on the order page
199
- *
200
- * @access public
201
- */
202
- public function meta_box()
203
- {
204
-
205
- // just draw the layout, no data
206
- global $post;
207
-
208
- $selected_provider = get_post_meta($post->ID, '_aftership_tracking_provider', true);
209
-
210
-
211
- echo '<div id="aftership_spinner"></div>';
212
- echo '<div id="aftership_error_insert_api" class="aftership_error"><a href="options-general.php?page=aftership-setting-admin">Please insert your AfterShip API Key</a></div>';
213
- echo '<div id="aftership_error_update_api" class="aftership_error"><a href="options-general.php?page=aftership-setting-admin">Error - Update AfterShip API Key</a></div>';
214
- echo '<div id="aftership_error" class="aftership_error"></div>';
215
- echo '<div id="aftership_wrapper">';
216
-
217
- echo '<p class="form-field"><label for="aftership_tracking_provider">' . __('Carrier:', 'wc_aftership') . '</label><br/><select id="aftership_tracking_provider" name="aftership_tracking_provider" class="chosen_select" style="width:100%">';
218
- if ($selected_provider == '') {
219
- $selected_text = 'selected="selected"';
220
- } else {
221
- $selected_text = '';
222
- }
223
- echo '<option disabled ' . $selected_text . ' value="">Please Select</option>';
224
- echo '</select>';
225
- echo '<br><a href="https://www.aftership.com/settings/courier" target="_blank">Update carrier list</a>';
226
- echo '<input type="hidden" id="aftership_tracking_provider_hidden" value="' . $selected_provider . '"/>';
227
-
228
- woocommerce_wp_text_input(array(
229
- 'id' => 'aftership_tracking_provider_name',
230
- 'placeholder' => '',
231
- 'description' => '',
232
- 'class' => 'hidden',
233
- 'value' => get_post_meta($post->ID, '_aftership_tracking_provider_name', true),
234
- ));
235
-
236
- woocommerce_wp_text_input(array(
237
- 'id' => 'aftership_tracking_required_fields',
238
- 'placeholder' => '',
239
- 'description' => '',
240
- 'class' => 'hidden',
241
- 'value' => get_post_meta($post->ID, '_aftership_tracking_required_fields', true),
242
- ));
243
-
244
- woocommerce_wp_text_input(array(
245
- 'id' => 'aftership_tracking_number',
246
- 'label' => __('Tracking number:', 'wc_aftership'),
247
- 'placeholder' => '',
248
- 'description' => '',
249
- 'value' => get_post_meta($post->ID, '_aftership_tracking_number', true),
250
- ));
251
-
252
- woocommerce_wp_text_input(array(
253
- 'id' => 'aftership_tracking_shipdate',
254
- 'label' => __('Date shipped:', 'wc_aftership'),
255
- 'placeholder' => 'YYYY-MM-DD',
256
- 'description' => '',
257
- 'class' => 'date-picker-field hidden-field',
258
- 'value' => ($date = get_post_meta($post->ID, '_aftership_tracking_shipdate', true)) ? date('Y-m-d', $date) : ''
259
- ));
260
-
261
- woocommerce_wp_text_input(array(
262
- 'id' => 'aftership_tracking_postal',
263
- 'label' => __('Postal Code:', 'wc_aftership'),
264
- 'placeholder' => '',
265
- 'description' => '',
266
- 'class' => 'hidden-field',
267
- 'value' => get_post_meta($post->ID, '_aftership_tracking_postal', true),
268
- ));
269
-
270
- woocommerce_wp_text_input(array(
271
- 'id' => 'aftership_tracking_account',
272
- 'label' => __('Account name:', 'wc_aftership'),
273
- 'placeholder' => '',
274
- 'description' => '',
275
- 'class' => 'hidden-field',
276
- 'value' => get_post_meta($post->ID, '_aftership_tracking_account', true),
277
- ));
278
-
279
- echo '</div>';
280
- }
281
-
282
- /**
283
- * Order Downloads Save
284
- *
285
- * Function for processing and storing all order downloads.
286
- */
287
- public function save_meta_box($post_id, $post)
288
- {
289
- if (isset($_POST['aftership_tracking_number'])) {
290
-
291
- // Download data
292
- $tracking_provider = woocommerce_clean($_POST['aftership_tracking_provider']);
293
- $tracking_number = woocommerce_clean($_POST['aftership_tracking_number']);
294
- $tracking_provider_name = woocommerce_clean($_POST['aftership_tracking_provider_name']);
295
- $tracking_required_fields = woocommerce_clean($_POST['aftership_tracking_required_fields']);
296
- $shipdate = woocommerce_clean(strtotime($_POST['aftership_tracking_shipdate']));
297
- $postal = woocommerce_clean($_POST['aftership_tracking_postal']);
298
- $account = woocommerce_clean($_POST['aftership_tracking_account']);
299
-
300
- // Update order data
301
- update_post_meta($post_id, '_aftership_tracking_provider', $tracking_provider);
302
- update_post_meta($post_id, '_aftership_tracking_number', $tracking_number);
303
- update_post_meta($post_id, '_aftership_tracking_provider_name', $tracking_provider_name);
304
- update_post_meta($post_id, '_aftership_tracking_required_fields', $tracking_required_fields);
305
- update_post_meta($post_id, '_aftership_tracking_shipdate', $shipdate);
306
- update_post_meta($post_id, '_aftership_tracking_postal', $postal);
307
- update_post_meta($post_id, '_aftership_tracking_account', $account);
308
- }
309
- }
310
-
311
- /**
312
- * Display the API key info for a user
313
- *
314
- * @since 2.1
315
- * @param WP_User $user
316
- */
317
- public function add_api_key_field($user)
318
- {
319
-
320
- if (!current_user_can('manage_aftership'))
321
- return;
322
-
323
- if (current_user_can('edit_user', $user->ID)) {
324
- ?>
325
- <h3>AfterShip</h3>
326
- <table class="form-table">
327
- <tbody>
328
- <tr>
329
- <th><label
330
- for="aftership_wp_api_key"><?php _e('AfterShip\'s WordPress API Key', 'aftership'); ?></label>
331
- </th>
332
- <td>
333
- <?php if (empty($user->aftership_wp_api_key)) : ?>
334
- <input name="aftership_wp_generate_api_key" type="checkbox"
335
- id="aftership_wp_generate_api_key" value="0"/>
336
- <span class="description"><?php _e('Generate API Key', 'aftership'); ?></span>
337
- <?php else : ?>
338
- <code id="aftership_wp_api_key"><?php echo $user->aftership_wp_api_key ?></code>
339
- <br/>
340
- <input name="aftership_wp_generate_api_key" type="checkbox"
341
- id="aftership_wp_generate_api_key" value="0"/>
342
- <span class="description"><?php _e('Revoke API Key', 'aftership'); ?></span>
343
- <?php endif; ?>
344
- </td>
345
- </tr>
346
- </tbody>
347
- </table>
348
- <?php
349
- }
350
- }
351
-
352
- /**
353
- * Generate and save (or delete) the API keys for a user
354
- *
355
- * @since 2.1
356
- * @param int $user_id
357
- */
358
- public function generate_api_key($user_id)
359
- {
360
-
361
- if (current_user_can('edit_user', $user_id)) {
362
-
363
- $user = get_userdata($user_id);
364
-
365
- // creating/deleting key
366
- if (isset($_POST['aftership_wp_generate_api_key'])) {
367
-
368
- // consumer key
369
- if (empty($user->aftership_wp_api_key)) {
370
-
371
- $api_key = 'ck_' . hash('md5', $user->user_login . date('U') . mt_rand());
372
-
373
- update_user_meta($user_id, 'aftership_wp_api_key', $api_key);
374
-
375
- } else {
376
-
377
- delete_user_meta($user_id, 'aftership_wp_api_key');
378
- }
379
-
380
- }
381
- }
382
- }
383
-
384
- /**
385
- * Display Shipment info in the frontend (order view/tracking page).
386
- *
387
- * @access public
388
- */
389
- function display_tracking_info($order_id, $for_email = false)
390
- {
391
- if ($this->plugin == 'aftership') {
392
- $this->display_order_aftership($order_id, $for_email);
393
- } else if ($this->plugin == 'wc-shipment-tracking') { //$49
394
- $this->display_order_wc_shipment_tracking($order_id, $for_email);
395
- }
396
- }
397
-
398
- private function display_order_aftership($order_id, $for_email)
399
- {
400
- $tracking_provider = get_post_meta($order_id, '_aftership_tracking_provider', true);
401
- $tracking_number = get_post_meta($order_id, '_aftership_tracking_number', true);
402
- $tracking_provider_name = get_post_meta($order_id, '_aftership_tracking_provider_name', true);
403
- $tracking_required_fields = get_post_meta($order_id, '_aftership_tracking_required_fields', true);
404
- $date_shipped = get_post_meta($order_id, '_aftership_tracking_shipdate', true);
405
- $postcode = get_post_meta($order_id, '_aftership_tracking_postal', true);
406
- $account = get_post_meta($order_id, '_aftership_tracking_account', true);
407
-
408
- if (!$tracking_provider)
409
- return;
410
-
411
- if (!$tracking_number)
412
- return;
413
-
414
- $provider_name = $tracking_provider_name;
415
- $provider_required_fields = explode(",", $tracking_required_fields);
416
-
417
- foreach ($provider_required_fields as $field) {
418
- if ($field == 'tracking_ship_date') {
419
- if ($date_shipped) {
420
- $date_shipped_str = '&nbsp;' . sprintf(__('on %s', 'wc_shipment_tracking'), date_i18n(__('l jS F Y', 'wc_shipment_tracking'), $date_shipped));
421
- }
422
- } else if ($field == 'tracking_postal_code') {
423
- if ($postcode) {
424
- $postcode_str = '&nbsp;' . sprintf('The postal code is %s.', $postcode);
425
- }
426
- } else if ($field == 'tracking_account_number') {
427
- if ($account) {
428
- $account_str = '&nbsp;' . sprintf('The account is %s.', $account);
429
- }
430
- }
431
- }
432
-
433
- $provider_name = '&nbsp;' . __('via', 'wc_shipment_tracking') . ' <strong>' . $provider_name . '</strong>';
434
-
435
- echo wpautop(sprintf(__('Your order was shipped%s%s. Tracking number is %s.%s%s', 'wc_shipment_tracking'), $date_shipped_str, $provider_name, $tracking_number, $postcode_str, $account_str));
436
-
437
- if (!$for_email && $this->use_track_button) {
438
- $this->display_track_button($tracking_provider, $tracking_number);
439
- }
440
-
441
- }
442
-
443
- private function display_order_wc_shipment_tracking($order_id, $for_email)
444
- {
445
- if ($for_email || !$this->use_track_button) {
446
- return;
447
- }
448
-
449
- $tracking = get_post_meta($order_id, '_tracking_number', true);
450
- $sharp = strpos($tracking, '#');
451
- $colon = strpos($tracking, ':');
452
- if ($sharp && $colon && $sharp >= $colon) {
453
- return;
454
- } else if (!$sharp && $colon) {
455
- return;
456
- } else if ($sharp) {
457
- $tracking_provider = substr($tracking, 0, $sharp);
458
- if ($colon) {
459
- $tracking_number = substr($tracking, $sharp + 1, $colon - $sharp - 1);
460
- } else {
461
- $tracking_number = substr($tracking, $sharp + 1, strlen($tracking));
462
- }
463
- } else {
464
- $tracking_provider = '';
465
- $tracking_number = $tracking;
466
- }
467
- if ($tracking_number) {
468
- $this->display_track_button($tracking_provider, $tracking_number);
469
- }
470
- }
471
-
472
- /**
473
- * Display shipment info in customer emails.
474
- *
475
- * @access public
476
- * @return void
477
- */
478
- function email_display($order)
479
- {
480
- $this->display_tracking_info($order->id, true);
481
- }
482
-
483
- private function display_track_button($tracking_provider, $tracking_number)
484
- {
485
-
486
- $js = '(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//apps.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk")';
487
- if (function_exists('wc_enqueue_js')) {
488
- wc_enqueue_js($js);
489
- } else {
490
- global $woocommerce;
491
- $woocommerce->add_inline_js($js);
492
- }
493
-
494
- $track_button = '<div id="as-root"></div><div class="as-track-button" data-slug="' . $tracking_provider . '" data-tracking-number="' . $tracking_number . '" data-support="true" data-width="400" data-size="normal" data-hide-tracking-number="true"></div>';
495
- echo wpautop(sprintf('%s', $track_button));
496
- echo "<br><br>";
497
- }
498
- }
499
-
500
- if (!function_exists('getAfterShipInstance')) {
501
- function getAfterShipInstance()
502
- {
503
- return AfterShip::Instance();
504
- }
505
- }
506
- }
507
-
508
- /**
509
- * Register this class globally
510
- */
511
- $GLOBALS['aftership'] = getAfterShipInstance();
512
-
513
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/class-aftership-api-authentication.php DELETED
@@ -1,121 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API Authentication Class
4
- *
5
- * @author AfterShip
6
- * @category API
7
- * @package AfterShip/API
8
- * @since 1
9
- */
10
-
11
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
12
-
13
-
14
- if (!function_exists('getallheaders')) {
15
- function getallheaders()
16
- {
17
- $headers = '';
18
- foreach ($_SERVER as $name => $value) {
19
- if (substr($name, 0, 5) == 'HTTP_') {
20
- $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
21
- }
22
- }
23
- return $headers;
24
- }
25
- }
26
-
27
- class AfterShip_API_Authentication
28
- {
29
-
30
- /**
31
- * Setup class
32
- *
33
- * @since 2.1
34
- * @return WC_API_Authentication
35
- */
36
- public function __construct()
37
- {
38
-
39
- // to disable authentication, hook into this filter at a later priority and return a valid WP_User
40
- add_filter('aftership_api_check_authentication', array($this, 'authenticate'), 0);
41
- }
42
-
43
- /**
44
- * Authenticate the request. The authentication method varies based on whether the request was made over SSL or not.
45
- *
46
- * @since 2.1
47
- * @param WP_User $user
48
- * @return null|WP_Error|WP_User
49
- */
50
- public function authenticate($user)
51
- {
52
-
53
- // allow access to the index by default
54
- if ('/' === getAfterShipInstance()->api->server->path)
55
- return new WP_User(0);
56
-
57
- try {
58
- $user = $this->perform_authentication();
59
-
60
- } catch (Exception $e) {
61
-
62
- $user = new WP_Error('aftership_api_authentication_error', $e->getMessage(), array('status' => $e->getCode()));
63
- }
64
-
65
- return $user;
66
- }
67
-
68
- private function perform_authentication()
69
- {
70
- //$params = getAfterShipInstance()->api->server->params['GET'];
71
-
72
- $headers = getallheaders();
73
-
74
- $key = 'AFTERSHIP_WP_KEY';
75
- $key1 = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
76
-
77
- // get aftership wp key
78
- if (!empty($headers[$key])) {
79
- $api_key = $headers[$key];
80
- } else if (!empty($headers[$key1])){
81
- $api_key = $headers[$key1];
82
- } else {
83
- throw new Exception(__('AfterShip\'s WordPress Key is missing', 'aftership'), 404);
84
- }
85
-
86
- $user = $this->get_user_by_api_key($api_key);
87
-
88
- return $user;
89
-
90
- }
91
-
92
- /**
93
- * Return the user for the given consumer key
94
- *
95
- * @since 2.1
96
- * @param string $consumer_key
97
- * @return WP_User
98
- * @throws Exception
99
- */
100
- private function get_user_by_api_key($api_key)
101
- {
102
-
103
- $user_query = new WP_User_Query(
104
- array(
105
- //'meta_key' => 'woocommerce_api_consumer_key',
106
- 'meta_key' => 'aftership_wp_api_key',
107
- 'meta_value' => $api_key,
108
- )
109
- );
110
-
111
- $users = $user_query->get_results();
112
-
113
- if (empty($users[0]))
114
- throw new Exception(__('AfterShip\'s WordPress API Key is invalid', 'aftership'), 401);
115
-
116
- return $users[0];
117
-
118
-
119
- }
120
-
121
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/class-aftership-api-json-handler.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API
4
- *
5
- * Handles parsing JSON request bodies and generating JSON responses
6
- *
7
- * @author AfterShip
8
- * @category API
9
- * @package AfterShip/API
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- class AfterShip_API_JSON_Handler implements AfterShip_API_Handler
16
- {
17
-
18
- /**
19
- * Get the content type for the response
20
- *
21
- * @since 2.1
22
- * @return string
23
- */
24
- public function get_content_type()
25
- {
26
-
27
- return 'application/json; charset=' . get_option('blog_charset');
28
- }
29
-
30
- /**
31
- * Parse the raw request body entity
32
- *
33
- * @since 2.1
34
- * @param string $body the raw request body
35
- * @return array|mixed
36
- */
37
- public function parse_body($body)
38
- {
39
-
40
- return json_decode($body, true);
41
- }
42
-
43
- /**
44
- * Generate a JSON response given an array of data
45
- *
46
- * @since 2.1
47
- * @param array $data the response data
48
- * @return string
49
- */
50
- public function generate_response($data)
51
- {
52
-
53
- if (isset($_GET['_jsonp'])) {
54
-
55
- // JSONP enabled by default
56
- if (!apply_filters('aftership_api_jsonp_enabled', true)) {
57
-
58
- WC()->api->server->send_status(400);
59
-
60
- $data = array(array('code' => 'aftership_api_jsonp_disabled', 'message' => __('JSONP support is disabled on this site', 'aftership')));
61
- }
62
-
63
- // Check for invalid characters (only alphanumeric allowed)
64
- if (preg_match('/\W/', $_GET['_jsonp'])) {
65
-
66
- WC()->api->server->send_status(400);
67
-
68
- $data = array(array('code' => 'aftership_api_jsonp_callback_invalid', __('The JSONP callback function is invalid', 'aftership')));
69
- }
70
-
71
- return $_GET['_jsonp'] . '(' . json_encode($data) . ')';
72
- }
73
-
74
- return json_encode($data);
75
- }
76
-
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/class-aftership-api-orders.php DELETED
@@ -1,430 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API Orders Class
4
- *
5
- * Handles requests to the /orders endpoint
6
- *
7
- * @author AfterShip
8
- * @category API
9
- * @package AfterShip/API
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- class AfterShip_API_Orders extends AfterShip_API_Resource
16
- {
17
-
18
- /** @var string $base the route base */
19
- protected $base = '/orders';
20
-
21
- /**
22
- * Register the routes for this class
23
- *
24
- * GET /orders
25
- * GET /orders/count
26
- * GET|PUT /orders/<id>
27
- * GET /orders/<id>/notes
28
- *
29
- * @since 2.1
30
- * @param array $routes
31
- * @return array
32
- */
33
- public function register_routes($routes)
34
- {
35
-
36
- # GET /orders
37
- $routes[$this->base] = array(
38
- array(array($this, 'get_orders'), AfterShip_API_Server::READABLE),
39
- );
40
-
41
- # GET /orders/count
42
- $routes[$this->base . '/count'] = array(
43
- array(array($this, 'get_orders_count'), AfterShip_API_Server::READABLE),
44
- );
45
-
46
- # GET|PUT /orders/<id>
47
- $routes[$this->base . '/(?P<id>\d+)'] = array(
48
- array(array($this, 'get_order'), AfterShip_API_Server::READABLE),
49
- array(array($this, 'edit_order'), AfterShip_API_Server::EDITABLE | AfterShip_API_Server::ACCEPT_DATA),
50
- );
51
-
52
- # GET /orders/<id>/notes
53
- $routes[$this->base . '/(?P<id>\d+)/notes'] = array(
54
- array(array($this, 'get_order_notes'), AfterShip_API_Server::READABLE),
55
- );
56
-
57
- return $routes;
58
- }
59
-
60
- /**
61
- * Get all orders
62
- *
63
- * @since 2.1
64
- * @param string $fields
65
- * @param array $filter
66
- * @param string $status
67
- * @param int $page
68
- * @return array
69
- */
70
- public function get_orders($fields = null, $filter = array(), $status = null, $page = 1)
71
- {
72
-
73
- if (!empty($status))
74
- $filter['status'] = $status;
75
-
76
- $filter['page'] = $page;
77
-
78
- $query = $this->query_orders($filter);
79
-
80
- $orders = array();
81
-
82
- foreach ($query->posts as $order_id) {
83
-
84
- if (!$this->is_readable($order_id))
85
- continue;
86
-
87
- $orders[] = current($this->get_order($order_id, $fields));
88
- }
89
-
90
- $this->server->add_pagination_headers($query);
91
-
92
- return array('orders' => $orders);
93
- }
94
-
95
-
96
- /**
97
- * Get the order for the given ID
98
- *
99
- * @since 2.1
100
- * @param int $id the order ID
101
- * @param array $fields
102
- * @return array
103
- */
104
- public function get_order($id, $fields = null)
105
- {
106
-
107
- // ensure order ID is valid & user has permission to read
108
- $id = $this->validate_request($id, 'shop_order', 'read');
109
-
110
- if (is_wp_error($id))
111
- return $id;
112
-
113
- $order = new WC_Order($id);
114
-
115
- $order_post = get_post($id);
116
-
117
- $order_data = array(
118
- 'id' => $order->id,
119
- 'order_number' => $order->get_order_number(),
120
- 'created_at' => $this->server->format_datetime($order_post->post_date_gmt),
121
- 'updated_at' => $this->server->format_datetime($order_post->post_modified_gmt),
122
- 'completed_at' => $this->server->format_datetime($order->completed_date, true),
123
- 'status' => $order->status,
124
- 'currency' => $order->order_currency,
125
- 'total' => wc_format_decimal($order->get_total(), 2),
126
- 'subtotal' => wc_format_decimal($this->get_order_subtotal($order), 2),
127
- 'total_line_items_quantity' => $order->get_item_count(),
128
- 'total_tax' => wc_format_decimal($order->get_total_tax(), 2),
129
- 'total_shipping' => wc_format_decimal($order->get_total_shipping(), 2),
130
- 'cart_tax' => wc_format_decimal($order->get_cart_tax(), 2),
131
- 'shipping_tax' => wc_format_decimal($order->get_shipping_tax(), 2),
132
- 'total_discount' => wc_format_decimal($order->get_total_discount(), 2),
133
- 'cart_discount' => wc_format_decimal($order->get_cart_discount(), 2),
134
- 'order_discount' => wc_format_decimal($order->get_order_discount(), 2),
135
- 'shipping_methods' => $order->get_shipping_method(),
136
- 'payment_details' => array(
137
- 'method_id' => $order->payment_method,
138
- 'method_title' => $order->payment_method_title,
139
- 'paid' => isset($order->paid_date),
140
- ),
141
- 'billing_address' => array(
142
- 'first_name' => $order->billing_first_name,
143
- 'last_name' => $order->billing_last_name,
144
- 'company' => $order->billing_company,
145
- 'address_1' => $order->billing_address_1,
146
- 'address_2' => $order->billing_address_2,
147
- 'city' => $order->billing_city,
148
- 'state' => $order->billing_state,
149
- 'postcode' => $order->billing_postcode,
150
- 'country' => $order->billing_country,
151
- 'email' => $order->billing_email,
152
- 'phone' => $order->billing_phone,
153
- ),
154
- 'shipping_address' => array(
155
- 'first_name' => $order->shipping_first_name,
156
- 'last_name' => $order->shipping_last_name,
157
- 'company' => $order->shipping_company,
158
- 'address_1' => $order->shipping_address_1,
159
- 'address_2' => $order->shipping_address_2,
160
- 'city' => $order->shipping_city,
161
- 'state' => $order->shipping_state,
162
- 'postcode' => $order->shipping_postcode,
163
- 'country' => $order->shipping_country,
164
- ),
165
- 'note' => $order->customer_note,
166
- 'customer_ip' => $order->customer_ip_address,
167
- 'customer_user_agent' => $order->customer_user_agent,
168
- 'customer_id' => $order->customer_user,
169
- 'view_order_url' => $order->get_view_order_url(),
170
- 'line_items' => array(),
171
- 'shipping_lines' => array(),
172
- 'tax_lines' => array(),
173
- 'fee_lines' => array(),
174
- 'coupon_lines' => array(),
175
- );
176
-
177
- // add line items
178
- foreach ($order->get_items() as $item_id => $item) {
179
-
180
- $product = $order->get_product_from_item($item);
181
-
182
- $order_data['line_items'][] = array(
183
- 'id' => $item_id,
184
- 'subtotal' => wc_format_decimal($order->get_line_subtotal($item), 2),
185
- 'total' => wc_format_decimal($order->get_line_total($item), 2),
186
- 'total_tax' => wc_format_decimal($order->get_line_tax($item), 2),
187
- 'price' => wc_format_decimal($order->get_item_total($item), 2),
188
- 'quantity' => (int)$item['qty'],
189
- 'tax_class' => (!empty($item['tax_class'])) ? $item['tax_class'] : null,
190
- 'name' => $item['name'],
191
- 'product_id' => (isset($product->variation_id)) ? $product->variation_id : $product->id,
192
- 'sku' => is_object($product) ? $product->get_sku() : null,
193
- );
194
- }
195
-
196
- // add shipping
197
- foreach ($order->get_shipping_methods() as $shipping_item_id => $shipping_item) {
198
-
199
- $order_data['shipping_lines'][] = array(
200
- 'id' => $shipping_item_id,
201
- 'method_id' => $shipping_item['method_id'],
202
- 'method_title' => $shipping_item['name'],
203
- 'total' => wc_format_decimal($shipping_item['cost'], 2),
204
- );
205
- }
206
-
207
- // add taxes
208
- foreach ($order->get_tax_totals() as $tax_code => $tax) {
209
-
210
- $order_data['tax_lines'][] = array(
211
- 'code' => $tax_code,
212
- 'title' => $tax->label,
213
- 'total' => wc_format_decimal($tax->amount, 2),
214
- 'compound' => (bool)$tax->is_compound,
215
- );
216
- }
217
-
218
- // add fees
219
- foreach ($order->get_fees() as $fee_item_id => $fee_item) {
220
-
221
- $order_data['fee_lines'][] = array(
222
- 'id' => $fee_item_id,
223
- 'title' => $fee_item['name'],
224
- 'tax_class' => (!empty($fee_item['tax_class'])) ? $fee_item['tax_class'] : null,
225
- 'total' => wc_format_decimal($order->get_line_total($fee_item), 2),
226
- 'total_tax' => wc_format_decimal($order->get_line_tax($fee_item), 2),
227
- );
228
- }
229
-
230
- // add coupons
231
- foreach ($order->get_items('coupon') as $coupon_item_id => $coupon_item) {
232
-
233
- $order_data['coupon_lines'][] = array(
234
- 'id' => $coupon_item_id,
235
- 'code' => $coupon_item['name'],
236
- 'amount' => wc_format_decimal($coupon_item['discount_amount'], 2),
237
- );
238
- }
239
-
240
- // aftership add
241
- $options = get_option('aftership_option_name');
242
- $plugin = $options['plugin'];
243
- if ($plugin == 'aftership') {
244
- $order_data['aftership']['woocommerce']['trackings'][] = array(
245
- 'tracking_provider' => get_post_meta($order->id, '_aftership_tracking_provider', true),
246
- 'tracking_number' => get_post_meta($order->id, '_aftership_tracking_number', true),
247
- 'tracking_shipdate' => get_post_meta($order->id, '_aftership_tracking_shipdate', true),
248
- 'tracking_postal' => get_post_meta($order->id, '_aftership_tracking_postal', true),
249
- 'tracking_account' => get_post_meta($order->id, '_aftership_tracking_account', true),
250
- );
251
- } else if ($plugin == 'wc-shipment-tracking') { //$49
252
- $order_data['aftership']['woocommerce']['trackings'][] = array(
253
- 'tracking_number' => get_post_meta($order->id, '_tracking_number', true),
254
- );
255
- }
256
- // aftership add finish
257
-
258
- return array('order' => apply_filters('aftership_api_order_response', $order_data, $order, $fields, $this->server));
259
- }
260
-
261
- /**
262
- * Get the total number of orders
263
- *
264
- * @since 2.1
265
- * @param string $status
266
- * @param array $filter
267
- * @return array
268
- */
269
- public function get_orders_count($status = null, $filter = array())
270
- {
271
-
272
- if (!empty($status))
273
- $filter['status'] = $status;
274
-
275
- $query = $this->query_orders($filter);
276
-
277
- if (!current_user_can('read_private_shop_orders'))
278
- return new WP_Error('aftership_api_user_cannot_read_orders_count', __('You do not have permission to read the orders count', 'aftership'), array('status' => 401));
279
-
280
- return array('count' => (int)$query->found_posts);
281
- }
282
-
283
- /**
284
- * Edit an order
285
- *
286
- * API v1 only allows updating the status of an order
287
- *
288
- * @since 2.1
289
- * @param int $id the order ID
290
- * @param array $data
291
- * @return array
292
- */
293
- public function edit_order($id, $data)
294
- {
295
-
296
- $id = $this->validate_request($id, 'shop_order', 'edit');
297
-
298
- if (is_wp_error($id))
299
- return $id;
300
-
301
- $order = new WC_Order($id);
302
-
303
- if (!empty($data['status'])) {
304
-
305
- $order->update_status($data['status'], isset($data['note']) ? $data['note'] : '');
306
- }
307
-
308
- return $this->get_order($id);
309
- }
310
-
311
- /**
312
- * Delete an order
313
- *
314
- * @TODO enable along with POST in 2.2
315
- * @param int $id the order ID
316
- * @param bool $force true to permanently delete order, false to move to trash
317
- * @return array
318
- */
319
- public function delete_order($id, $force = false)
320
- {
321
-
322
- $id = $this->validate_request($id, 'shop_order', 'delete');
323
-
324
- return $this->delete($id, 'order', ('true' === $force));
325
- }
326
-
327
- /**
328
- * Get the admin order notes for an order
329
- *
330
- * @since 2.1
331
- * @param int $id the order ID
332
- * @param string $fields fields to include in response
333
- * @return array
334
- */
335
- public function get_order_notes($id, $fields = null)
336
- {
337
-
338
- // ensure ID is valid order ID
339
- $id = $this->validate_request($id, 'shop_order', 'read');
340
-
341
- if (is_wp_error($id))
342
- return $id;
343
-
344
- $args = array(
345
- 'post_id' => $id,
346
- 'approve' => 'approve',
347
- 'type' => 'order_note'
348
- );
349
-
350
- remove_filter('comments_clauses', array('WC_Comments', 'exclude_order_comments'), 10, 1);
351
-
352
- $notes = get_comments($args);
353
-
354
- add_filter('comments_clauses', array('WC_Comments', 'exclude_order_comments'), 10, 1);
355
-
356
- $order_notes = array();
357
-
358
- foreach ($notes as $note) {
359
-
360
- $order_notes[] = array(
361
- 'id' => $note->comment_ID,
362
- 'created_at' => $this->server->format_datetime($note->comment_date_gmt),
363
- 'note' => $note->comment_content,
364
- 'customer_note' => get_comment_meta($note->comment_ID, 'is_customer_note', true) ? true : false,
365
- );
366
- }
367
-
368
- return array('order_notes' => apply_filters('aftership_api_order_notes_response', $order_notes, $id, $fields, $notes, $this->server));
369
- }
370
-
371
- /**
372
- * Helper method to get order post objects
373
- *
374
- * @since 2.1
375
- * @param array $args request arguments for filtering query
376
- * @return WP_Query
377
- */
378
- private function query_orders($args)
379
- {
380
-
381
- // set base query arguments
382
- $query_args = array(
383
- 'fields' => 'ids',
384
- 'post_type' => 'shop_order',
385
- 'post_status' => 'publish',
386
- );
387
-
388
- // add status argument
389
- if (!empty($args['status'])) {
390
-
391
- $statuses = explode(',', $args['status']);
392
-
393
- $query_args['tax_query'] = array(
394
- array(
395
- 'taxonomy' => 'shop_order_status',
396
- 'field' => 'slug',
397
- 'terms' => $statuses,
398
- ),
399
- );
400
-
401
- unset($args['status']);
402
- }
403
-
404
- $query_args = $this->merge_query_args($query_args, $args);
405
-
406
- return new WP_Query($query_args);
407
- }
408
-
409
- /**
410
- * Helper method to get the order subtotal
411
- *
412
- * @since 2.1
413
- * @param WC_Order $order
414
- * @return float
415
- */
416
- private function get_order_subtotal($order)
417
- {
418
-
419
- $subtotal = 0;
420
-
421
- // subtotal
422
- foreach ($order->get_items() as $item) {
423
-
424
- $subtotal += (isset($item['line_subtotal'])) ? $item['line_subtotal'] : 0;
425
- }
426
-
427
- return $subtotal;
428
- }
429
-
430
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/class-aftership-api-resource.php DELETED
@@ -1,410 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API Resource class
4
- *
5
- * Provides shared functionality for resource-specific API classes
6
- *
7
- * @author AfterShip
8
- * @category API
9
- * @package AfterShip/API
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- class AfterShip_API_Resource
16
- {
17
-
18
- /** @var WC_API_Server the API server */
19
- protected $server;
20
-
21
- /** @var string sub-classes override this to set a resource-specific base route */
22
- protected $base;
23
-
24
- /**
25
- * Setup class
26
- *
27
- * @since 2.1
28
- * @param WC_API_Server $server
29
- * @return WC_API_Resource
30
- */
31
- public function __construct(AfterShip_API_Server $server)
32
- {
33
-
34
- $this->server = $server;
35
-
36
- // automatically register routes for sub-classes
37
- add_filter('aftership_api_endpoints', array($this, 'register_routes'));
38
-
39
- // remove fields from responses when requests specify certain fields
40
- // note these are hooked at a later priority so data added via filters (e.g. customer data to the order response)
41
- // still has the fields filtered properly
42
- foreach (array('order', 'coupon', 'customer', 'product', 'report') as $resource) {
43
-
44
- add_filter("aftership_api_{$resource}_response", array($this, 'maybe_add_meta'), 15, 2);
45
- add_filter("aftership_api_{$resource}_response", array($this, 'filter_response_fields'), 20, 3);
46
- }
47
- }
48
-
49
- /**
50
- * Validate the request by checking:
51
- *
52
- * 1) the ID is a valid integer
53
- * 2) the ID returns a valid post object and matches the provided post type
54
- * 3) the current user has the proper permissions to read/edit/delete the post
55
- *
56
- * @since 2.1
57
- * @param string|int $id the post ID
58
- * @param string $type the post type, either `shop_order`, `shop_coupon`, or `product`
59
- * @param string $context the context of the request, either `read`, `edit` or `delete`
60
- * @return int|WP_Error valid post ID or WP_Error if any of the checks fails
61
- */
62
- protected function validate_request($id, $type, $context)
63
- {
64
-
65
- if ('shop_order' === $type || 'shop_coupon' === $type)
66
- $resource_name = str_replace('shop_', '', $type);
67
- else
68
- $resource_name = $type;
69
-
70
- $id = absint($id);
71
-
72
- // validate ID
73
- if (empty($id))
74
- return new WP_Error("aftership_api_invalid_{$resource_name}_id", sprintf(__('Invalid %s ID', 'aftership'), $type), array('status' => 404));
75
-
76
- // only custom post types have per-post type/permission checks
77
- if ('customer' !== $type) {
78
-
79
- $post = get_post($id);
80
-
81
- // for checking permissions, product variations are the same as the product post type
82
- $post_type = ('product_variation' === $post->post_type) ? 'product' : $post->post_type;
83
-
84
- // validate post type
85
- if ($type !== $post_type)
86
- return new WP_Error("aftership_api_invalid_{$resource_name}", sprintf(__('Invalid %s', 'aftership'), $resource_name), array('status' => 404));
87
-
88
- // validate permissions
89
- switch ($context) {
90
-
91
- case 'read':
92
- if (!$this->is_readable($post))
93
- return new WP_Error("aftership_api_user_cannot_read_{$resource_name}", sprintf(__('You do not have permission to read this %s', 'aftership'), $resource_name), array('status' => 401));
94
- break;
95
-
96
- case 'edit':
97
- if (!$this->is_editable($post))
98
- return new WP_Error("aftership_api_user_cannot_edit_{$resource_name}", sprintf(__('You do not have permission to edit this %s', 'aftership'), $resource_name), array('status' => 401));
99
- break;
100
-
101
- case 'delete':
102
- if (!$this->is_deletable($post))
103
- return new WP_Error("aftership_api_user_cannot_delete_{$resource_name}", sprintf(__('You do not have permission to delete this %s', 'aftership'), $resource_name), array('status' => 401));
104
- break;
105
- }
106
- }
107
-
108
- return $id;
109
- }
110
-
111
- /**
112
- * Add common request arguments to argument list before WP_Query is run
113
- *
114
- * @since 2.1
115
- * @param array $base_args required arguments for the query (e.g. `post_type`, etc)
116
- * @param array $request_args arguments provided in the request
117
- * @return array
118
- */
119
- protected function merge_query_args($base_args, $request_args)
120
- {
121
-
122
- $args = array();
123
-
124
- // date
125
- if (!empty($request_args['created_at_min']) || !empty($request_args['created_at_max']) || !empty($request_args['updated_at_min']) || !empty($request_args['updated_at_max'])) {
126
-
127
- $args['date_query'] = array();
128
-
129
- // resources created after specified date
130
- if (!empty($request_args['created_at_min']))
131
- $args['date_query'][] = array('column' => 'post_date_gmt', 'after' => $this->server->parse_datetime($request_args['created_at_min']), 'inclusive' => true);
132
-
133
- // resources created before specified date
134
- if (!empty($request_args['created_at_max']))
135
- $args['date_query'][] = array('column' => 'post_date_gmt', 'before' => $this->server->parse_datetime($request_args['created_at_max']), 'inclusive' => true);
136
-
137
- // resources updated after specified date
138
- if (!empty($request_args['updated_at_min']))
139
- $args['date_query'][] = array('column' => 'post_modified_gmt', 'after' => $this->server->parse_datetime($request_args['updated_at_min']), 'inclusive' => true);
140
-
141
- // resources updated before specified date
142
- if (!empty($request_args['updated_at_max']))
143
- $args['date_query'][] = array('column' => 'post_modified_gmt', 'before' => $this->server->parse_datetime($request_args['updated_at_max']), 'inclusive' => true);
144
- }
145
-
146
- // search
147
- if (!empty($request_args['q']))
148
- $args['s'] = $request_args['q'];
149
-
150
- // resources per response
151
- if (!empty($request_args['limit']))
152
- $args['posts_per_page'] = $request_args['limit'];
153
-
154
- // resource offset
155
- if (!empty($request_args['offset']))
156
- $args['offset'] = $request_args['offset'];
157
-
158
- // resource page
159
- $args['paged'] = (isset($request_args['page'])) ? absint($request_args['page']) : 1;
160
-
161
- return array_merge($base_args, $args);
162
- }
163
-
164
- /**
165
- * Add meta to resources when requested by the client. Meta is added as a top-level
166
- * `<resource_name>_meta` attribute (e.g. `order_meta`) as a list of key/value pairs
167
- *
168
- * @since 2.1
169
- * @param array $data the resource data
170
- * @param object $resource the resource object (e.g WC_Order)
171
- * @return mixed
172
- */
173
- public function maybe_add_meta($data, $resource)
174
- {
175
-
176
- if (isset($this->server->params['GET']['filter']['meta']) && 'true' === $this->server->params['GET']['filter']['meta'] && is_object($resource)) {
177
-
178
- // don't attempt to add meta more than once
179
- if (preg_grep('/[a-z]+_meta/', array_keys($data)))
180
- return $data;
181
-
182
- // define the top-level property name for the meta
183
- switch (get_class($resource)) {
184
-
185
- case 'WC_Order':
186
- $meta_name = 'order_meta';
187
- break;
188
-
189
- case 'WC_Coupon':
190
- $meta_name = 'coupon_meta';
191
- break;
192
-
193
- case 'WP_User':
194
- $meta_name = 'customer_meta';
195
- break;
196
-
197
- default:
198
- $meta_name = 'product_meta';
199
- break;
200
- }
201
-
202
- if (is_a($resource, 'WP_User')) {
203
-
204
- // customer meta
205
- $meta = (array)get_user_meta($resource->ID);
206
-
207
- } elseif (is_a($resource, 'WC_Product_Variation')) {
208
-
209
- // product variation meta
210
- $meta = (array)get_post_meta($resource->get_variation_id());
211
-
212
- } else {
213
-
214
- // coupon/order/product meta
215
- $meta = (array)get_post_meta($resource->id);
216
- }
217
-
218
- foreach ($meta as $meta_key => $meta_value) {
219
-
220
- // don't add hidden meta by default
221
- if (!is_protected_meta($meta_key)) {
222
- $data[$meta_name][$meta_key] = maybe_unserialize($meta_value[0]);
223
- }
224
- }
225
-
226
- }
227
-
228
- return $data;
229
- }
230
-
231
- /**
232
- * Restrict the fields included in the response if the request specified certain only certain fields should be returned
233
- *
234
- * @since 2.1
235
- * @param array $data the response data
236
- * @param object $resource the object that provided the response data, e.g. WC_Coupon or WC_Order
237
- * @param array|string the requested list of fields to include in the response
238
- * @return array response data
239
- */
240
- public function filter_response_fields($data, $resource, $fields)
241
- {
242
-
243
- if (!is_array($data) || empty($fields))
244
- return $data;
245
-
246
- $fields = explode(',', $fields);
247
- $sub_fields = array();
248
-
249
- // get sub fields
250
- foreach ($fields as $field) {
251
-
252
- if (false !== strpos($field, '.')) {
253
-
254
- list($name, $value) = explode('.', $field);
255
-
256
- $sub_fields[$name] = $value;
257
- }
258
- }
259
-
260
- // iterate through top-level fields
261
- foreach ($data as $data_field => $data_value) {
262
-
263
- // if a field has sub-fields and the top-level field has sub-fields to filter
264
- if (is_array($data_value) && in_array($data_field, array_keys($sub_fields))) {
265
-
266
- // iterate through each sub-field
267
- foreach ($data_value as $sub_field => $sub_field_value) {
268
-
269
- // remove non-matching sub-fields
270
- if (!in_array($sub_field, $sub_fields)) {
271
- unset($data[$data_field][$sub_field]);
272
- }
273
- }
274
-
275
- } else {
276
-
277
- // remove non-matching top-level fields
278
- if (!in_array($data_field, $fields)) {
279
- unset($data[$data_field]);
280
- }
281
- }
282
- }
283
-
284
- return $data;
285
- }
286
-
287
- /**
288
- * Delete a given resource
289
- *
290
- * @since 2.1
291
- * @param int $id the resource ID
292
- * @param string $type the resource post type, or `customer`
293
- * @param bool $force true to permanently delete resource, false to move to trash (not supported for `customer`)
294
- * @return array|WP_Error
295
- */
296
- protected function delete($id, $type, $force = false)
297
- {
298
-
299
- if ('shop_order' === $type || 'shop_coupon' === $type)
300
- $resource_name = str_replace('shop_', '', $type);
301
- else
302
- $resource_name = $type;
303
-
304
- if ('customer' === $type) {
305
-
306
- $result = wp_delete_user($id);
307
-
308
- if ($result)
309
- return array('message' => __('Permanently deleted customer', 'aftership'));
310
- else
311
- return new WP_Error('aftership_api_cannot_delete_customer', __('The customer cannot be deleted', 'aftership'), array('status' => 500));
312
-
313
- } else {
314
-
315
- // delete order/coupon/product
316
-
317
- $result = ($force) ? wp_delete_post($id, true) : wp_trash_post($id);
318
-
319
- if (!$result)
320
- return new WP_Error("aftership_api_cannot_delete_{$resource_name}", sprintf(__('This %s cannot be deleted', 'aftership'), $resource_name), array('status' => 500));
321
-
322
- if ($force) {
323
- return array('message' => sprintf(__('Permanently deleted %s', 'aftership'), $resource_name));
324
-
325
- } else {
326
-
327
- $this->server->send_status('202');
328
-
329
- return array('message' => sprintf(__('Deleted %s', 'aftership'), $resource_name));
330
- }
331
- }
332
- }
333
-
334
-
335
- /**
336
- * Checks if the given post is readable by the current user
337
- *
338
- * @since 2.1
339
- * @see WC_API_Resource::check_permission()
340
- * @param WP_Post|int $post
341
- * @return bool
342
- */
343
- protected function is_readable($post)
344
- {
345
-
346
- return $this->check_permission($post, 'read');
347
- }
348
-
349
- /**
350
- * Checks if the given post is editable by the current user
351
- *
352
- * @since 2.1
353
- * @see WC_API_Resource::check_permission()
354
- * @param WP_Post|int $post
355
- * @return bool
356
- */
357
- protected function is_editable($post)
358
- {
359
-
360
- return $this->check_permission($post, 'edit');
361
-
362
- }
363
-
364
- /**
365
- * Checks if the given post is deletable by the current user
366
- *
367
- * @since 2.1
368
- * @see WC_API_Resource::check_permission()
369
- * @param WP_Post|int $post
370
- * @return bool
371
- */
372
- protected function is_deletable($post)
373
- {
374
-
375
- return $this->check_permission($post, 'delete');
376
- }
377
-
378
- /**
379
- * Checks the permissions for the current user given a post and context
380
- *
381
- * @since 2.1
382
- * @param WP_Post|int $post
383
- * @param string $context the type of permission to check, either `read`, `write`, or `delete`
384
- * @return bool true if the current user has the permissions to perform the context on the post
385
- */
386
- private function check_permission($post, $context)
387
- {
388
-
389
- if (!is_a($post, 'WP_Post'))
390
- $post = get_post($post);
391
-
392
- if (is_null($post))
393
- return false;
394
-
395
- $post_type = get_post_type_object($post->post_type);
396
-
397
- if ('read' === $context)
398
- return current_user_can($post_type->cap->read_private_posts, $post->ID);
399
-
400
- elseif ('edit' === $context)
401
- return current_user_can($post_type->cap->edit_post, $post->ID);
402
-
403
- elseif ('delete' === $context)
404
- return current_user_can($post_type->cap->delete_post, $post->ID);
405
-
406
- else
407
- return false;
408
- }
409
-
410
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/class-aftership-api-server.php DELETED
@@ -1,766 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API
4
- *
5
- * Handles REST API requests
6
- *
7
- * This class and related code (JSON response handler, resource classes) are based on WP-API v0.6 (https://github.com/WP-API/WP-API)
8
- * Many thanks to Ryan McCue and any other contributors!
9
- *
10
- * @author AfterShip
11
- * @category API
12
- * @package AfterShip/API
13
- * @since 1.0
14
- */
15
-
16
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
17
-
18
- require_once ABSPATH . 'wp-admin/includes/admin.php';
19
-
20
- class AfterShip_API_Server
21
- {
22
-
23
- const METHOD_GET = 1;
24
- const METHOD_POST = 2;
25
- const METHOD_PUT = 4;
26
- const METHOD_PATCH = 8;
27
- const METHOD_DELETE = 16;
28
-
29
- const READABLE = 1; // GET
30
- const CREATABLE = 2; // POST
31
- const EDITABLE = 14; // POST | PUT | PATCH
32
- const DELETABLE = 16; // DELETE
33
- const ALLMETHODS = 31; // GET | POST | PUT | PATCH | DELETE
34
-
35
- /**
36
- * Does the endpoint accept a raw request body?
37
- */
38
- const ACCEPT_RAW_DATA = 64;
39
-
40
- /** Does the endpoint accept a request body? (either JSON or XML) */
41
- const ACCEPT_DATA = 128;
42
-
43
- /**
44
- * Should we hide this endpoint from the index?
45
- */
46
- const HIDDEN_ENDPOINT = 256;
47
-
48
- /**
49
- * Map of HTTP verbs to constants
50
- * @var array
51
- */
52
- public static $method_map = array(
53
- 'HEAD' => self::METHOD_GET,
54
- 'GET' => self::METHOD_GET,
55
- 'POST' => self::METHOD_POST,
56
- 'PUT' => self::METHOD_PUT,
57
- 'PATCH' => self::METHOD_PATCH,
58
- 'DELETE' => self::METHOD_DELETE,
59
- );
60
-
61
- /**
62
- * Requested path (relative to the API root, wp-json.php)
63
- *
64
- * @var string
65
- */
66
- public $path = '';
67
-
68
- /**
69
- * Requested method (GET/HEAD/POST/PUT/PATCH/DELETE)
70
- *
71
- * @var string
72
- */
73
- public $method = 'HEAD';
74
-
75
- /**
76
- * Request parameters
77
- *
78
- * This acts as an abstraction of the superglobals
79
- * (GET => $_GET, POST => $_POST)
80
- *
81
- * @var array
82
- */
83
- public $params = array('GET' => array(), 'POST' => array());
84
-
85
- /**
86
- * Request headers
87
- *
88
- * @var array
89
- */
90
- public $headers = array();
91
-
92
- /**
93
- * Request files (matches $_FILES)
94
- *
95
- * @var array
96
- */
97
- public $files = array();
98
-
99
- /**
100
- * Request/Response handler, either JSON by default
101
- * or XML if requested by client
102
- *
103
- * @var WC_API_Handler
104
- */
105
- public $handler;
106
-
107
-
108
- /**
109
- * Setup class and set request/response handler
110
- *
111
- * @since 2.1
112
- * @param $path
113
- * @return WC_API_Server
114
- */
115
- public function __construct($path)
116
- {
117
-
118
- if (empty($path)) {
119
- if (isset($_SERVER['PATH_INFO']))
120
- $path = $_SERVER['PATH_INFO'];
121
- else
122
- $path = '/';
123
- }
124
-
125
- $this->path = $path;
126
- $this->method = $_SERVER['REQUEST_METHOD'];
127
- $this->params['GET'] = $_GET;
128
- $this->params['POST'] = $_POST;
129
- $this->headers = $this->get_headers($_SERVER);
130
- $this->files = $_FILES;
131
-
132
- // Compatibility for clients that can't use PUT/PATCH/DELETE
133
- if (isset($_GET['_method'])) {
134
- $this->method = strtoupper($_GET['_method']);
135
- }
136
-
137
- // determine type of request/response and load handler, JSON by default
138
- if ($this->is_json_request())
139
- $handler_class = 'AfterShip_API_JSON_Handler';
140
-
141
- elseif ($this->is_xml_request())
142
- $handler_class = 'WC_API_XML_Handler';
143
-
144
- else
145
- $handler_class = apply_filters('aftership_api_default_response_handler', 'AfterShip_API_JSON_Handler', $this->path, $this);
146
-
147
- $this->handler = new $handler_class();
148
- }
149
-
150
- /**
151
- * Check authentication for the request
152
- *
153
- * @since 2.1
154
- * @return WP_User|WP_Error WP_User object indicates successful login, WP_Error indicates unsuccessful login
155
- */
156
- public function check_authentication()
157
- {
158
-
159
- // allow plugins to remove default authentication or add their own authentication
160
- $user = apply_filters('aftership_api_check_authentication', null, $this);
161
-
162
- // API requests run under the context of the authenticated user
163
- if (is_a($user, 'WP_User'))
164
- wp_set_current_user($user->ID);
165
-
166
- // WP_Errors are handled in serve_request()
167
- elseif (!is_wp_error($user))
168
- $user = new WP_Error('aftership_api_authentication_error', __('Invalid authentication method', 'aftership'), array('code' => 500));
169
-
170
- return $user;
171
- }
172
-
173
- /**
174
- * Convert an error to an array
175
- *
176
- * This iterates over all error codes and messages to change it into a flat
177
- * array. This enables simpler client behaviour, as it is represented as a
178
- * list in JSON rather than an object/map
179
- *
180
- * @since 2.1
181
- * @param WP_Error $error
182
- * @return array List of associative arrays with code and message keys
183
- */
184
- protected function error_to_array($error)
185
- {
186
- $errors = array();
187
- foreach ((array)$error->errors as $code => $messages) {
188
- foreach ((array)$messages as $message) {
189
- $errors[] = array('code' => $code, 'message' => $message);
190
- }
191
- }
192
- return array('errors' => $errors);
193
- }
194
-
195
- /**
196
- * Handle serving an API request
197
- *
198
- * Matches the current server URI to a route and runs the first matching
199
- * callback then outputs a JSON representation of the returned value.
200
- *
201
- * @since 2.1
202
- * @uses WC_API_Server::dispatch()
203
- */
204
- public function serve_request()
205
- {
206
-
207
- do_action('aftership_api_server_before_serve', $this);
208
-
209
- $this->header('Content-Type', $this->handler->get_content_type(), true);
210
-
211
- // the API is enabled by default
212
- if (!apply_filters('aftership_api_enabled', true, $this) || ('no' === get_option('aftership_api_enabled'))) {
213
-
214
- $this->send_status(404);
215
-
216
- echo $this->handler->generate_response(array('errors' => array('code' => 'aftership_api_disabled', 'message' => 'The WooCommerce API is disabled on this site')));
217
-
218
- return;
219
- }
220
-
221
- $result = $this->check_authentication();
222
-
223
- // if authorization check was successful, dispatch the request
224
- if (!is_wp_error($result)) {
225
- $result = $this->dispatch();
226
- }
227
-
228
- // handle any dispatch errors
229
- if (is_wp_error($result)) {
230
- $data = $result->get_error_data();
231
- if (is_array($data) && isset($data['status'])) {
232
- $this->send_status($data['status']);
233
- }
234
-
235
- $result = $this->error_to_array($result);
236
- }
237
-
238
- // This is a filter rather than an action, since this is designed to be
239
- // re-entrant if needed
240
- $served = apply_filters('aftership_api_serve_request', false, $result, $this);
241
-
242
- if (!$served) {
243
-
244
- if ('HEAD' === $this->method)
245
- return;
246
-
247
- echo $this->handler->generate_response($result);
248
- }
249
- }
250
-
251
- /**
252
- * Retrieve the route map
253
- *
254
- * The route map is an associative array with path regexes as the keys. The
255
- * value is an indexed array with the callback function/method as the first
256
- * item, and a bitmask of HTTP methods as the second item (see the class
257
- * constants).
258
- *
259
- * Each route can be mapped to more than one callback by using an array of
260
- * the indexed arrays. This allows mapping e.g. GET requests to one callback
261
- * and POST requests to another.
262
- *
263
- * Note that the path regexes (array keys) must have @ escaped, as this is
264
- * used as the delimiter with preg_match()
265
- *
266
- * @since 2.1
267
- * @return array `'/path/regex' => array( $callback, $bitmask )` or `'/path/regex' => array( array( $callback, $bitmask ), ...)`
268
- */
269
- public function get_routes()
270
- {
271
-
272
- // index added by default
273
- $endpoints = array(
274
-
275
- '/' => array(array($this, 'get_index'), self::READABLE),
276
- );
277
-
278
- $endpoints = apply_filters('aftership_api_endpoints', $endpoints);
279
-
280
- // Normalise the endpoints
281
- foreach ($endpoints as $route => &$handlers) {
282
- if (count($handlers) <= 2 && isset($handlers[1]) && !is_array($handlers[1])) {
283
- $handlers = array($handlers);
284
- }
285
- }
286
-
287
- return $endpoints;
288
- }
289
-
290
- /**
291
- * Match the request to a callback and call it
292
- *
293
- * @since 2.1
294
- * @return mixed The value returned by the callback, or a WP_Error instance
295
- */
296
- public function dispatch()
297
- {
298
-
299
- switch ($this->method) {
300
-
301
- case 'HEAD':
302
- case 'GET':
303
- $method = self::METHOD_GET;
304
- break;
305
- /*
306
- case 'POST':
307
- $method = self::METHOD_POST;
308
- break;
309
-
310
- case 'PUT':
311
- $method = self::METHOD_PUT;
312
- break;
313
-
314
- case 'PATCH':
315
- $method = self::METHOD_PATCH;
316
- break;
317
-
318
- case 'DELETE':
319
- $method = self::METHOD_DELETE;
320
- break;
321
- */
322
- default:
323
- return new WP_Error('aftership_api_unsupported_method', __('Unsupported request method', 'aftership'), array('status' => 400));
324
- }
325
-
326
- foreach ($this->get_routes() as $route => $handlers) {
327
- foreach ($handlers as $handler) {
328
- $callback = $handler[0];
329
- $supported = isset($handler[1]) ? $handler[1] : self::METHOD_GET;
330
-
331
- if (!($supported & $method))
332
- continue;
333
-
334
- $match = preg_match('@^' . $route . '$@i', urldecode($this->path), $args);
335
-
336
- if (!$match)
337
- continue;
338
-
339
- if (!is_callable($callback))
340
- return new WP_Error('aftership_api_invalid_handler', __('The handler for the route is invalid', 'aftership'), array('status' => 500));
341
-
342
- $args = array_merge($args, $this->params['GET']);
343
- if ($method & self::METHOD_POST) {
344
- $args = array_merge($args, $this->params['POST']);
345
- }
346
- if ($supported & self::ACCEPT_DATA) {
347
- $data = $this->handler->parse_body($this->get_raw_data());
348
- $args = array_merge($args, array('data' => $data));
349
- } elseif ($supported & self::ACCEPT_RAW_DATA) {
350
- $data = $this->get_raw_data();
351
- $args = array_merge($args, array('data' => $data));
352
- }
353
-
354
- $args['_method'] = $method;
355
- $args['_route'] = $route;
356
- $args['_path'] = $this->path;
357
- $args['_headers'] = $this->headers;
358
- $args['_files'] = $this->files;
359
-
360
- $args = apply_filters('aftership_api_dispatch_args', $args, $callback);
361
-
362
- // Allow plugins to halt the request via this filter
363
- if (is_wp_error($args)) {
364
- return $args;
365
- }
366
-
367
- $params = $this->sort_callback_params($callback, $args);
368
- if (is_wp_error($params))
369
- return $params;
370
-
371
- return call_user_func_array($callback, $params);
372
- }
373
- }
374
-
375
- return new WP_Error('aftership_api_no_route', __('No route was found matching the URL and request method', 'aftership'), array('status' => 404));
376
- }
377
-
378
- /**
379
- * Sort parameters by order specified in method declaration
380
- *
381
- * Takes a callback and a list of available params, then filters and sorts
382
- * by the parameters the method actually needs, using the Reflection API
383
- *
384
- * @since 2.1
385
- * @param callable|array $callback the endpoint callback
386
- * @param array $provided the provided request parameters
387
- * @return array
388
- */
389
- protected function sort_callback_params($callback, $provided)
390
- {
391
- if (is_array($callback))
392
- $ref_func = new ReflectionMethod($callback[0], $callback[1]);
393
- else
394
- $ref_func = new ReflectionFunction($callback);
395
-
396
- $wanted = $ref_func->getParameters();
397
- $ordered_parameters = array();
398
-
399
- foreach ($wanted as $param) {
400
- if (isset($provided[$param->getName()])) {
401
- // We have this parameters in the list to choose from
402
-
403
- $ordered_parameters[] = is_array($provided[$param->getName()]) ? array_map('urldecode', $provided[$param->getName()]) : urldecode($provided[$param->getName()]);
404
- } elseif ($param->isDefaultValueAvailable()) {
405
- // We don't have this parameter, but it's optional
406
- $ordered_parameters[] = $param->getDefaultValue();
407
- } else {
408
- // We don't have this parameter and it wasn't optional, abort!
409
- return new WP_Error('aftership_api_missing_callback_param', sprintf(__('Missing parameter %s', 'aftership'), $param->getName()), array('status' => 400));
410
- }
411
- }
412
- return $ordered_parameters;
413
- }
414
-
415
- /**
416
- * Get the site index.
417
- *
418
- * This endpoint describes the capabilities of the site.
419
- *
420
- * @since 2.1
421
- * @return array Index entity
422
- */
423
- public function get_index()
424
- {
425
-
426
- // General site data
427
- $available = array('store' => array(
428
- 'name' => get_option('blogname'),
429
- 'description' => get_option('blogdescription'),
430
- 'URL' => get_option('siteurl'),
431
- 'wc_version' => WC()->version,
432
- 'routes' => array(),
433
- 'meta' => array(
434
- 'timezone' => wc_timezone_string(),
435
- 'currency' => get_aftership_currency(),
436
- 'currency_format' => get_aftership_currency_symbol(),
437
- 'tax_included' => ('yes' === get_option('aftership_prices_include_tax')),
438
- 'weight_unit' => get_option('aftership_weight_unit'),
439
- 'dimension_unit' => get_option('aftership_dimension_unit'),
440
- 'ssl_enabled' => ('yes' === get_option('aftership_force_ssl_checkout')),
441
- 'permalinks_enabled' => ('' !== get_option('permalink_structure')),
442
- 'links' => array(
443
- 'help' => 'https://aftership.uservoice.com/knowledgebase',
444
- ),
445
- ),
446
- ));
447
-
448
- // Find the available routes
449
- foreach ($this->get_routes() as $route => $callbacks) {
450
- $data = array();
451
-
452
- $route = preg_replace('#\(\?P(<\w+?>).*?\)#', '$1', $route);
453
- $methods = array();
454
- foreach (self::$method_map as $name => $bitmask) {
455
- foreach ($callbacks as $callback) {
456
- // Skip to the next route if any callback is hidden
457
- if ($callback[1] & self::HIDDEN_ENDPOINT)
458
- continue 3;
459
-
460
- if ($callback[1] & $bitmask)
461
- $data['supports'][] = $name;
462
-
463
- if ($callback[1] & self::ACCEPT_DATA)
464
- $data['accepts_data'] = true;
465
-
466
- // For non-variable routes, generate links
467
- if (strpos($route, '<') === false) {
468
- $data['meta'] = array(
469
- 'self' => get_aftership_api_url($route),
470
- );
471
- }
472
- }
473
- }
474
- $available['store']['routes'][$route] = apply_filters('aftership_api_endpoints_description', $data);
475
- }
476
- return apply_filters('aftership_api_index', $available);
477
- }
478
-
479
- /**
480
- * Send a HTTP status code
481
- *
482
- * @since 2.1
483
- * @param int $code HTTP status
484
- */
485
- public function send_status($code)
486
- {
487
- status_header($code);
488
- }
489
-
490
- /**
491
- * Send a HTTP header
492
- *
493
- * @since 2.1
494
- * @param string $key Header key
495
- * @param string $value Header value
496
- * @param boolean $replace Should we replace the existing header?
497
- */
498
- public function header($key, $value, $replace = true)
499
- {
500
- header(sprintf('%s: %s', $key, $value), $replace);
501
- }
502
-
503
- /**
504
- * Send a Link header
505
- *
506
- * @internal The $rel parameter is first, as this looks nicer when sending multiple
507
- *
508
- * @link http://tools.ietf.org/html/rfc5988
509
- * @link http://www.iana.org/assignments/link-relations/link-relations.xml
510
- *
511
- * @since 2.1
512
- * @param string $rel Link relation. Either a registered type, or an absolute URL
513
- * @param string $link Target IRI for the link
514
- * @param array $other Other parameters to send, as an associative array
515
- */
516
- public function link_header($rel, $link, $other = array())
517
- {
518
-
519
- $header = sprintf('<%s>; rel="%s"', $link, esc_attr($rel));
520
-
521
- foreach ($other as $key => $value) {
522
-
523
- if ('title' == $key) {
524
-
525
- $value = '"' . $value . '"';
526
- }
527
-
528
- $header .= '; ' . $key . '=' . $value;
529
- }
530
-
531
- $this->header('Link', $header, false);
532
- }
533
-
534
- /**
535
- * Send pagination headers for resources
536
- *
537
- * @since 2.1
538
- * @param WP_Query|WP_User_Query $query
539
- */
540
- public function add_pagination_headers($query)
541
- {
542
-
543
- // WP_User_Query
544
- if (is_a($query, 'WP_User_Query')) {
545
-
546
- $page = $query->page;
547
- $single = count($query->get_results()) > 1;
548
- $total = $query->get_total();
549
- $total_pages = $query->total_pages;
550
-
551
- // WP_Query
552
- } else {
553
-
554
- $page = $query->get('paged');
555
- $single = $query->is_single();
556
- $total = $query->found_posts;
557
- $total_pages = $query->max_num_pages;
558
- }
559
-
560
- if (!$page)
561
- $page = 1;
562
-
563
- $next_page = absint($page) + 1;
564
-
565
- if (!$single) {
566
-
567
- // first/prev
568
- if ($page > 1) {
569
- $this->link_header('first', $this->get_paginated_url(1));
570
- $this->link_header('prev', $this->get_paginated_url($page - 1));
571
- }
572
-
573
- // next
574
- if ($next_page <= $total_pages) {
575
- $this->link_header('next', $this->get_paginated_url($next_page));
576
- }
577
-
578
- // last
579
- if ($page != $total_pages)
580
- $this->link_header('last', $this->get_paginated_url($total_pages));
581
- }
582
-
583
- $this->header('X-WC-Total', $total);
584
- $this->header('X-WC-TotalPages', $total_pages);
585
-
586
- do_action('aftership_api_pagination_headers', $this, $query);
587
- }
588
-
589
- /**
590
- * Returns the request URL with the page query parameter set to the specified page
591
- *
592
- * @since 2.1
593
- * @param int $page
594
- * @return string
595
- */
596
- private function get_paginated_url($page)
597
- {
598
-
599
- // remove existing page query param
600
- $request = remove_query_arg('page');
601
-
602
- // add provided page query param
603
- $request = urldecode(add_query_arg('page', $page, $request));
604
-
605
- // get the home host
606
- $host = parse_url(get_home_url(), PHP_URL_HOST);
607
-
608
- return set_url_scheme("http://{$host}{$request}");
609
- }
610
-
611
- /**
612
- * Retrieve the raw request entity (body)
613
- *
614
- * @since 2.1
615
- * @return string
616
- */
617
- public function get_raw_data()
618
- {
619
- global $HTTP_RAW_POST_DATA;
620
-
621
- // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
622
- // but we can do it ourself.
623
- if (!isset($HTTP_RAW_POST_DATA)) {
624
- $HTTP_RAW_POST_DATA = file_get_contents('php://input');
625
- }
626
-
627
- return $HTTP_RAW_POST_DATA;
628
- }
629
-
630
- /**
631
- * Parse an RFC3339 datetime into a MySQl datetime
632
- *
633
- * Invalid dates default to unix epoch
634
- *
635
- * @since 2.1
636
- * @param string $datetime RFC3339 datetime
637
- * @return string MySQl datetime (YYYY-MM-DD HH:MM:SS)
638
- */
639
- public function parse_datetime($datetime)
640
- {
641
-
642
- // Strip millisecond precision (a full stop followed by one or more digits)
643
- if (strpos($datetime, '.') !== false) {
644
- $datetime = preg_replace('/\.\d+/', '', $datetime);
645
- }
646
-
647
- // default timezone to UTC
648
- $datetime = preg_replace('/[+-]\d+:+\d+$/', '+00:00', $datetime);
649
-
650
- try {
651
-
652
- $datetime = new DateTime($datetime, new DateTimeZone('UTC'));
653
-
654
- } catch (Exception $e) {
655
-
656
- $datetime = new DateTime('@0');
657
-
658
- }
659
-
660
- return $datetime->format('Y-m-d H:i:s');
661
- }
662
-
663
- /**
664
- * Format a unix timestamp or MySQL datetime into an RFC3339 datetime
665
- *
666
- * @since 2.1
667
- * @param int|string $timestamp unix timestamp or MySQL datetime
668
- * @param bool $convert_to_utc
669
- * @return string RFC3339 datetime
670
- */
671
- public function format_datetime($timestamp, $convert_to_utc = false)
672
- {
673
-
674
- if ($convert_to_utc) {
675
- $timezone = new DateTimeZone(wc_timezone_string());
676
- } else {
677
- $timezone = new DateTimeZone('UTC');
678
- }
679
-
680
- try {
681
-
682
- if (is_numeric($timestamp)) {
683
- $date = new DateTime("@{$timestamp}");
684
- } else {
685
- $date = new DateTime($timestamp, $timezone);
686
- }
687
-
688
- // convert to UTC by adjusting the time based on the offset of the site's timezone
689
- if ($convert_to_utc) {
690
- $date->modify(-1 * $date->getOffset() . ' seconds');
691
- }
692
-
693
- } catch (Exception $e) {
694
-
695
- $date = new DateTime('@0');
696
- }
697
-
698
- return $date->format('Y-m-d\TH:i:s\Z');
699
- }
700
-
701
- /**
702
- * Extract headers from a PHP-style $_SERVER array
703
- *
704
- * @since 2.1
705
- * @param array $server Associative array similar to $_SERVER
706
- * @return array Headers extracted from the input
707
- */
708
- public function get_headers($server)
709
- {
710
- $headers = array();
711
- // CONTENT_* headers are not prefixed with HTTP_
712
- $additional = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);
713
-
714
- foreach ($server as $key => $value) {
715
- if (strpos($key, 'HTTP_') === 0) {
716
- $headers[substr($key, 5)] = $value;
717
- } elseif (isset($additional[$key])) {
718
- $headers[$key] = $value;
719
- }
720
- }
721
-
722
- return $headers;
723
- }
724
-
725
- /**
726
- * Check if the current request accepts a JSON response by checking the endpoint suffix (.json) or
727
- * the HTTP ACCEPT header
728
- *
729
- * @since 2.1
730
- * @return bool
731
- */
732
- private function is_json_request()
733
- {
734
-
735
- // check path
736
- if (false !== stripos($this->path, '.json'))
737
- return true;
738
-
739
- // check ACCEPT header, only 'application/json' is acceptable, see RFC 4627
740
- if (isset($this->headers['ACCEPT']) && 'application/json' == $this->headers['ACCEPT'])
741
- return true;
742
-
743
- return false;
744
- }
745
-
746
- /**
747
- * Check if the current request accepts an XML response by checking the endpoint suffix (.xml) or
748
- * the HTTP ACCEPT header
749
- *
750
- * @since 2.1
751
- * @return bool
752
- */
753
- private function is_xml_request()
754
- {
755
-
756
- // check path
757
- if (false !== stripos($this->path, '.xml'))
758
- return true;
759
-
760
- // check headers, 'application/xml' or 'text/xml' are acceptable, see RFC 2376
761
- if (isset($this->headers['ACCEPT']) && ('application/xml' == $this->headers['ACCEPT'] || 'text/xml' == $this->headers['ACCEPT']))
762
- return true;
763
-
764
- return false;
765
- }
766
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/api/interface-aftership-api-handler.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API
4
- *
5
- * Defines an interface that API request/response handlers should implement
6
- *
7
- * @author AfterShip
8
- * @category API
9
- * @package AfterShip/API
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- interface AfterShip_API_Handler
16
- {
17
-
18
- /**
19
- * Get the content type for the response
20
- *
21
- * This should return the proper HTTP content-type for the response
22
- *
23
- * @since 2.1
24
- * @return string
25
- */
26
- public function get_content_type();
27
-
28
- /**
29
- * Parse the raw request body entity into an array
30
- *
31
- * @since 2.1
32
- * @param string $data
33
- * @return array
34
- */
35
- public function parse_body($data);
36
-
37
- /**
38
- * Generate a response from an array of data
39
- *
40
- * @since 2.1
41
- * @param array $data
42
- * @return string
43
- */
44
- public function generate_response($data);
45
-
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/admin.css DELETED
@@ -1,30 +0,0 @@
1
- .hidden-field {
2
- display: none;
3
- }
4
-
5
- #aftership_wrapper {
6
- display: none;
7
- }
8
-
9
- #aftership_spinner {
10
- background: url('../image/loadingAnimation.gif') no-repeat;
11
- opacity: .7;
12
- filter: alpha(opacity=70);
13
- height: 16px;
14
- }
15
-
16
- #aftership_tracking_provider {
17
- width: 100%;
18
- }
19
-
20
- .aftership_error {
21
- display: none;
22
- }
23
-
24
- .aftership_input_text {
25
- width: 300px;
26
- }
27
-
28
- .aftership_dropdown {
29
- width: 300px;
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/image/loadingAnimation.gif DELETED
Binary file
trunk/assets/js/admin.js DELETED
@@ -1,97 +0,0 @@
1
- var providers;
2
-
3
-
4
- function set_aftership_tracking_provider() {
5
- function hide_input_and_label(id) {
6
- jQuery('#' + id).hide();
7
- jQuery('label[for=' + id + ']').hide();
8
- }
9
-
10
- function show_input_and_label(id) {
11
- jQuery('#' + id).show();
12
- jQuery('label[for=' + id + ']').show();
13
- }
14
-
15
- jQuery('#aftership_tracking_provider').change(function() {
16
- hide_input_and_label('aftership_tracking_shipdate');
17
- hide_input_and_label('aftership_tracking_postal');
18
- hide_input_and_label('aftership_tracking_account');
19
-
20
- var slug = jQuery(this).val();
21
- if (slug) {
22
- var provider = providers[slug];
23
- var fields = [];
24
- if (jQuery.isArray(provider.required_fields)) {
25
- fields = provider.required_fields;
26
- } else {
27
- fields.push(provider.required_fields);
28
- }
29
- jQuery.each(fields, function(index, item) {
30
- if (item == 'tracking_ship_date') {
31
- show_input_and_label('aftership_tracking_shipdate');
32
- } else if (item == 'tracking_postal_code') {
33
- show_input_and_label('aftership_tracking_postal');
34
- } else if (item == 'tracking_account_number') {
35
- show_input_and_label('aftership_tracking_account');
36
- }
37
- });
38
- jQuery('#aftership_tracking_provider_name').val(provider.name);
39
- jQuery('#aftership_tracking_required_fields').val(fields.join());
40
- }
41
- });
42
- }
43
-
44
-
45
- function fill_meta_box(json) {
46
- var response = JSON.parse(json);
47
- if (response.code == 800) {
48
- jQuery('#aftership_spinner').fadeOut(function() {
49
- jQuery('#aftership_error_insert_api').fadeIn();
50
- });
51
- } else if (response.code == 401) {
52
- jQuery('#aftership_spinner').fadeOut(function() {
53
- jQuery('#aftership_error_update_api').fadeIn();
54
- });
55
- } else if (response.code != 200) {
56
- jQuery('#aftership_spinner').fadeOut(function() {
57
- jQuery('#aftership_error').html(response.message).fadeIn();
58
- });
59
- } else {
60
- var couriers = {};
61
- jQuery.each(response.response.data.couriers, function(index, courier) {
62
- couriers[courier.slug] = courier;
63
- });
64
-
65
- var selected_provider = jQuery('#aftership_tracking_provider_hidden').val();
66
- if (!couriers[selected_provider]) {
67
- couriers[selected_provider] = {
68
- slug: selected_provider,
69
- name: jQuery("#aftership_tracking_provider_name").val(),
70
- required_fields: jQuery("#aftership_tracking_required_fields").val()
71
- };
72
- }
73
- jQuery.each(couriers, function(key, courier) {
74
- var str = '<option ';
75
- if (courier['slug'] == selected_provider) {
76
- str += 'style="display:none;" ';
77
- }
78
- str += 'value="' + courier['slug'] + '" ';
79
- if (courier['slug'] == selected_provider) {
80
- str += 'selected="selected"';
81
- }
82
- str += '>' + courier['name'] + '</option>';
83
- jQuery('#aftership_tracking_provider').append(str);
84
- });
85
- jQuery('#aftership_tracking_provider').trigger("chosen:updated");
86
- jQuery('#aftership_tracking_provider_chosen').css({width: '100%'});
87
-
88
- providers = couriers;
89
- set_aftership_tracking_provider();
90
- jQuery('#aftership_tracking_provider').trigger('change');
91
-
92
- jQuery('#aftership_spinner').fadeOut(function() {
93
- jQuery('#aftership_wrapper').fadeIn();
94
- });
95
- }
96
- }
97
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/class-aftership-api.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip API
4
- *
5
- * Handles AfterShip-API endpoint requests
6
- *
7
- * @author AfterShip
8
- * @category API
9
- * @package AfterShip
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- class AfterShip_API
16
- {
17
-
18
- /** This is the major version for the REST API and takes
19
- * first-order position in endpoint URLs
20
- */
21
- const VERSION = 1;
22
-
23
- /** @var WC_API_Server the REST API server */
24
- public $server;
25
-
26
- /**
27
- * Setup class
28
- *
29
- * @access public
30
- * @since 2.0
31
- * @return WC_API
32
- */
33
- public function __construct()
34
- {
35
-
36
- // add query vars
37
- add_filter('query_vars', array($this, 'add_query_vars'), 0);
38
-
39
- // register API endpoints
40
- add_action('init', array($this, 'add_endpoint'), 0);
41
-
42
- // handle REST/legacy API request
43
- add_action('parse_request', array($this, 'handle_api_requests'), 0);
44
- }
45
-
46
- /**
47
- * add_query_vars function.
48
- *
49
- * @access public
50
- * @since 2.0
51
- * @param $vars
52
- * @return array
53
- */
54
- public function add_query_vars($vars)
55
- {
56
- $vars[] = 'aftership-api';
57
- $vars[] = 'aftership-api-route';
58
- return $vars;
59
- }
60
-
61
- /**
62
- * add_endpoint function.
63
- *
64
- * @access public
65
- * @since 2.0
66
- * @return void
67
- */
68
- public function add_endpoint()
69
- {
70
-
71
- // REST API
72
- add_rewrite_rule('^aftership-api\/v' . self::VERSION . '/?$', 'index.php?aftership-api-route=/', 'top');
73
- add_rewrite_rule('^aftership-api\/v' . self::VERSION . '(.*)?', 'index.php?aftership-api-route=$matches[1]', 'top');
74
-
75
- // legacy API for payment gateway IPNs
76
- add_rewrite_endpoint('aftership-api', EP_ALL);
77
- }
78
-
79
-
80
- /**
81
- * API request - Trigger any API requests
82
- *
83
- * @access public
84
- * @since 2.0
85
- * @return void
86
- */
87
- public function handle_api_requests()
88
- {
89
- global $wp;
90
-
91
- if (!empty($_GET['aftership-api']))
92
- $wp->query_vars['aftership-api'] = $_GET['aftership-api'];
93
-
94
- if (!empty($_GET['aftership-api-route']))
95
- $wp->query_vars['aftership-api-route'] = $_GET['aftership-api-route'];
96
-
97
- // REST API request
98
- if (!empty($wp->query_vars['aftership-api-route'])) {
99
-
100
- define('AFTERSHIP_API_REQUEST', true);
101
-
102
- // load required files
103
- $this->includes();
104
-
105
- $this->server = new AfterShip_API_Server($wp->query_vars['aftership-api-route']);
106
-
107
- // load API resource classes
108
- $this->register_resources($this->server);
109
-
110
- // Fire off the request
111
- $this->server->serve_request();
112
-
113
- exit;
114
- }
115
-
116
- // legacy API requests
117
- if (!empty($wp->query_vars['aftership-api'])) {
118
-
119
- // Buffer, we won't want any output here
120
- ob_start();
121
-
122
- // Get API trigger
123
- $api = strtolower(esc_attr($wp->query_vars['aftership-api']));
124
-
125
- // Load class if exists
126
- if (class_exists($api))
127
- $api_class = new $api();
128
-
129
- // Trigger actions
130
- do_action('woocommerce_api_' . $api);
131
-
132
- // Done, clear buffer and exit
133
- ob_end_clean();
134
- die('1');
135
- }
136
- }
137
-
138
-
139
- /**
140
- * Include required files for REST API request
141
- *
142
- * @since 2.1
143
- */
144
- private function includes()
145
- {
146
-
147
-
148
- // API server / response handlers
149
- include_once('api/class-aftership-api-server.php');
150
- include_once('api/interface-aftership-api-handler.php');
151
- include_once('api/class-aftership-api-json-handler.php');
152
-
153
- // authentication
154
- include_once('api/class-aftership-api-authentication.php');
155
- $this->authentication = new AfterShip_API_Authentication();
156
-
157
- include_once('api/class-aftership-api-resource.php');
158
-
159
- // self api
160
- include_once('api/class-aftership-api-orders.php');
161
-
162
- // allow plugins to load other response handlers or resource classes
163
- do_action('woocommerce_api_loaded');
164
- }
165
-
166
- /**
167
- * Register available API resources
168
- *
169
- * @since 2.1
170
- * @param object $server the REST server
171
- */
172
- public function register_resources($server)
173
- {
174
-
175
- $api_classes = apply_filters('aftership_api_classes',
176
- array(
177
- 'AfterShip_API_Orders',
178
- )
179
- );
180
-
181
- foreach ($api_classes as $api_class) {
182
- $this->$api_class = new $api_class($server);
183
- }
184
- }
185
-
186
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/class-aftership-settings.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
- /**
3
- * AfterShip Admin
4
- *
5
- * Handles AfterShip-Admin endpoint requests
6
- *
7
- * @author AfterShip
8
- * @category Admin
9
- * @package AfterShip
10
- * @since 1.0
11
- */
12
-
13
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
14
-
15
- /**
16
- * Required functions
17
- */
18
- if ( ! class_exists( 'WC_Dependencies' ) )
19
- require_once 'woo-includes/class-wc-dependencies.php';
20
-
21
- class AfterShip_Settings
22
- {
23
- /**
24
- * Holds the values to be used in the fields callbacks
25
- */
26
- private $options;
27
-
28
- private $plugins;
29
-
30
- /**
31
- * Start up
32
- */
33
- public function __construct()
34
- {
35
- $this->plugins[] = array(
36
- 'value' => 'aftership',
37
- 'label' => 'AfterShip',
38
- 'path' => 'aftership-woocommerce-tracking/aftership.php'
39
- );
40
- $this->plugins[] = array(
41
- 'value' => 'wc-shipment-tracking',
42
- 'label' => 'WooCommerce Shipment Tracking',
43
- 'path' => 'woocommerce-shipment-tracking/shipment-tracking.php'
44
- );
45
-
46
- add_action('admin_menu', array($this, 'add_plugin_page'));
47
- add_action('admin_init', array($this, 'page_init'));
48
- add_action('admin_print_styles', array($this, 'admin_styles'));
49
- }
50
-
51
-
52
- public function admin_styles()
53
- {
54
- wp_enqueue_style('aftership_styles', plugins_url(basename(dirname(__FILE__))) . '/assets/css/admin.css');
55
- }
56
-
57
- /**
58
- * Add options page
59
- */
60
- public function add_plugin_page()
61
- {
62
- // This page will be under "Settings"
63
- add_options_page(
64
- 'AfterShip Settings Admin',
65
- 'AfterShip',
66
- 'manage_options',
67
- 'aftership-setting-admin',
68
- array($this, 'create_admin_page')
69
- );
70
- }
71
-
72
- /**
73
- * Options page callback
74
- */
75
- public function create_admin_page()
76
- {
77
- // Set class property
78
- $this->options = get_option('aftership_option_name');
79
- ?>
80
- <div class="wrap">
81
- <?php screen_icon(); ?>
82
- <h2>AfterShip Settings</h2>
83
-
84
- <form method="post" action="options.php">
85
- <?php
86
- // This prints out all hidden setting fields
87
- settings_fields('aftership_option_group');
88
- do_settings_sections('aftership-setting-admin');
89
- submit_button();
90
- ?>
91
- </form>
92
- </div>
93
- <?php
94
- }
95
-
96
- /**
97
- * Register and add settings
98
- */
99
- public function page_init()
100
- {
101
- register_setting(
102
- 'aftership_option_group', // Option group
103
- 'aftership_option_name', // Option name
104
- array($this, 'sanitize') // Sanitize
105
- );
106
-
107
- add_settings_section(
108
- 'aftership_setting_section_id', // ID
109
- '', // Title
110
- array($this, 'print_section_info'), // Callback
111
- 'aftership-setting-admin' // Page
112
- );
113
-
114
- add_settings_field(
115
- 'api_key',
116
- 'AfterShip API Key',
117
- array($this, 'api_key_callback'),
118
- 'aftership-setting-admin',
119
- 'aftership_setting_section_id'
120
- );
121
-
122
- add_settings_field(
123
- 'plugin',
124
- 'Plugin',
125
- array($this, 'plugin_callback'),
126
- 'aftership-setting-admin',
127
- 'aftership_setting_section_id'
128
- );
129
-
130
- add_settings_field(
131
- 'use_track_button',
132
- 'Use Track Button',
133
- array($this, 'track_button_callback'),
134
- 'aftership-setting-admin',
135
- 'aftership_setting_section_id'
136
- );
137
- }
138
-
139
- /**
140
- * Sanitize each setting field as needed
141
- *
142
- * @param array $input Contains all settings fields as array keys
143
- */
144
- public function sanitize($input)
145
- {
146
- $new_input = array();
147
-
148
- if (isset($input['api_key'])) {
149
- $new_input['api_key'] = sanitize_text_field($input['api_key']);
150
- }
151
-
152
- if (isset($input['plugin'])) {
153
- $new_input['plugin'] = sanitize_text_field($input['plugin']);
154
- }
155
-
156
- if (isset($input['use_track_button'])) {
157
- $new_input['use_track_button'] = true;
158
- }
159
-
160
-
161
- return $new_input;
162
- }
163
-
164
- /**
165
- * Print the Section text
166
- */
167
- public function print_section_info()
168
- {
169
- //print 'Enter your settings below:';
170
- }
171
-
172
- /**
173
- * Get the settings option array and print one of its values
174
- */
175
- public function api_key_callback()
176
- {
177
- printf(
178
- '<input type="text" id="api_key" name="aftership_option_name[api_key]" value="%s" class="aftership_input_text" required/>',
179
- isset($this->options['api_key']) ? esc_attr($this->options['api_key']) : ''
180
- );
181
- printf(
182
- '<p>&nbsp;<a href="http://aftership.uservoice.com/knowledgebase/articles/401963" target="_blank">How to generate AfterShip API Key?</a></p>'
183
- );
184
- }
185
-
186
- public function plugin_callback()
187
- {
188
-
189
- $options = "";
190
- foreach ($this->plugins as $plugin) {
191
- //print_r($plugin);
192
- if (WC_Dependencies::plugin_active_check($plugin['path'])) {
193
- $option = '<option value="' . $plugin['value'] . '"';
194
-
195
- if (isset($this->options['plugin']) && esc_attr($this->options['plugin']) == $plugin['value']) {
196
- $option .= ' selected="selected"';
197
- }
198
-
199
- $option .= '>' . $plugin['label'] . '</option>';
200
- $options .= $option;
201
- }
202
- }
203
-
204
- printf(
205
- '<select id="plugin" name="aftership_option_name[plugin]" class="aftership_dropdown">' . $options . '</select>'
206
- );
207
- }
208
-
209
- public function track_button_callback()
210
- {
211
- printf(
212
- '<label><input type="checkbox" id="use_track_button" name="aftership_option_name[use_track_button]" %s>Use Track Button</label>',
213
- (isset($this->options['use_track_button']) && $this->options['use_track_button'] === true) ? 'checked="checked"' : ''
214
- );
215
- }
216
- }
217
-
218
-
219
- if (is_admin())
220
- $aftership_settings = new AfterShip_Settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/composer.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "require": {
3
- "aftership/aftership-php-sdk": "dev-master"
4
- }
5
- }
 
 
 
 
 
trunk/composer.lock DELETED
@@ -1,223 +0,0 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
- "This file is @generated automatically"
6
- ],
7
- "hash": "f7b91f8cf6daed07aa3d9db1bf8d8c7b",
8
- "packages": [
9
- {
10
- "name": "aftership/aftership-php-sdk",
11
- "version": "dev-master",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/AfterShip/aftership-php.git",
15
- "reference": "c91f851b5c00b3bbacdc1bdd504ddf80557c4256"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/AfterShip/aftership-php/zipball/c91f851b5c00b3bbacdc1bdd504ddf80557c4256",
20
- "reference": "c91f851b5c00b3bbacdc1bdd504ddf80557c4256",
21
- "shasum": ""
22
- },
23
- "require": {
24
- "guzzle/guzzle": "3.8.*@dev",
25
- "php": ">=5.3.0"
26
- },
27
- "type": "library",
28
- "autoload": {
29
- "psr-0": {
30
- "AfterShip": "src/"
31
- }
32
- },
33
- "notification-url": "https://packagist.org/downloads/",
34
- "license": [
35
- "MIT"
36
- ],
37
- "authors": [
38
- {
39
- "name": "AfterShip",
40
- "email": "support@aftership.com"
41
- }
42
- ],
43
- "description": "The PHP SDK of AfterShip API",
44
- "keywords": [
45
- "FedEx",
46
- "aftership",
47
- "dhl",
48
- "shipping",
49
- "track",
50
- "tracking",
51
- "ups",
52
- "usps"
53
- ],
54
- "time": "2014-08-06 08:49:52"
55
- },
56
- {
57
- "name": "guzzle/guzzle",
58
- "version": "v3.8.1",
59
- "source": {
60
- "type": "git",
61
- "url": "https://github.com/guzzle/guzzle.git",
62
- "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba"
63
- },
64
- "dist": {
65
- "type": "zip",
66
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
67
- "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
68
- "shasum": ""
69
- },
70
- "require": {
71
- "ext-curl": "*",
72
- "php": ">=5.3.3",
73
- "symfony/event-dispatcher": ">=2.1"
74
- },
75
- "replace": {
76
- "guzzle/batch": "self.version",
77
- "guzzle/cache": "self.version",
78
- "guzzle/common": "self.version",
79
- "guzzle/http": "self.version",
80
- "guzzle/inflection": "self.version",
81
- "guzzle/iterator": "self.version",
82
- "guzzle/log": "self.version",
83
- "guzzle/parser": "self.version",
84
- "guzzle/plugin": "self.version",
85
- "guzzle/plugin-async": "self.version",
86
- "guzzle/plugin-backoff": "self.version",
87
- "guzzle/plugin-cache": "self.version",
88
- "guzzle/plugin-cookie": "self.version",
89
- "guzzle/plugin-curlauth": "self.version",
90
- "guzzle/plugin-error-response": "self.version",
91
- "guzzle/plugin-history": "self.version",
92
- "guzzle/plugin-log": "self.version",
93
- "guzzle/plugin-md5": "self.version",
94
- "guzzle/plugin-mock": "self.version",
95
- "guzzle/plugin-oauth": "self.version",
96
- "guzzle/service": "self.version",
97
- "guzzle/stream": "self.version"
98
- },
99
- "require-dev": {
100
- "doctrine/cache": "*",
101
- "monolog/monolog": "1.*",
102
- "phpunit/phpunit": "3.7.*",
103
- "psr/log": "1.0.*",
104
- "symfony/class-loader": "*",
105
- "zendframework/zend-cache": "<2.3",
106
- "zendframework/zend-log": "<2.3"
107
- },
108
- "type": "library",
109
- "extra": {
110
- "branch-alias": {
111
- "dev-master": "3.8-dev"
112
- }
113
- },
114
- "autoload": {
115
- "psr-0": {
116
- "Guzzle": "src/",
117
- "Guzzle\\Tests": "tests/"
118
- }
119
- },
120
- "notification-url": "https://packagist.org/downloads/",
121
- "license": [
122
- "MIT"
123
- ],
124
- "authors": [
125
- {
126
- "name": "Michael Dowling",
127
- "email": "mtdowling@gmail.com",
128
- "homepage": "https://github.com/mtdowling"
129
- },
130
- {
131
- "name": "Guzzle Community",
132
- "homepage": "https://github.com/guzzle/guzzle/contributors"
133
- }
134
- ],
135
- "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
136
- "homepage": "http://guzzlephp.org/",
137
- "keywords": [
138
- "client",
139
- "curl",
140
- "framework",
141
- "http",
142
- "http client",
143
- "rest",
144
- "web service"
145
- ],
146
- "time": "2014-01-28 22:29:15"
147
- },
148
- {
149
- "name": "symfony/event-dispatcher",
150
- "version": "v2.5.3",
151
- "target-dir": "Symfony/Component/EventDispatcher",
152
- "source": {
153
- "type": "git",
154
- "url": "https://github.com/symfony/EventDispatcher.git",
155
- "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b"
156
- },
157
- "dist": {
158
- "type": "zip",
159
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
160
- "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
161
- "shasum": ""
162
- },
163
- "require": {
164
- "php": ">=5.3.3"
165
- },
166
- "require-dev": {
167
- "psr/log": "~1.0",
168
- "symfony/config": "~2.0",
169
- "symfony/dependency-injection": "~2.0",
170
- "symfony/stopwatch": "~2.2"
171
- },
172
- "suggest": {
173
- "symfony/dependency-injection": "",
174
- "symfony/http-kernel": ""
175
- },
176
- "type": "library",
177
- "extra": {
178
- "branch-alias": {
179
- "dev-master": "2.5-dev"
180
- }
181
- },
182
- "autoload": {
183
- "psr-0": {
184
- "Symfony\\Component\\EventDispatcher\\": ""
185
- }
186
- },
187
- "notification-url": "https://packagist.org/downloads/",
188
- "license": [
189
- "MIT"
190
- ],
191
- "authors": [
192
- {
193
- "name": "Symfony Community",
194
- "homepage": "http://symfony.com/contributors"
195
- },
196
- {
197
- "name": "Fabien Potencier",
198
- "email": "fabien@symfony.com"
199
- }
200
- ],
201
- "description": "Symfony EventDispatcher Component",
202
- "homepage": "http://symfony.com",
203
- "time": "2014-07-28 13:20:46"
204
- }
205
- ],
206
- "packages-dev": [
207
-
208
- ],
209
- "aliases": [
210
-
211
- ],
212
- "minimum-stability": "stable",
213
- "stability-flags": {
214
- "aftership/aftership-php-sdk": 20
215
- },
216
- "prefer-stable": false,
217
- "platform": [
218
-
219
- ],
220
- "platform-dev": [
221
-
222
- ]
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,152 +0,0 @@
1
- === Plugin Name ===
2
- Contributors: aftership
3
- Donate link: https://www.aftership.com/
4
- Tags: shipping, tracking, ups, usps, fedex, dhl, tnt, dpd, post, shipment, woocommerce, tracking number, aftership, package tracking, fulfilment, tracking link, carrier, courier, woo commerce, woocommerce shipment tracking, shipping details plugin, widget, shipstation, track, package
5
- Requires at least: 2.9
6
- Tested up to: 3.9.2
7
- Stable tag: 1.1.9
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- Add tracking number and carrier name to WooCommerce, display tracking info at order history page, auto import tracking numbers to AfterShip.
12
-
13
- == Description ==
14
-
15
- ###Add tracking number and carrier name fields (Free)
16
- By installing AfterShip plugin, you can automatically add Tracking Number and Carrier fields to your admin panel. After you fulfill an order, simply enter the tracking number and select a carrier at WooCommerce, the same info will be displayed at customer's order history page. AfterShip supports over 200 carriers worldwide, you can select carriers by [signing up a free AfterShip account](https://www.aftership.com/signup).
17
-
18
- ###Display tracking info at order history page (Free)
19
- The plugin allows you to insert the AfterShip Track Button to order history page, so that your customers can track the latest order status in one click.
20
-
21
- ###Support 200+ International Carrier (Free)
22
- AfterShip supports UPS tracking, FedEx tracking, USPS tracking, DHL tracking and shipment tracking of over 200+ carriers worlwide. Please scroll down to see the full list of our supported carriers.
23
-
24
-
25
- ###Track all shipments in one place (Free)
26
- By setting up an auto import of tracking numbers to AfterShip, you can get the latest tracking info of all shipments in one place. Each free account comes with a Dashboard to monitor current statuses of all shipments. You can also filter your shipments by dates, statuses, couriers and destination. Find out if all your shipments are delivered on time and discover any exceptions. Support [WooCommerce Shipment Tracking Plugin](http://www.woothemes.com/products/shipment-tracking/) as well.
27
-
28
- ###Notify customers of delivery updates (Premium)
29
- Upgrade to [Premium](https://www.aftership.com/premium) to automatically send out delivery notifications to customers or yourself. Your choice of notification triggers - In transit, Out for delivery, Delivered, Failed delivery attempt or Exceptions. Use your own email to send out notifications, and customize messages to add store logo, URL, a tracking link to get more returned customers after shipping!
30
-
31
- [youtube http://www.youtube.com/watch?v=1zCCx8Ap9ms]
32
-
33
- ###Full list of supported carriers (200+):
34
- **①. US, Canada & Global Tracking (23)**
35
-
36
- FedEx • UPS • DHL Express • USPS • UPS Mail Innovations • TNT • DPD • Aramex • DHL Global Mail • Toll Global Express • UPS Freight • Canada Post • Purolator • APC Postal Logistics • OnTrac • YRC • Asendia USA • LaserShip • i-parcel • ABF Freight • Estes • RL Carriers • Greyhound
37
-
38
- **②. UK & Ireland Tracking (19)**
39
-
40
- Royal Mail • Parcel Force • FedEx UK • DPD UK • SkyNet Worldwide Express • TNT UK • Interlink Express • UK Mail • YODEL • myHermes UK • City Link • Collect+ • DX • Deltec Courier • XDP Express • An Post • DPD Ireland • Fastway Ireland • Arrow XL
41
-
42
- **③. Europe Tracking (66)**
43
-
44
- Direct Link • International Seur • GLS • DHL Benelux • PostNord Logistics • Deutsche Post Mail • Deutsche Post DHL • Hermes Germany • DPD Germany • Austrian Post (Registered) • Austrian Post (Express) • Swiss Post • Correos de España • NACEX Spain • Spanish Seur • ASM • MRW • Redur Spain • Portugal CTT • Chronopost Portugal • Portugal Seur • La Poste • Colissimo • Chronopost France • Colis Privé • TNT France • Geodis Calberson France • PostNL Domestic • PostNL International • PostNL International 3S • DHL Netherlands • GLS Netherlands • Selektvracht • DHL Parcel NL • Belgium Post • bpost international • Itella Posti • Posten Norge • Sweden Posten • Post Danmark • Italy SDA • Poste Italiane Paccocelere • Poste Italiane • BRT Bartolini • GLS Italy • TNT Italy • Nexive (TNT Post Italy) • Russian Post • Nova Poshta • DHL Poland • Poczta Polska • DPD Poland • Siodemka • OPEK • Lietuvos paštas • Česká Pošta • ELTA Hellenic Post • ACS Courier • PTT Posta • Belpost • Bulgarian Posts • Hrvatska PoÅ¡ta • Kuehne + Nagel • Poșta Română • Cyprus Post • UkrPoshta
45
-
46
- **④. Asia & China Tracking (57)**
47
-
48
- DHL Global Mail Asia • Kerry Express Thailand • Singapore Post • Singapore Speedpost • TAQBIN Singapore • Korea Post • CJ GLS • India Post Domestic • India Post International • Delhivery • Bluedart • DTDC India • Professional Couriers • Safexpress • Red Express • Red Express Waybill • First Flight Couriers • Gati-KWE • GoJaVAS • Japan Post • Yamato Japan • Sagawa • Taiwan Post • Malaysia Post EMS / Poslaju • Malaysia Post - Registered • TAQBIN Malaysia • GDEX • SkyNet Malaysia • City-Link Express • Thailand Thai Post • Dynamic Logistics • 2GO • Xend • AIR21 • Jam Express • Pos Indonesia Domestic • Pos Indonesia Int'l • JNE • RPX Indonesia • Tiki • Wahana • LBC Express • First Logistics • Vietnam Post • Vietnam Post EMS • ViettelPost • Cambodia Post • S.F. Express • China Post • China EMS • 4PX • Yanwen • EC-Firstclass • AuPost China • WeDo Logistics • PayPal Package • JCEX • STO Express • Flyt Express • Hong Kong Post • TAQBIN Hong Kong • TGX
49
-
50
- **⑤. Australia & New Zealand Tracking (10)**
51
-
52
- Australia Post • Toll Priority • Toll IPEC • TNT Australia • Fastway Australia • StarTrack • Star Track Express • Couriers Please • New Zealand Post • CourierPost
53
-
54
- **⑥. Latin America, Middle East & Other Tracking (18)**
55
-
56
- Correos de Mexico • Estafeta • Mexico Senda Express • Mexico Redpack • Mexico Multipack • Mexico AeroFlash • Brazil Correios • Flash Courier • Correos Chile • Correo Argentino • OCA Argentina • Israel Post • Israel Post Domestic • South African Post Office • Fastway South Africa • Saudi Post • NiPost • Evergreen
57
-
58
-
59
- == Installation ==
60
-
61
- 1. [Sign up AfterShip account for FREE](https://www.aftership.com/signup)
62
- 2. [Download AfterShip plugin](http://downloads.wordpress.org/plugin/aftership-woocommerce-tracking.zip), then install and activate at wordpress.
63
- 3. Enter [AfterShip API Key](https://www.aftership.com/apps/api) at plugin settings
64
- 4. Select AfterShip Plugin or [WooCommerce Shipment Tracking Plugin](http://www.woothemes.com/products/shipment-tracking/) for entering tracking number
65
- 5. Check `Use Track Button` for displaying tracking info at order history page
66
- 6. Generate [AfterShip's WordPress API Key](http://aftership.uservoice.com/knowledgebase/articles/405909) under `Users` > `Your Profile`
67
- 7. Input `Store URL` and `AfterShip's WordPress API Key` at [AfterShip WooCommerce page](https://www.aftership.com/apps/woocommerce)
68
-
69
- ###Further Reading
70
-
71
- * [How to insert AfterShip Track Button to WordPress or WooCommerce](https://aftership.uservoice.com/knowledgebase/articles/268665)
72
- * [Premium account pricing](https://www.aftership.com/premium)
73
- * [List of supported couriers](https://www.aftership.com/courier)
74
- * [Free vs Premium](https://www.aftership.com/free-vs-premium)
75
- * [SMS Charges](https://www.aftership.com/sms-pricing)
76
- * [Isn’t my store or courier sending notifications already?](https://aftership.uservoice.com/knowledgebase/articles/169634-isn-t-my-store-or-courier-sending-notifications-al)
77
-
78
-
79
- == Frequently Asked Questions ==
80
-
81
- You'll find the FAQ on [AfterShip.com](https://aftership.uservoice.com/knowledgebase)
82
-
83
-
84
- == Screenshots ==
85
-
86
- 1. Add tracking number and carrier to WooCommerce
87
- 2. Display tracking info at order history page
88
- 3. Support tracking of UPS, DHL, FedEx, USPS and 200+ carriers
89
- 4. AfterShip dashboard
90
- 5. Track all shipments in one place
91
- 6. View exception, and filter by status
92
- 7. Automatically send out delivery notifications
93
-
94
- == Changelog ==
95
-
96
- = 1.1.9 =
97
- * Fix the header issues of different server
98
-
99
- = 1.1.8 =
100
- * Fix the email display issues
101
-
102
- = 1.1.7 =
103
- * Fix the headers issues
104
-
105
- = 1.1.6 =
106
- * Fix the apache request headers issues
107
-
108
- = 1.1.5 =
109
- * Fix Bug - Order page - couriers callback
110
- * Fix Bug - Avoid duplicate getAfterShipInstance()
111
-
112
- = 1.1.4 =
113
- * Fix Bug - assets location
114
- * Fix Bug - WC Dependency
115
-
116
- = 1.1.3 =
117
- * Fix Bug - WC Dependency
118
- * i18N change to AfterShip
119
-
120
- = 1.1.2 =
121
- * Updated the plugin name
122
-
123
- = 1.1.1 =
124
- * Updated the version number in aftership.php !
125
-
126
- = 1.1.0 =
127
- * Released
128
-
129
- = 1.0.5 =
130
- * Update Readme - add a video
131
-
132
- = 1.0.4 =
133
- * Delete changelog.txt
134
-
135
- = 1.0.3 =
136
- * Fix the plugin name
137
- * Remove unused 3rd party plugin
138
-
139
- = 1.0.2 =
140
- * Remove the unnecessary plugin updater
141
-
142
- = 1.0.1 =
143
- * Fix the apache request headers issues
144
- * Readme
145
-
146
- = 1.0.0 =
147
- * AfterShip plugin launched
148
-
149
-
150
- == Upgrade Notice ==
151
-
152
- No Upgrade Yet
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/aftership/aftership-php-sdk DELETED
@@ -1 +0,0 @@
1
- Subproject commit c91f851b5c00b3bbacdc1bdd504ddf80557c4256
 
trunk/vendor/autoload.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- require_once __DIR__ . '/composer' . '/autoload_real.php';
6
-
7
- return ComposerAutoloaderInit7c1cd942dcb87d14db005044ca703911::getLoader();
 
 
 
 
 
 
 
trunk/vendor/composer/ClassLoader.php DELETED
@@ -1,379 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0 class loader
17
- *
18
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
19
- *
20
- * $loader = new \Composer\Autoload\ClassLoader();
21
- *
22
- * // register classes with namespaces
23
- * $loader->add('Symfony\Component', __DIR__.'/component');
24
- * $loader->add('Symfony', __DIR__.'/framework');
25
- *
26
- * // activate the autoloader
27
- * $loader->register();
28
- *
29
- * // to enable searching the include path (eg. for PEAR packages)
30
- * $loader->setUseIncludePath(true);
31
- *
32
- * In this example, if you try to use a class in the Symfony\Component
33
- * namespace or one of its children (Symfony\Component\Console for instance),
34
- * the autoloader will first look for the class under the component/
35
- * directory, and it will then fallback to the framework/ directory if not
36
- * found before giving up.
37
- *
38
- * This class is loosely based on the Symfony UniversalClassLoader.
39
- *
40
- * @author Fabien Potencier <fabien@symfony.com>
41
- * @author Jordi Boggiano <j.boggiano@seld.be>
42
- */
43
- class ClassLoader
44
- {
45
- // PSR-4
46
- private $prefixLengthsPsr4 = array();
47
- private $prefixDirsPsr4 = array();
48
- private $fallbackDirsPsr4 = array();
49
-
50
- // PSR-0
51
- private $prefixesPsr0 = array();
52
- private $fallbackDirsPsr0 = array();
53
-
54
- private $useIncludePath = false;
55
- private $classMap = array();
56
-
57
- public function getPrefixes()
58
- {
59
- return call_user_func_array('array_merge', $this->prefixesPsr0);
60
- }
61
-
62
- public function getPrefixesPsr4()
63
- {
64
- return $this->prefixDirsPsr4;
65
- }
66
-
67
- public function getFallbackDirs()
68
- {
69
- return $this->fallbackDirsPsr0;
70
- }
71
-
72
- public function getFallbackDirsPsr4()
73
- {
74
- return $this->fallbackDirsPsr4;
75
- }
76
-
77
- public function getClassMap()
78
- {
79
- return $this->classMap;
80
- }
81
-
82
- /**
83
- * @param array $classMap Class to filename map
84
- */
85
- public function addClassMap(array $classMap)
86
- {
87
- if ($this->classMap) {
88
- $this->classMap = array_merge($this->classMap, $classMap);
89
- } else {
90
- $this->classMap = $classMap;
91
- }
92
- }
93
-
94
- /**
95
- * Registers a set of PSR-0 directories for a given prefix, either
96
- * appending or prepending to the ones previously set for this prefix.
97
- *
98
- * @param string $prefix The prefix
99
- * @param array|string $paths The PSR-0 root directories
100
- * @param bool $prepend Whether to prepend the directories
101
- */
102
- public function add($prefix, $paths, $prepend = false)
103
- {
104
- if (!$prefix) {
105
- if ($prepend) {
106
- $this->fallbackDirsPsr0 = array_merge(
107
- (array) $paths,
108
- $this->fallbackDirsPsr0
109
- );
110
- } else {
111
- $this->fallbackDirsPsr0 = array_merge(
112
- $this->fallbackDirsPsr0,
113
- (array) $paths
114
- );
115
- }
116
-
117
- return;
118
- }
119
-
120
- $first = $prefix[0];
121
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
122
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
123
-
124
- return;
125
- }
126
- if ($prepend) {
127
- $this->prefixesPsr0[$first][$prefix] = array_merge(
128
- (array) $paths,
129
- $this->prefixesPsr0[$first][$prefix]
130
- );
131
- } else {
132
- $this->prefixesPsr0[$first][$prefix] = array_merge(
133
- $this->prefixesPsr0[$first][$prefix],
134
- (array) $paths
135
- );
136
- }
137
- }
138
-
139
- /**
140
- * Registers a set of PSR-4 directories for a given namespace, either
141
- * appending or prepending to the ones previously set for this namespace.
142
- *
143
- * @param string $prefix The prefix/namespace, with trailing '\\'
144
- * @param array|string $paths The PSR-0 base directories
145
- * @param bool $prepend Whether to prepend the directories
146
- */
147
- public function addPsr4($prefix, $paths, $prepend = false)
148
- {
149
- if (!$prefix) {
150
- // Register directories for the root namespace.
151
- if ($prepend) {
152
- $this->fallbackDirsPsr4 = array_merge(
153
- (array) $paths,
154
- $this->fallbackDirsPsr4
155
- );
156
- } else {
157
- $this->fallbackDirsPsr4 = array_merge(
158
- $this->fallbackDirsPsr4,
159
- (array) $paths
160
- );
161
- }
162
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
163
- // Register directories for a new namespace.
164
- $length = strlen($prefix);
165
- if ('\\' !== $prefix[$length - 1]) {
166
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
167
- }
168
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
169
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
170
- } elseif ($prepend) {
171
- // Prepend directories for an already registered namespace.
172
- $this->prefixDirsPsr4[$prefix] = array_merge(
173
- (array) $paths,
174
- $this->prefixDirsPsr4[$prefix]
175
- );
176
- } else {
177
- // Append directories for an already registered namespace.
178
- $this->prefixDirsPsr4[$prefix] = array_merge(
179
- $this->prefixDirsPsr4[$prefix],
180
- (array) $paths
181
- );
182
- }
183
- }
184
-
185
- /**
186
- * Registers a set of PSR-0 directories for a given prefix,
187
- * replacing any others previously set for this prefix.
188
- *
189
- * @param string $prefix The prefix
190
- * @param array|string $paths The PSR-0 base directories
191
- */
192
- public function set($prefix, $paths)
193
- {
194
- if (!$prefix) {
195
- $this->fallbackDirsPsr0 = (array) $paths;
196
- } else {
197
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
198
- }
199
- }
200
-
201
- /**
202
- * Registers a set of PSR-4 directories for a given namespace,
203
- * replacing any others previously set for this namespace.
204
- *
205
- * @param string $prefix The prefix/namespace, with trailing '\\'
206
- * @param array|string $paths The PSR-4 base directories
207
- */
208
- public function setPsr4($prefix, $paths)
209
- {
210
- if (!$prefix) {
211
- $this->fallbackDirsPsr4 = (array) $paths;
212
- } else {
213
- $length = strlen($prefix);
214
- if ('\\' !== $prefix[$length - 1]) {
215
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
216
- }
217
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
218
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
219
- }
220
- }
221
-
222
- /**
223
- * Turns on searching the include path for class files.
224
- *
225
- * @param bool $useIncludePath
226
- */
227
- public function setUseIncludePath($useIncludePath)
228
- {
229
- $this->useIncludePath = $useIncludePath;
230
- }
231
-
232
- /**
233
- * Can be used to check if the autoloader uses the include path to check
234
- * for classes.
235
- *
236
- * @return bool
237
- */
238
- public function getUseIncludePath()
239
- {
240
- return $this->useIncludePath;
241
- }
242
-
243
- /**
244
- * Registers this instance as an autoloader.
245
- *
246
- * @param bool $prepend Whether to prepend the autoloader or not
247
- */
248
- public function register($prepend = false)
249
- {
250
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
251
- }
252
-
253
- /**
254
- * Unregisters this instance as an autoloader.
255
- */
256
- public function unregister()
257
- {
258
- spl_autoload_unregister(array($this, 'loadClass'));
259
- }
260
-
261
- /**
262
- * Loads the given class or interface.
263
- *
264
- * @param string $class The name of the class
265
- * @return bool|null True if loaded, null otherwise
266
- */
267
- public function loadClass($class)
268
- {
269
- if ($file = $this->findFile($class)) {
270
- includeFile($file);
271
-
272
- return true;
273
- }
274
- }
275
-
276
- /**
277
- * Finds the path to the file where the class is defined.
278
- *
279
- * @param string $class The name of the class
280
- *
281
- * @return string|false The path if found, false otherwise
282
- */
283
- public function findFile($class)
284
- {
285
- // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
286
- if ('\\' == $class[0]) {
287
- $class = substr($class, 1);
288
- }
289
-
290
- // class map lookup
291
- if (isset($this->classMap[$class])) {
292
- return $this->classMap[$class];
293
- }
294
-
295
- $file = $this->findFileWithExtension($class, '.php');
296
-
297
- // Search for Hack files if we are running on HHVM
298
- if ($file === null && defined('HHVM_VERSION')) {
299
- $file = $this->findFileWithExtension($class, '.hh');
300
- }
301
-
302
- if ($file === null) {
303
- // Remember that this class does not exist.
304
- return $this->classMap[$class] = false;
305
- }
306
-
307
- return $file;
308
- }
309
-
310
- private function findFileWithExtension($class, $ext)
311
- {
312
- // PSR-4 lookup
313
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
314
-
315
- $first = $class[0];
316
- if (isset($this->prefixLengthsPsr4[$first])) {
317
- foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
318
- if (0 === strpos($class, $prefix)) {
319
- foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
320
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
321
- return $file;
322
- }
323
- }
324
- }
325
- }
326
- }
327
-
328
- // PSR-4 fallback dirs
329
- foreach ($this->fallbackDirsPsr4 as $dir) {
330
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
331
- return $file;
332
- }
333
- }
334
-
335
- // PSR-0 lookup
336
- if (false !== $pos = strrpos($class, '\\')) {
337
- // namespaced class name
338
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
339
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
340
- } else {
341
- // PEAR-like class name
342
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
343
- }
344
-
345
- if (isset($this->prefixesPsr0[$first])) {
346
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
347
- if (0 === strpos($class, $prefix)) {
348
- foreach ($dirs as $dir) {
349
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
350
- return $file;
351
- }
352
- }
353
- }
354
- }
355
- }
356
-
357
- // PSR-0 fallback dirs
358
- foreach ($this->fallbackDirsPsr0 as $dir) {
359
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
360
- return $file;
361
- }
362
- }
363
-
364
- // PSR-0 include paths.
365
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
366
- return $file;
367
- }
368
- }
369
- }
370
-
371
- /**
372
- * Scope isolated include.
373
- *
374
- * Prevents access to $this/self from included files.
375
- */
376
- function includeFile($file)
377
- {
378
- include $file;
379
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_classmap.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_namespaces.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
10
- 'Guzzle\\Tests' => array($vendorDir . '/guzzle/guzzle/tests'),
11
- 'Guzzle' => array($vendorDir . '/guzzle/guzzle/src'),
12
- 'AfterShip' => array($vendorDir . '/aftership/aftership-php-sdk/src'),
13
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_psr4.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_real.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInit7c1cd942dcb87d14db005044ca703911
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- public static function getLoader()
17
- {
18
- if (null !== self::$loader) {
19
- return self::$loader;
20
- }
21
-
22
- spl_autoload_register(array('ComposerAutoloaderInit7c1cd942dcb87d14db005044ca703911', 'loadClassLoader'), true, true);
23
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit7c1cd942dcb87d14db005044ca703911', 'loadClassLoader'));
25
-
26
- $map = require __DIR__ . '/autoload_namespaces.php';
27
- foreach ($map as $namespace => $path) {
28
- $loader->set($namespace, $path);
29
- }
30
-
31
- $map = require __DIR__ . '/autoload_psr4.php';
32
- foreach ($map as $namespace => $path) {
33
- $loader->setPsr4($namespace, $path);
34
- }
35
-
36
- $classMap = require __DIR__ . '/autoload_classmap.php';
37
- if ($classMap) {
38
- $loader->addClassMap($classMap);
39
- }
40
-
41
- $loader->register(true);
42
-
43
- return $loader;
44
- }
45
- }
46
-
47
- function composerRequire7c1cd942dcb87d14db005044ca703911($file)
48
- {
49
- require $file;
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/installed.json DELETED
@@ -1,204 +0,0 @@
1
- [
2
- {
3
- "name": "symfony/event-dispatcher",
4
- "version": "v2.5.3",
5
- "version_normalized": "2.5.3.0",
6
- "target-dir": "Symfony/Component/EventDispatcher",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/symfony/EventDispatcher.git",
10
- "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b"
11
- },
12
- "dist": {
13
- "type": "zip",
14
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
15
- "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
16
- "shasum": ""
17
- },
18
- "require": {
19
- "php": ">=5.3.3"
20
- },
21
- "require-dev": {
22
- "psr/log": "~1.0",
23
- "symfony/config": "~2.0",
24
- "symfony/dependency-injection": "~2.0",
25
- "symfony/stopwatch": "~2.2"
26
- },
27
- "suggest": {
28
- "symfony/dependency-injection": "",
29
- "symfony/http-kernel": ""
30
- },
31
- "time": "2014-07-28 13:20:46",
32
- "type": "library",
33
- "extra": {
34
- "branch-alias": {
35
- "dev-master": "2.5-dev"
36
- }
37
- },
38
- "installation-source": "dist",
39
- "autoload": {
40
- "psr-0": {
41
- "Symfony\\Component\\EventDispatcher\\": ""
42
- }
43
- },
44
- "notification-url": "https://packagist.org/downloads/",
45
- "license": [
46
- "MIT"
47
- ],
48
- "authors": [
49
- {
50
- "name": "Symfony Community",
51
- "homepage": "http://symfony.com/contributors"
52
- },
53
- {
54
- "name": "Fabien Potencier",
55
- "email": "fabien@symfony.com"
56
- }
57
- ],
58
- "description": "Symfony EventDispatcher Component",
59
- "homepage": "http://symfony.com"
60
- },
61
- {
62
- "name": "guzzle/guzzle",
63
- "version": "v3.8.1",
64
- "version_normalized": "3.8.1.0",
65
- "source": {
66
- "type": "git",
67
- "url": "https://github.com/guzzle/guzzle.git",
68
- "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba"
69
- },
70
- "dist": {
71
- "type": "zip",
72
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
73
- "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
74
- "shasum": ""
75
- },
76
- "require": {
77
- "ext-curl": "*",
78
- "php": ">=5.3.3",
79
- "symfony/event-dispatcher": ">=2.1"
80
- },
81
- "replace": {
82
- "guzzle/batch": "self.version",
83
- "guzzle/cache": "self.version",
84
- "guzzle/common": "self.version",
85
- "guzzle/http": "self.version",
86
- "guzzle/inflection": "self.version",
87
- "guzzle/iterator": "self.version",
88
- "guzzle/log": "self.version",
89
- "guzzle/parser": "self.version",
90
- "guzzle/plugin": "self.version",
91
- "guzzle/plugin-async": "self.version",
92
- "guzzle/plugin-backoff": "self.version",
93
- "guzzle/plugin-cache": "self.version",
94
- "guzzle/plugin-cookie": "self.version",
95
- "guzzle/plugin-curlauth": "self.version",
96
- "guzzle/plugin-error-response": "self.version",
97
- "guzzle/plugin-history": "self.version",
98
- "guzzle/plugin-log": "self.version",
99
- "guzzle/plugin-md5": "self.version",
100
- "guzzle/plugin-mock": "self.version",
101
- "guzzle/plugin-oauth": "self.version",
102
- "guzzle/service": "self.version",
103
- "guzzle/stream": "self.version"
104
- },
105
- "require-dev": {
106
- "doctrine/cache": "*",
107
- "monolog/monolog": "1.*",
108
- "phpunit/phpunit": "3.7.*",
109
- "psr/log": "1.0.*",
110
- "symfony/class-loader": "*",
111
- "zendframework/zend-cache": "<2.3",
112
- "zendframework/zend-log": "<2.3"
113
- },
114
- "time": "2014-01-28 22:29:15",
115
- "type": "library",
116
- "extra": {
117
- "branch-alias": {
118
- "dev-master": "3.8-dev"
119
- }
120
- },
121
- "installation-source": "dist",
122
- "autoload": {
123
- "psr-0": {
124
- "Guzzle": "src/",
125
- "Guzzle\\Tests": "tests/"
126
- }
127
- },
128
- "notification-url": "https://packagist.org/downloads/",
129
- "license": [
130
- "MIT"
131
- ],
132
- "authors": [
133
- {
134
- "name": "Michael Dowling",
135
- "email": "mtdowling@gmail.com",
136
- "homepage": "https://github.com/mtdowling"
137
- },
138
- {
139
- "name": "Guzzle Community",
140
- "homepage": "https://github.com/guzzle/guzzle/contributors"
141
- }
142
- ],
143
- "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
144
- "homepage": "http://guzzlephp.org/",
145
- "keywords": [
146
- "client",
147
- "curl",
148
- "framework",
149
- "http",
150
- "http client",
151
- "rest",
152
- "web service"
153
- ]
154
- },
155
- {
156
- "name": "aftership/aftership-php-sdk",
157
- "version": "dev-master",
158
- "version_normalized": "9999999-dev",
159
- "source": {
160
- "type": "git",
161
- "url": "https://github.com/AfterShip/aftership-php.git",
162
- "reference": "c91f851b5c00b3bbacdc1bdd504ddf80557c4256"
163
- },
164
- "dist": {
165
- "type": "zip",
166
- "url": "https://api.github.com/repos/AfterShip/aftership-php/zipball/c91f851b5c00b3bbacdc1bdd504ddf80557c4256",
167
- "reference": "c91f851b5c00b3bbacdc1bdd504ddf80557c4256",
168
- "shasum": ""
169
- },
170
- "require": {
171
- "guzzle/guzzle": "3.8.*@dev",
172
- "php": ">=5.3.0"
173
- },
174
- "time": "2014-08-06 08:49:52",
175
- "type": "library",
176
- "installation-source": "source",
177
- "autoload": {
178
- "psr-0": {
179
- "AfterShip": "src/"
180
- }
181
- },
182
- "notification-url": "https://packagist.org/downloads/",
183
- "license": [
184
- "MIT"
185
- ],
186
- "authors": [
187
- {
188
- "name": "AfterShip",
189
- "email": "support@aftership.com"
190
- }
191
- ],
192
- "description": "The PHP SDK of AfterShip API",
193
- "keywords": [
194
- "FedEx",
195
- "aftership",
196
- "dhl",
197
- "shipping",
198
- "track",
199
- "tracking",
200
- "ups",
201
- "usps"
202
- ]
203
- }
204
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/.gitignore DELETED
@@ -1,27 +0,0 @@
1
- # Ingore common cruft
2
- .DS_STORE
3
- coverage
4
- .idea
5
-
6
- # Ignore binary files
7
- guzzle.phar
8
- guzzle-min.phar
9
-
10
- # Ignore potentially sensitive phpunit file
11
- phpunit.xml
12
-
13
- # Ignore composer generated files
14
- composer.phar
15
- composer.lock
16
- composer-test.lock
17
- vendor/
18
-
19
- # Ignore build files
20
- build/
21
- phing/build.properties
22
-
23
- # Ignore subsplit working directory
24
- .subsplit
25
-
26
- docs/_build
27
- docs/*.pyc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- language: php
2
-
3
- php:
4
- - 5.3
5
- - 5.4
6
- - 5.5
7
-
8
- before_script:
9
- - curl --version
10
- - pear config-set php_ini ~/.phpenv/versions/`php -r 'echo phpversion();'`/etc/php.ini
11
- - echo 'Installing pecl_http'
12
- - wget --quiet http://pecl.php.net/get/pecl_http-1.7.6.tgz
13
- - tar -xzf pecl_http-1.7.6.tgz
14
- - sh -c "cd pecl_http-1.7.6 && phpize && ./configure && make && sudo make install" > /dev/null
15
- - echo "extension=http.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
16
- - pecl install uri_template-beta
17
- - phpenv rehash
18
- - composer install --dev
19
- - echo 'Ensuring the correct version of node is running'
20
- - ~/.nvm/nvm.sh install v0.6.14
21
-
22
- script: vendor/bin/phpunit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/CHANGELOG.md DELETED
@@ -1,762 +0,0 @@
1
- CHANGELOG
2
- =========
3
-
4
- 3.8.1 (2013-01-28)
5
- ------------------
6
-
7
- * Bug: Always using GET requests when redirecting from a 303 response
8
- * Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
9
- `Guzzle\Http\ClientInterface::setSslVerification()`
10
- * Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL
11
- * Bug: The body of a request can now be set to `"0"`
12
- * Sending PHP stream requests no longer forces `HTTP/1.0`
13
- * Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of
14
- each sub-exception
15
- * Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than
16
- clobbering everything).
17
- * Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators)
18
- * Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`.
19
- For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`.
20
- * Now properly escaping the regular expression delimiter when matching Cookie domains.
21
- * Network access is now disabled when loading XML documents
22
-
23
- 3.8.0 (2013-12-05)
24
- ------------------
25
-
26
- * Added the ability to define a POST name for a file
27
- * JSON response parsing now properly walks additionalProperties
28
- * cURL error code 18 is now retried automatically in the BackoffPlugin
29
- * Fixed a cURL error when URLs contain fragments
30
- * Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were
31
- CurlExceptions
32
- * CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e)
33
- * Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS`
34
- * Fixed a bug that was encountered when parsing empty header parameters
35
- * UriTemplate now has a `setRegex()` method to match the docs
36
- * The `debug` request parameter now checks if it is truthy rather than if it exists
37
- * Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin
38
- * Added the ability to combine URLs using strict RFC 3986 compliance
39
- * Command objects can now return the validation errors encountered by the command
40
- * Various fixes to cache revalidation (#437 and 29797e5)
41
- * Various fixes to the AsyncPlugin
42
- * Cleaned up build scripts
43
-
44
- 3.7.4 (2013-10-02)
45
- ------------------
46
-
47
- * Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
48
- * Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
49
- (see https://github.com/aws/aws-sdk-php/issues/147)
50
- * Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots
51
- * Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420)
52
- * Updated the bundled cacert.pem (#419)
53
- * OauthPlugin now supports adding authentication to headers or query string (#425)
54
-
55
- 3.7.3 (2013-09-08)
56
- ------------------
57
-
58
- * Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
59
- `CommandTransferException`.
60
- * Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description
61
- * Schemas are only injected into response models when explicitly configured.
62
- * No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of
63
- an EntityBody.
64
- * Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator.
65
- * Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
66
- * Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
67
- * Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
68
- * Bug fix: Visiting XML attributes first before visting XML children when serializing requests
69
- * Bug fix: Properly parsing headers that contain commas contained in quotes
70
- * Bug fix: mimetype guessing based on a filename is now case-insensitive
71
-
72
- 3.7.2 (2013-08-02)
73
- ------------------
74
-
75
- * Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
76
- See https://github.com/guzzle/guzzle/issues/371
77
- * Bug fix: Cookie domains are now matched correctly according to RFC 6265
78
- See https://github.com/guzzle/guzzle/issues/377
79
- * Bug fix: GET parameters are now used when calculating an OAuth signature
80
- * Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted
81
- * `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched
82
- * `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input.
83
- See https://github.com/guzzle/guzzle/issues/379
84
- * Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See
85
- https://github.com/guzzle/guzzle/pull/380
86
- * cURL multi cleanup and optimizations
87
-
88
- 3.7.1 (2013-07-05)
89
- ------------------
90
-
91
- * Bug fix: Setting default options on a client now works
92
- * Bug fix: Setting options on HEAD requests now works. See #352
93
- * Bug fix: Moving stream factory before send event to before building the stream. See #353
94
- * Bug fix: Cookies no longer match on IP addresses per RFC 6265
95
- * Bug fix: Correctly parsing header parameters that are in `<>` and quotes
96
- * Added `cert` and `ssl_key` as request options
97
- * `Host` header can now diverge from the host part of a URL if the header is set manually
98
- * `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter
99
- * OAuth parameters are only added via the plugin if they aren't already set
100
- * Exceptions are now thrown when a URL cannot be parsed
101
- * Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
102
- * Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
103
-
104
- 3.7.0 (2013-06-10)
105
- ------------------
106
-
107
- * See UPGRADING.md for more information on how to upgrade.
108
- * Requests now support the ability to specify an array of $options when creating a request to more easily modify a
109
- request. You can pass a 'request.options' configuration setting to a client to apply default request options to
110
- every request created by a client (e.g. default query string variables, headers, curl options, etc).
111
- * Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`.
112
- See `Guzzle\Http\StaticClient::mount`.
113
- * Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests
114
- created by a command (e.g. custom headers, query string variables, timeout settings, etc).
115
- * Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the
116
- headers of a response
117
- * Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key
118
- (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`)
119
- * ServiceBuilders now support storing and retrieving arbitrary data
120
- * CachePlugin can now purge all resources for a given URI
121
- * CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource
122
- * CachePlugin now uses the Vary header to determine if a resource is a cache hit
123
- * `Guzzle\Http\Message\Response` now implements `\Serializable`
124
- * Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters
125
- * `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable
126
- * Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()`
127
- * Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size
128
- * `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message
129
- * Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older
130
- Symfony users can still use the old version of Monolog.
131
- * Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`.
132
- Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`.
133
- * Several performance improvements to `Guzzle\Common\Collection`
134
- * Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
135
- createRequest, head, delete, put, patch, post, options, prepareRequest
136
- * Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
137
- * Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
138
- * Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
139
- `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
140
- resource, string, or EntityBody into the $options parameter to specify the download location of the response.
141
- * Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
142
- default `array()`
143
- * Added `Guzzle\Stream\StreamInterface::isRepeatable`
144
- * Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
145
- $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
146
- $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`.
147
- * Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`.
148
- * Removed `Guzzle\Http\ClientInterface::expandTemplate()`
149
- * Removed `Guzzle\Http\ClientInterface::setRequestFactory()`
150
- * Removed `Guzzle\Http\ClientInterface::getCurlMulti()`
151
- * Removed `Guzzle\Http\Message\RequestInterface::canCache`
152
- * Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`
153
- * Removed `Guzzle\Http\Message\RequestInterface::isRedirect`
154
- * Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
155
- * You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting
156
- `Guzzle\Common\Version::$emitWarnings` to true.
157
- * Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use
158
- `$request->getResponseBody()->isRepeatable()` instead.
159
- * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
160
- `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
161
- * Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use
162
- `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
163
- * Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
164
- * Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
165
- * Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
166
- * Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand.
167
- These will work through Guzzle 4.0
168
- * Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params].
169
- * Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
170
- * Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`.
171
- * Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`.
172
- * Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
173
- * Marked `Guzzle\Common\Collection::inject()` as deprecated.
174
- * Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');`
175
- * CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
176
- CacheStorageInterface. These two objects and interface will be removed in a future version.
177
- * Always setting X-cache headers on cached responses
178
- * Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
179
- * `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
180
- $request, Response $response);`
181
- * `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
182
- * `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
183
- * Added `CacheStorageInterface::purge($url)`
184
- * `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
185
- $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
186
- CanCacheStrategyInterface $canCache = null)`
187
- * Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
188
-
189
- 3.6.0 (2013-05-29)
190
- ------------------
191
-
192
- * ServiceDescription now implements ToArrayInterface
193
- * Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
194
- * Guzzle can now correctly parse incomplete URLs
195
- * Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
196
- * Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
197
- * Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
198
- * Specific header implementations can be created for complex headers. When a message creates a header, it uses a
199
- HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
200
- CacheControl header implementation.
201
- * Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
202
- * Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
203
- * Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
204
- Guzzle\Http\Curl\RequestMediator
205
- * Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
206
- * Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
207
- * Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
208
- * Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
209
- * Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
210
- * All response header helper functions return a string rather than mixing Header objects and strings inconsistently
211
- * Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc are managed by Guzzle
212
- directly via interfaces
213
- * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
214
- but are a no-op until removed.
215
- * Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a
216
- `Guzzle\Service\Command\ArrayCommandInterface`.
217
- * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
218
- on a request while the request is still being transferred
219
- * The ability to case-insensitively search for header values
220
- * Guzzle\Http\Message\Header::hasExactHeader
221
- * Guzzle\Http\Message\Header::raw. Use getAll()
222
- * Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
223
- instead.
224
- * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
225
- * Added the ability to cast Model objects to a string to view debug information.
226
-
227
- 3.5.0 (2013-05-13)
228
- ------------------
229
-
230
- * Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
231
- * Bug: Better cleanup of one-time events accross the board (when an event is meant to fire once, it will now remove
232
- itself from the EventDispatcher)
233
- * Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
234
- * Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
235
- * Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a
236
- non-existent key
237
- * Bug: All __call() method arguments are now required (helps with mocking frameworks)
238
- * Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference
239
- to help with refcount based garbage collection of resources created by sending a request
240
- * Deprecating ZF1 cache and log adapters. These will be removed in the next major version.
241
- * Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the
242
- HistoryPlugin for a history.
243
- * Added a `responseBody` alias for the `response_body` location
244
- * Refactored internals to no longer rely on Response::getRequest()
245
- * HistoryPlugin can now be cast to a string
246
- * HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests
247
- and responses that are sent over the wire
248
- * Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
249
-
250
- 3.4.3 (2013-04-30)
251
- ------------------
252
-
253
- * Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
254
- * Added a check to re-extract the temp cacert bundle from the phar before sending each request
255
-
256
- 3.4.2 (2013-04-29)
257
- ------------------
258
-
259
- * Bug fix: Stream objects now work correctly with "a" and "a+" modes
260
- * Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
261
- * Bug fix: AsyncPlugin no longer forces HEAD requests
262
- * Bug fix: DateTime timezones are now properly handled when using the service description schema formatter
263
- * Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails
264
- * Setting a response on a request will write to the custom request body from the response body if one is specified
265
- * LogPlugin now writes to php://output when STDERR is undefined
266
- * Added the ability to set multiple POST files for the same key in a single call
267
- * application/x-www-form-urlencoded POSTs now use the utf-8 charset by default
268
- * Added the ability to queue CurlExceptions to the MockPlugin
269
- * Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
270
- * Configuration loading now allows remote files
271
-
272
- 3.4.1 (2013-04-16)
273
- ------------------
274
-
275
- * Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
276
- handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
277
- * Exceptions are now properly grouped when sending requests in parallel
278
- * Redirects are now properly aggregated when a multi transaction fails
279
- * Redirects now set the response on the original object even in the event of a failure
280
- * Bug fix: Model names are now properly set even when using $refs
281
- * Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax
282
- * Added support for oauth_callback in OAuth signatures
283
- * Added support for oauth_verifier in OAuth signatures
284
- * Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
285
-
286
- 3.4.0 (2013-04-11)
287
- ------------------
288
-
289
- * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
290
- * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
291
- * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
292
- * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
293
- * Bug fix: Added `number` type to service descriptions.
294
- * Bug fix: empty parameters are removed from an OAuth signature
295
- * Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header
296
- * Bug fix: Fixed "array to string" error when validating a union of types in a service description
297
- * Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream
298
- * Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin.
299
- * Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs.
300
- * The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections.
301
- * Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if
302
- the Content-Type can be determined based on the entity body or the path of the request.
303
- * Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder.
304
- * Added support for a PSR-3 LogAdapter.
305
- * Added a `command.after_prepare` event
306
- * Added `oauth_callback` parameter to the OauthPlugin
307
- * Added the ability to create a custom stream class when using a stream factory
308
- * Added a CachingEntityBody decorator
309
- * Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized.
310
- * The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar.
311
- * You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies
312
- * POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This
313
- means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use
314
- POST fields or files (the latter is only used when emulating a form POST in the browser).
315
- * Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
316
-
317
- 3.3.1 (2013-03-10)
318
- ------------------
319
-
320
- * Added the ability to create PHP streaming responses from HTTP requests
321
- * Bug fix: Running any filters when parsing response headers with service descriptions
322
- * Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing
323
- * Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across
324
- response location visitors.
325
- * Bug fix: Removed the possibility of creating configuration files with circular dependencies
326
- * RequestFactory::create() now uses the key of a POST file when setting the POST file name
327
- * Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
328
-
329
- 3.3.0 (2013-03-03)
330
- ------------------
331
-
332
- * A large number of performance optimizations have been made
333
- * Bug fix: Added 'wb' as a valid write mode for streams
334
- * Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned
335
- * Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()`
336
- * BC: Removed `Guzzle\Http\Utils` class
337
- * BC: Setting a service description on a client will no longer modify the client's command factories.
338
- * BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using
339
- the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
340
- * BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to
341
- lowercase
342
- * Operation parameter objects are now lazy loaded internally
343
- * Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses
344
- * Added support for instantiating responseType=class responseClass classes. Classes must implement
345
- `Guzzle\Service\Command\ResponseClassInterface`
346
- * Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These
347
- additional properties also support locations and can be used to parse JSON responses where the outermost part of the
348
- JSON is an array
349
- * Added support for nested renaming of JSON models (rename sentAs to name)
350
- * CachePlugin
351
- * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
352
- * Debug headers can now added to cached response in the CachePlugin
353
-
354
- 3.2.0 (2013-02-14)
355
- ------------------
356
-
357
- * CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
358
- * URLs with no path no longer contain a "/" by default
359
- * Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url.
360
- * BadResponseException no longer includes the full request and response message
361
- * Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface
362
- * Adding getResponseBody() to Guzzle\Http\Message\RequestInterface
363
- * Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription
364
- * Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list
365
- * xmlEncoding can now be customized for the XML declaration of a XML service description operation
366
- * Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value
367
- aggregation and no longer uses callbacks
368
- * The URL encoding implementation of Guzzle\Http\QueryString can now be customized
369
- * Bug fix: Filters were not always invoked for array service description parameters
370
- * Bug fix: Redirects now use a target response body rather than a temporary response body
371
- * Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
372
- * Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
373
-
374
- 3.1.2 (2013-01-27)
375
- ------------------
376
-
377
- * Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
378
- response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
379
- * Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent
380
- * CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444)
381
- * Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
382
- * Setting default headers on a client after setting the user-agent will not erase the user-agent setting
383
-
384
- 3.1.1 (2013-01-20)
385
- ------------------
386
-
387
- * Adding wildcard support to Guzzle\Common\Collection::getPath()
388
- * Adding alias support to ServiceBuilder configs
389
- * Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
390
-
391
- 3.1.0 (2013-01-12)
392
- ------------------
393
-
394
- * BC: CurlException now extends from RequestException rather than BadResponseException
395
- * BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
396
- * Added getData to ServiceDescriptionInterface
397
- * Added context array to RequestInterface::setState()
398
- * Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http
399
- * Bug: Adding required content-type when JSON request visitor adds JSON to a command
400
- * Bug: Fixing the serialization of a service description with custom data
401
- * Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing
402
- an array of successful and failed responses
403
- * Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection
404
- * Added Guzzle\Http\IoEmittingEntityBody
405
- * Moved command filtration from validators to location visitors
406
- * Added `extends` attributes to service description parameters
407
- * Added getModels to ServiceDescriptionInterface
408
-
409
- 3.0.7 (2012-12-19)
410
- ------------------
411
-
412
- * Fixing phar detection when forcing a cacert to system if null or true
413
- * Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
414
- * Cleaning up `Guzzle\Common\Collection::inject` method
415
- * Adding a response_body location to service descriptions
416
-
417
- 3.0.6 (2012-12-09)
418
- ------------------
419
-
420
- * CurlMulti performance improvements
421
- * Adding setErrorResponses() to Operation
422
- * composer.json tweaks
423
-
424
- 3.0.5 (2012-11-18)
425
- ------------------
426
-
427
- * Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
428
- * Bug: Response body can now be a string containing "0"
429
- * Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert
430
- * Bug: QueryString::fromString now properly parses query string parameters that contain equal signs
431
- * Added support for XML attributes in service description responses
432
- * DefaultRequestSerializer now supports array URI parameter values for URI template expansion
433
- * Added better mimetype guessing to requests and post files
434
-
435
- 3.0.4 (2012-11-11)
436
- ------------------
437
-
438
- * Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
439
- * Bug: Cookies can now be added that have a name, domain, or value set to "0"
440
- * Bug: Using the system cacert bundle when using the Phar
441
- * Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures
442
- * Enhanced cookie jar de-duplication
443
- * Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added
444
- * Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
445
- * Added the ability to create any sort of hash for a stream rather than just an MD5 hash
446
-
447
- 3.0.3 (2012-11-04)
448
- ------------------
449
-
450
- * Implementing redirects in PHP rather than cURL
451
- * Added PECL URI template extension and using as default parser if available
452
- * Bug: Fixed Content-Length parsing of Response factory
453
- * Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams.
454
- * Adding ToArrayInterface throughout library
455
- * Fixing OauthPlugin to create unique nonce values per request
456
-
457
- 3.0.2 (2012-10-25)
458
- ------------------
459
-
460
- * Magic methods are enabled by default on clients
461
- * Magic methods return the result of a command
462
- * Service clients no longer require a base_url option in the factory
463
- * Bug: Fixed an issue with URI templates where null template variables were being expanded
464
-
465
- 3.0.1 (2012-10-22)
466
- ------------------
467
-
468
- * Models can now be used like regular collection objects by calling filter, map, etc
469
- * Models no longer require a Parameter structure or initial data in the constructor
470
- * Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
471
-
472
- 3.0.0 (2012-10-15)
473
- ------------------
474
-
475
- * Rewrote service description format to be based on Swagger
476
- * Now based on JSON schema
477
- * Added nested input structures and nested response models
478
- * Support for JSON and XML input and output models
479
- * Renamed `commands` to `operations`
480
- * Removed dot class notation
481
- * Removed custom types
482
- * Broke the project into smaller top-level namespaces to be more component friendly
483
- * Removed support for XML configs and descriptions. Use arrays or JSON files.
484
- * Removed the Validation component and Inspector
485
- * Moved all cookie code to Guzzle\Plugin\Cookie
486
- * Magic methods on a Guzzle\Service\Client now return the command un-executed.
487
- * Calling getResult() or getResponse() on a command will lazily execute the command if needed.
488
- * Now shipping with cURL's CA certs and using it by default
489
- * Added previousResponse() method to response objects
490
- * No longer sending Accept and Accept-Encoding headers on every request
491
- * Only sending an Expect header by default when a payload is greater than 1MB
492
- * Added/moved client options:
493
- * curl.blacklist to curl.option.blacklist
494
- * Added ssl.certificate_authority
495
- * Added a Guzzle\Iterator component
496
- * Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin
497
- * Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin)
498
- * Added a more robust caching plugin
499
- * Added setBody to response objects
500
- * Updating LogPlugin to use a more flexible MessageFormatter
501
- * Added a completely revamped build process
502
- * Cleaning up Collection class and removing default values from the get method
503
- * Fixed ZF2 cache adapters
504
-
505
- 2.8.8 (2012-10-15)
506
- ------------------
507
-
508
- * Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
509
-
510
- 2.8.7 (2012-09-30)
511
- ------------------
512
-
513
- * Bug: Fixed config file aliases for JSON includes
514
- * Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
515
- * Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload
516
- * Bug: Hardening request and response parsing to account for missing parts
517
- * Bug: Fixed PEAR packaging
518
- * Bug: Fixed Request::getInfo
519
- * Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail
520
- * Adding the ability for the namespace Iterator factory to look in multiple directories
521
- * Added more getters/setters/removers from service descriptions
522
- * Added the ability to remove POST fields from OAuth signatures
523
- * OAuth plugin now supports 2-legged OAuth
524
-
525
- 2.8.6 (2012-09-05)
526
- ------------------
527
-
528
- * Added the ability to modify and build service descriptions
529
- * Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
530
- * Added a `json` parameter location
531
- * Now allowing dot notation for classes in the CacheAdapterFactory
532
- * Using the union of two arrays rather than an array_merge when extending service builder services and service params
533
- * Ensuring that a service is a string before doing strpos() checks on it when substituting services for references
534
- in service builder config files.
535
- * Services defined in two different config files that include one another will by default replace the previously
536
- defined service, but you can now create services that extend themselves and merge their settings over the previous
537
- * The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
538
- '_default' with a default JSON configuration file.
539
-
540
- 2.8.5 (2012-08-29)
541
- ------------------
542
-
543
- * Bug: Suppressed empty arrays from URI templates
544
- * Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
545
- * Added support for HTTP responses that do not contain a reason phrase in the start-line
546
- * AbstractCommand commands are now invokable
547
- * Added a way to get the data used when signing an Oauth request before a request is sent
548
-
549
- 2.8.4 (2012-08-15)
550
- ------------------
551
-
552
- * Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
553
- * Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable.
554
- * Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream
555
- * Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream
556
- * Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5())
557
- * Added additional response status codes
558
- * Removed SSL information from the default User-Agent header
559
- * DELETE requests can now send an entity body
560
- * Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries
561
- * Added the ability of the MockPlugin to consume mocked request bodies
562
- * LogPlugin now exposes request and response objects in the extras array
563
-
564
- 2.8.3 (2012-07-30)
565
- ------------------
566
-
567
- * Bug: Fixed a case where empty POST requests were sent as GET requests
568
- * Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
569
- * Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
570
- * Added multiple inheritance to service description commands
571
- * Added an ApiCommandInterface and added ``getParamNames()`` and ``hasParam()``
572
- * Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
573
- * Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
574
-
575
- 2.8.2 (2012-07-24)
576
- ------------------
577
-
578
- * Bug: Query string values set to 0 are no longer dropped from the query string
579
- * Bug: A Collection object is no longer created each time a call is made to ``Guzzle\Service\Command\AbstractCommand::getRequestHeaders()``
580
- * Bug: ``+`` is now treated as an encoded space when parsing query strings
581
- * QueryString and Collection performance improvements
582
- * Allowing dot notation for class paths in filters attribute of a service descriptions
583
-
584
- 2.8.1 (2012-07-16)
585
- ------------------
586
-
587
- * Loosening Event Dispatcher dependency
588
- * POST redirects can now be customized using CURLOPT_POSTREDIR
589
-
590
- 2.8.0 (2012-07-15)
591
- ------------------
592
-
593
- * BC: Guzzle\Http\Query
594
- * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
595
- * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
596
- * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
597
- * Changed the aggregation functions of QueryString to be static methods
598
- * Can now use fromString() with querystrings that have a leading ?
599
- * cURL configuration values can be specified in service descriptions using ``curl.`` prefixed parameters
600
- * Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
601
- * Cookies are no longer URL decoded by default
602
- * Bug: URI template variables set to null are no longer expanded
603
-
604
- 2.7.2 (2012-07-02)
605
- ------------------
606
-
607
- * BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
608
- * BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
609
- * CachePlugin now allows for a custom request parameter function to check if a request can be cached
610
- * Bug fix: CachePlugin now only caches GET and HEAD requests by default
611
- * Bug fix: Using header glue when transferring headers over the wire
612
- * Allowing deeply nested arrays for composite variables in URI templates
613
- * Batch divisors can now return iterators or arrays
614
-
615
- 2.7.1 (2012-06-26)
616
- ------------------
617
-
618
- * Minor patch to update version number in UA string
619
- * Updating build process
620
-
621
- 2.7.0 (2012-06-25)
622
- ------------------
623
-
624
- * BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
625
- * BC: Removed magic setX methods from commands
626
- * BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method
627
- * Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable.
628
- * Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity)
629
- * Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace
630
- * Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin
631
- * Added the ability to set POST fields and files in a service description
632
- * Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method
633
- * Adding a command.before_prepare event to clients
634
- * Added BatchClosureTransfer and BatchClosureDivisor
635
- * BatchTransferException now includes references to the batch divisor and transfer strategies
636
- * Fixed some tests so that they pass more reliably
637
- * Added Guzzle\Common\Log\ArrayLogAdapter
638
-
639
- 2.6.6 (2012-06-10)
640
- ------------------
641
-
642
- * BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
643
- * BC: Removing Guzzle\Service\Command\CommandSet
644
- * Adding generic batching system (replaces the batch queue plugin and command set)
645
- * Updating ZF cache and log adapters and now using ZF's composer repository
646
- * Bug: Setting the name of each ApiParam when creating through an ApiCommand
647
- * Adding result_type, result_doc, deprecated, and doc_url to service descriptions
648
- * Bug: Changed the default cookie header casing back to 'Cookie'
649
-
650
- 2.6.5 (2012-06-03)
651
- ------------------
652
-
653
- * BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
654
- * BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
655
- * BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data
656
- * BC: Renaming methods in the CookieJarInterface
657
- * Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations
658
- * Making the default glue for HTTP headers ';' instead of ','
659
- * Adding a removeValue to Guzzle\Http\Message\Header
660
- * Adding getCookies() to request interface.
661
- * Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
662
-
663
- 2.6.4 (2012-05-30)
664
- ------------------
665
-
666
- * BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
667
- * BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
668
- * Bug: Fixing magic method command calls on clients
669
- * Bug: Email constraint only validates strings
670
- * Bug: Aggregate POST fields when POST files are present in curl handle
671
- * Bug: Fixing default User-Agent header
672
- * Bug: Only appending or prepending parameters in commands if they are specified
673
- * Bug: Not requiring response reason phrases or status codes to match a predefined list of codes
674
- * Allowing the use of dot notation for class namespaces when using instance_of constraint
675
- * Added any_match validation constraint
676
- * Added an AsyncPlugin
677
- * Passing request object to the calculateWait method of the ExponentialBackoffPlugin
678
- * Allowing the result of a command object to be changed
679
- * Parsing location and type sub values when instantiating a service description rather than over and over at runtime
680
-
681
- 2.6.3 (2012-05-23)
682
- ------------------
683
-
684
- * [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
685
- * [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
686
- * You can now use an array of data when creating PUT request bodies in the request factory.
687
- * Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable.
688
- * [Http] Adding support for Content-Type in multipart POST uploads per upload
689
- * [Http] Added support for uploading multiple files using the same name (foo[0], foo[1])
690
- * Adding more POST data operations for easier manipulation of POST data.
691
- * You can now set empty POST fields.
692
- * The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files.
693
- * Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
694
- * CS updates
695
-
696
- 2.6.2 (2012-05-19)
697
- ------------------
698
-
699
- * [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method.
700
-
701
- 2.6.1 (2012-05-19)
702
- ------------------
703
-
704
- * [BC] Removing 'path' support in service descriptions. Use 'uri'.
705
- * [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
706
- * [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it.
707
- * [BC] Removing Guzzle\Common\XmlElement.
708
- * All commands, both dynamic and concrete, have ApiCommand objects.
709
- * Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits.
710
- * Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
711
- * Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
712
-
713
- 2.6.0 (2012-05-15)
714
- ------------------
715
-
716
- * [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
717
- * [BC] Executing a Command returns the result of the command rather than the command
718
- * [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed.
719
- * [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args.
720
- * [BC] Moving ResourceIterator* to Guzzle\Service\Resource
721
- * [BC] Completely refactored ResourceIterators to iterate over a cloned command object
722
- * [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate
723
- * [BC] Guzzle\Guzzle is now deprecated
724
- * Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject
725
- * Adding Guzzle\Version class to give version information about Guzzle
726
- * Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate()
727
- * Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data
728
- * ServiceDescription and ServiceBuilder are now cacheable using similar configs
729
- * Changing the format of XML and JSON service builder configs. Backwards compatible.
730
- * Cleaned up Cookie parsing
731
- * Trimming the default Guzzle User-Agent header
732
- * Adding a setOnComplete() method to Commands that is called when a command completes
733
- * Keeping track of requests that were mocked in the MockPlugin
734
- * Fixed a caching bug in the CacheAdapterFactory
735
- * Inspector objects can be injected into a Command object
736
- * Refactoring a lot of code and tests to be case insensitive when dealing with headers
737
- * Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL
738
- * Adding the ability to set global option overrides to service builder configs
739
- * Adding the ability to include other service builder config files from within XML and JSON files
740
- * Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
741
-
742
- 2.5.0 (2012-05-08)
743
- ------------------
744
-
745
- * Major performance improvements
746
- * [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated.
747
- * [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component.
748
- * [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}"
749
- * Added the ability to passed parameters to all requests created by a client
750
- * Added callback functionality to the ExponentialBackoffPlugin
751
- * Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies.
752
- * Rewinding request stream bodies when retrying requests
753
- * Exception is thrown when JSON response body cannot be decoded
754
- * Added configurable magic method calls to clients and commands. This is off by default.
755
- * Fixed a defect that added a hash to every parsed URL part
756
- * Fixed duplicate none generation for OauthPlugin.
757
- * Emitting an event each time a client is generated by a ServiceBuilder
758
- * Using an ApiParams object instead of a Collection for parameters of an ApiCommand
759
- * cache.* request parameters should be renamed to params.cache.*
760
- * Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc). See CurlHandle.
761
- * Added the ability to disable type validation of service descriptions
762
- * ServiceDescriptions and ServiceBuilders are now Serializable
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2011 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/README.md DELETED
@@ -1,212 +0,0 @@
1
- Guzzle, PHP HTTP client and webservice framework
2
- ================================================
3
-
4
- [![Latest Stable Version](https://poser.pugx.org/guzzle/guzzle/version.png)](https://packagist.org/packages/guzzle/guzzle) [![Composer Downloads](https://poser.pugx.org/guzzle/guzzle/d/total.png)](https://packagist.org/packages/guzzle/guzzle) [![Build Status](https://secure.travis-ci.org/guzzle/guzzle.png?branch=master)](http://travis-ci.org/guzzle/guzzle)
5
-
6
- Guzzle is a PHP HTTP client and framework for building RESTful web service clients.
7
-
8
- - Extremely powerful API provides all the power of cURL with a simple interface.
9
- - Truly take advantage of HTTP/1.1 with persistent connections, connection pooling, and parallel requests.
10
- - Service description DSL allows you build awesome web service clients faster.
11
- - Symfony2 event-based plugin system allows you to completely modify the behavior of a request.
12
-
13
- Get answers with: [Documentation](http://docs.guzzlephp.org/), [Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle), IRC ([#guzzlephp](irc://irc.freenode.net/#guzzlephp) @ irc.freenode.net)
14
-
15
- ```php
16
- // Really simple using a static facade
17
- Guzzle\Http\StaticClient::mount();
18
- $response = Guzzle::get('http://guzzlephp.org');
19
-
20
- // More control using a client class
21
- $client = new \Guzzle\Http\Client('http://guzzlephp.org');
22
- $request = $client->get('/');
23
- $response = $request->send();
24
- ```
25
-
26
- ### Installing via Composer
27
-
28
- The recommended way to install Guzzle is through [Composer](http://getcomposer.org).
29
-
30
- ```bash
31
- # Install Composer
32
- curl -sS https://getcomposer.org/installer | php
33
-
34
- # Add Guzzle as a dependency
35
- php composer.phar require guzzle/guzzle:~3.7
36
- ```
37
-
38
- After installing, you need to require Composer's autoloader:
39
-
40
- ```php
41
- require 'vendor/autoload.php';
42
- ```
43
-
44
- ### Installing via phar
45
-
46
- As of the 3.7.4 release, each release of Guzzle includes a "guzzle.phar" file that includes all of the files needed to
47
- run Guzzle and all of Guzzle's dependencies. Simply download the phar and include it in your project.
48
-
49
- You can find a list of each release and the available downloads at https://github.com/guzzle/guzzle/releases.
50
-
51
- Features
52
- --------
53
-
54
- - Supports GET, HEAD, POST, DELETE, PUT, PATCH, OPTIONS, and any other custom HTTP method
55
- - Allows full access to request and response headers
56
- - Persistent connections are implicitly managed by Guzzle, resulting in huge performance benefits
57
- - [Send requests in parallel](http://guzzlephp.org/tour/http.html#send-http-requests-in-parallel)
58
- - Cookie sessions can be maintained between requests using the
59
- [CookiePlugin](http://guzzlephp.org/tour/http.html#cookie-session-plugin)
60
- - Allows custom [entity bodies](http://guzzlephp.org/tour/http.html#entity-bodies), including sending data from a PHP
61
- stream and downloading data to a PHP stream
62
- - Responses can be cached and served from cache using the
63
- [caching forward proxy plugin](http://guzzlephp.org/tour/http.html#php-based-caching-forward-proxy)
64
- - Failed requests can be retried using
65
- [truncated exponential backoff](http://guzzlephp.org/tour/http.html#truncated-exponential-backoff) with custom retry
66
- policies
67
- - Entity bodies can be validated automatically using Content-MD5 headers and the
68
- [MD5 hash validator plugin](http://guzzlephp.org/tour/http.html#md5-hash-validator-plugin)
69
- - All data sent over the wire can be logged using the
70
- [LogPlugin](http://guzzlephp.org/tour/http.html#over-the-wire-logging)
71
- - Subject/Observer signal slot system for unobtrusively
72
- [modifying request behavior](http://guzzlephp.org/guide/http/creating_plugins.html)
73
- - Supports all of the features of libcurl including authentication, compression, redirects, SSL, proxies, etc
74
- - Web service client framework for building future-proof interfaces to web services
75
- - Includes a [service description DSL](http://guzzlephp.org/guide/service/service_descriptions.html) for quickly
76
- building webservice clients
77
- - Full support for [URI templates](http://tools.ietf.org/html/rfc6570)
78
- - Advanced batching functionality to efficiently send requests or commands in parallel with customizable batch sizes
79
- and transfer strategies
80
-
81
- HTTP basics
82
- -----------
83
-
84
- ```php
85
- <?php
86
-
87
- use Guzzle\Http\Client;
88
-
89
- $client = new Client('http://www.example.com/api/v1/key/{key}', [
90
- 'key' => '***'
91
- ]);
92
-
93
- // Issue a path using a relative URL to the client's base URL
94
- // Sends to http://www.example.com/api/v1/key/***/users
95
- $request = $client->get('users');
96
- $response = $request->send();
97
-
98
- // Relative URL that overwrites the path of the base URL
99
- $request = $client->get('/test/123.php?a=b');
100
-
101
- // Issue a head request on the base URL
102
- $response = $client->head()->send();
103
- // Delete user 123
104
- $response = $client->delete('users/123')->send();
105
-
106
- // Send a PUT request with custom headers
107
- $response = $client->put('upload/text', [
108
- 'X-Header' => 'My Header'
109
- ], 'body of the request')->send();
110
-
111
- // Send a PUT request using the contents of a PHP stream as the body
112
- // Send using an absolute URL (overrides the base URL)
113
- $response = $client->put('http://www.example.com/upload', [
114
- 'X-Header' => 'My Header'
115
- ], fopen('http://www.test.com/', 'r'));
116
-
117
- // Create a POST request with a file upload (notice the @ symbol):
118
- $request = $client->post('http://localhost:8983/solr/update', null, [
119
- 'custom_field' => 'my value',
120
- 'file' => '@/path/to/documents.xml'
121
- ]);
122
-
123
- // Create a POST request and add the POST files manually
124
- $request = $client->post('http://localhost:8983/solr/update')
125
- ->addPostFiles(['file' => '/path/to/documents.xml']);
126
-
127
- // Responses are objects
128
- echo $response->getStatusCode() . ' ' . $response->getReasonPhrase() . "\n";
129
-
130
- // Requests and responses can be cast to a string to show the raw HTTP message
131
- echo $request . "\n\n" . $response;
132
-
133
- // Create a request based on an HTTP message
134
- $request = RequestFactory::fromMessage(
135
- "PUT / HTTP/1.1\r\n" .
136
- "Host: test.com:8081\r\n" .
137
- "Content-Type: text/plain" .
138
- "Transfer-Encoding: chunked\r\n" .
139
- "\r\n" .
140
- "this is the body"
141
- );
142
- ```
143
-
144
- Using the static client facade
145
- ------------------------------
146
-
147
- You can use Guzzle through a static client to make it even easier to send simple HTTP requests.
148
-
149
- ```php
150
- <?php
151
-
152
- // Use the static client directly:
153
- $response = Guzzle\Http\StaticClient::get('http://www.google.com');
154
-
155
- // Or, mount the client to \Guzzle to make it easier to use
156
- Guzzle\Http\StaticClient::mount();
157
-
158
- $response = Guzzle::get('http://guzzlephp.org');
159
-
160
- // Custom options can be passed into requests created by the static client
161
- $response = Guzzle::post('http://guzzlephp.org', [
162
- 'headers' => ['X-Foo' => 'Bar'],
163
- 'body' => ['Foo' => 'Bar'],
164
- 'query' => ['Test' => 123],
165
- 'timeout' => 10,
166
- 'debug' => true,
167
- 'save_to' => '/path/to/file.html'
168
- ]);
169
- ```
170
-
171
- ### Available request options:
172
-
173
- * headers: Associative array of headers
174
- * query: Associative array of query string values to add to the request
175
- * body: Body of a request, including an EntityBody, string, or array when sending POST requests. Setting a body for a
176
- GET request will set where the response body is downloaded.
177
- * auth: Array of HTTP authentication parameters to use with the request. The array must contain the
178
- username in index [0], the password in index [1], and can optionally contain the authentication type in index [2].
179
- The authentication types are: "Basic", "Digest". The default auth type is "Basic".
180
- * cookies: Associative array of cookies
181
- * allow_redirects: Set to false to disable redirects
182
- * save_to: String, fopen resource, or EntityBody object used to store the body of the response
183
- * events: Associative array mapping event names to a closure or array of (priority, closure)
184
- * plugins: Array of plugins to add to the request
185
- * exceptions: Set to false to disable throwing exceptions on an HTTP level error (e.g. 404, 500, etc)
186
- * timeout: Float describing the timeout of the request in seconds
187
- * connect_timeout: Float describing the number of seconds to wait while trying to connect. Use 0 to wait
188
- indefinitely.
189
- * verify: Set to true to enable SSL cert validation (the default), false to disable, or supply the path to a CA
190
- bundle to enable verification using a custom certificate.
191
- * proxy: Specify an HTTP proxy (e.g. "http://username:password@192.168.16.1:10")
192
- * debug: Set to true to display all data sent over the wire
193
-
194
- These options can also be used when creating requests using a standard client:
195
-
196
- ```php
197
- $client = new Guzzle\Http\Client();
198
- // Create a request with a timeout of 10 seconds
199
- $request = $client->get('http://guzzlephp.org', [], ['timeout' => 10]);
200
- $response = $request->send();
201
- ```
202
-
203
- Unit testing
204
- ------------
205
-
206
- Guzzle uses PHPUnit for unit testing. In order to run the unit tests, you'll first need
207
- to install the dependencies of the project using Composer: `php composer.phar install --dev`.
208
- You can then run the tests using `vendor/bin/phpunit`.
209
-
210
- If you are running the tests with xdebug enabled, you may encounter the following issue: 'Fatal error: Maximum function nesting level of '100' reached, aborting!'. This can be resolved by adding 'xdebug.max_nesting_level = 200' to your php.ini file.
211
-
212
- The PECL extensions, uri_template and pecl_http will be required to ensure all the tests can run.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/UPGRADING.md DELETED
@@ -1,537 +0,0 @@
1
- Guzzle Upgrade Guide
2
- ====================
3
-
4
- 3.6 to 3.7
5
- ----------
6
-
7
- ### Deprecations
8
-
9
- - You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.:
10
-
11
- ```php
12
- \Guzzle\Common\Version::$emitWarnings = true;
13
- ```
14
-
15
- The following APIs and options have been marked as deprecated:
16
-
17
- - Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead.
18
- - Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
19
- - Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead.
20
- - Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead.
21
- - Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead.
22
- - Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated
23
- - Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client.
24
- - Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8.
25
- - Marked `Guzzle\Common\Collection::inject()` as deprecated.
26
- - Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use
27
- `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or
28
- `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));`
29
-
30
- 3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational
31
- request methods. When paired with a client's configuration settings, these options allow you to specify default settings
32
- for various aspects of a request. Because these options make other previous configuration options redundant, several
33
- configuration options and methods of a client and AbstractCommand have been deprecated.
34
-
35
- - Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`.
36
- - Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`.
37
- - Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')`
38
- - Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0
39
-
40
- $command = $client->getCommand('foo', array(
41
- 'command.headers' => array('Test' => '123'),
42
- 'command.response_body' => '/path/to/file'
43
- ));
44
-
45
- // Should be changed to:
46
-
47
- $command = $client->getCommand('foo', array(
48
- 'command.request_options' => array(
49
- 'headers' => array('Test' => '123'),
50
- 'save_as' => '/path/to/file'
51
- )
52
- ));
53
-
54
- ### Interface changes
55
-
56
- Additions and changes (you will need to update any implementations or subclasses you may have created):
57
-
58
- - Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`:
59
- createRequest, head, delete, put, patch, post, options, prepareRequest
60
- - Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()`
61
- - Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface`
62
- - Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to
63
- `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a
64
- resource, string, or EntityBody into the $options parameter to specify the download location of the response.
65
- - Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a
66
- default `array()`
67
- - Added `Guzzle\Stream\StreamInterface::isRepeatable`
68
- - Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods.
69
-
70
- The following methods were removed from interfaces. All of these methods are still available in the concrete classes
71
- that implement them, but you should update your code to use alternative methods:
72
-
73
- - Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use
74
- `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or
75
- `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or
76
- `$client->setDefaultOption('headers/{header_name}', 'value')`. or
77
- `$client->setDefaultOption('headers', array('header_name' => 'value'))`.
78
- - Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`.
79
- - Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail.
80
- - Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail.
81
- - Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail.
82
- - Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin.
83
- - Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin.
84
- - Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin.
85
-
86
- ### Cache plugin breaking changes
87
-
88
- - CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a
89
- CacheStorageInterface. These two objects and interface will be removed in a future version.
90
- - Always setting X-cache headers on cached responses
91
- - Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin
92
- - `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface
93
- $request, Response $response);`
94
- - `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);`
95
- - `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);`
96
- - Added `CacheStorageInterface::purge($url)`
97
- - `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin
98
- $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache,
99
- CanCacheStrategyInterface $canCache = null)`
100
- - Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
101
-
102
- 3.5 to 3.6
103
- ----------
104
-
105
- * Mixed casing of headers are now forced to be a single consistent casing across all values for that header.
106
- * Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution
107
- * Removed the whole changedHeader() function system of messages because all header changes now go through addHeader().
108
- For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader().
109
- Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request.
110
- * Specific header implementations can be created for complex headers. When a message creates a header, it uses a
111
- HeaderFactory which can map specific headers to specific header classes. There is now a Link header and
112
- CacheControl header implementation.
113
- * Moved getLinks() from Response to just be used on a Link header object.
114
-
115
- If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the
116
- HeaderInterface (e.g. toArray(), getAll(), etc).
117
-
118
- ### Interface changes
119
-
120
- * Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate
121
- * Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti()
122
- * Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in
123
- Guzzle\Http\Curl\RequestMediator
124
- * Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string.
125
- * Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface
126
- * Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders()
127
-
128
- ### Removed deprecated functions
129
-
130
- * Removed Guzzle\Parser\ParserRegister::get(). Use getParser()
131
- * Removed Guzzle\Parser\ParserRegister::set(). Use registerParser().
132
-
133
- ### Deprecations
134
-
135
- * The ability to case-insensitively search for header values
136
- * Guzzle\Http\Message\Header::hasExactHeader
137
- * Guzzle\Http\Message\Header::raw. Use getAll()
138
- * Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object
139
- instead.
140
-
141
- ### Other changes
142
-
143
- * All response header helper functions return a string rather than mixing Header objects and strings inconsistently
144
- * Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc are managed by Guzzle
145
- directly via interfaces
146
- * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
147
- but are a no-op until removed.
148
- * Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a
149
- `Guzzle\Service\Command\ArrayCommandInterface`.
150
- * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
151
- on a request while the request is still being transferred
152
- * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
153
-
154
- 3.3 to 3.4
155
- ----------
156
-
157
- Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
158
-
159
- 3.2 to 3.3
160
- ----------
161
-
162
- ### Response::getEtag() quote stripping removed
163
-
164
- `Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header
165
-
166
- ### Removed `Guzzle\Http\Utils`
167
-
168
- The `Guzzle\Http\Utils` class was removed. This class was only used for testing.
169
-
170
- ### Stream wrapper and type
171
-
172
- `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to lowercase.
173
-
174
- ### curl.emit_io became emit_io
175
-
176
- Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the
177
- 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io'
178
-
179
- 3.1 to 3.2
180
- ----------
181
-
182
- ### CurlMulti is no longer reused globally
183
-
184
- Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added
185
- to a single client can pollute requests dispatched from other clients.
186
-
187
- If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the
188
- ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is
189
- created.
190
-
191
- ```php
192
- $multi = new Guzzle\Http\Curl\CurlMulti();
193
- $builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json');
194
- $builder->addListener('service_builder.create_client', function ($event) use ($multi) {
195
- $event['client']->setCurlMulti($multi);
196
- }
197
- });
198
- ```
199
-
200
- ### No default path
201
-
202
- URLs no longer have a default path value of '/' if no path was specified.
203
-
204
- Before:
205
-
206
- ```php
207
- $request = $client->get('http://www.foo.com');
208
- echo $request->getUrl();
209
- // >> http://www.foo.com/
210
- ```
211
-
212
- After:
213
-
214
- ```php
215
- $request = $client->get('http://www.foo.com');
216
- echo $request->getUrl();
217
- // >> http://www.foo.com
218
- ```
219
-
220
- ### Less verbose BadResponseException
221
-
222
- The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and
223
- response information. You can, however, get access to the request and response object by calling `getRequest()` or
224
- `getResponse()` on the exception object.
225
-
226
- ### Query parameter aggregation
227
-
228
- Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a
229
- setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is
230
- responsible for handling the aggregation of multi-valued query string variables into a flattened hash.
231
-
232
- 2.8 to 3.x
233
- ----------
234
-
235
- ### Guzzle\Service\Inspector
236
-
237
- Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig`
238
-
239
- **Before**
240
-
241
- ```php
242
- use Guzzle\Service\Inspector;
243
-
244
- class YourClient extends \Guzzle\Service\Client
245
- {
246
- public static function factory($config = array())
247
- {
248
- $default = array();
249
- $required = array('base_url', 'username', 'api_key');
250
- $config = Inspector::fromConfig($config, $default, $required);
251
-
252
- $client = new self(
253
- $config->get('base_url'),
254
- $config->get('username'),
255
- $config->get('api_key')
256
- );
257
- $client->setConfig($config);
258
-
259
- $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
260
-
261
- return $client;
262
- }
263
- ```
264
-
265
- **After**
266
-
267
- ```php
268
- use Guzzle\Common\Collection;
269
-
270
- class YourClient extends \Guzzle\Service\Client
271
- {
272
- public static function factory($config = array())
273
- {
274
- $default = array();
275
- $required = array('base_url', 'username', 'api_key');
276
- $config = Collection::fromConfig($config, $default, $required);
277
-
278
- $client = new self(
279
- $config->get('base_url'),
280
- $config->get('username'),
281
- $config->get('api_key')
282
- );
283
- $client->setConfig($config);
284
-
285
- $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json'));
286
-
287
- return $client;
288
- }
289
- ```
290
-
291
- ### Convert XML Service Descriptions to JSON
292
-
293
- **Before**
294
-
295
- ```xml
296
- <?xml version="1.0" encoding="UTF-8"?>
297
- <client>
298
- <commands>
299
- <!-- Groups -->
300
- <command name="list_groups" method="GET" uri="groups.json">
301
- <doc>Get a list of groups</doc>
302
- </command>
303
- <command name="search_groups" method="GET" uri='search.json?query="{{query}} type:group"'>
304
- <doc>Uses a search query to get a list of groups</doc>
305
- <param name="query" type="string" required="true" />
306
- </command>
307
- <command name="create_group" method="POST" uri="groups.json">
308
- <doc>Create a group</doc>
309
- <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
310
- <param name="Content-Type" location="header" static="application/json"/>
311
- </command>
312
- <command name="delete_group" method="DELETE" uri="groups/{{id}}.json">
313
- <doc>Delete a group by ID</doc>
314
- <param name="id" type="integer" required="true"/>
315
- </command>
316
- <command name="get_group" method="GET" uri="groups/{{id}}.json">
317
- <param name="id" type="integer" required="true"/>
318
- </command>
319
- <command name="update_group" method="PUT" uri="groups/{{id}}.json">
320
- <doc>Update a group</doc>
321
- <param name="id" type="integer" required="true"/>
322
- <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
323
- <param name="Content-Type" location="header" static="application/json"/>
324
- </command>
325
- </commands>
326
- </client>
327
- ```
328
-
329
- **After**
330
-
331
- ```json
332
- {
333
- "name": "Zendesk REST API v2",
334
- "apiVersion": "2012-12-31",
335
- "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users",
336
- "operations": {
337
- "list_groups": {
338
- "httpMethod":"GET",
339
- "uri": "groups.json",
340
- "summary": "Get a list of groups"
341
- },
342
- "search_groups":{
343
- "httpMethod":"GET",
344
- "uri": "search.json?query=\"{query} type:group\"",
345
- "summary": "Uses a search query to get a list of groups",
346
- "parameters":{
347
- "query":{
348
- "location": "uri",
349
- "description":"Zendesk Search Query",
350
- "type": "string",
351
- "required": true
352
- }
353
- }
354
- },
355
- "create_group": {
356
- "httpMethod":"POST",
357
- "uri": "groups.json",
358
- "summary": "Create a group",
359
- "parameters":{
360
- "data": {
361
- "type": "array",
362
- "location": "body",
363
- "description":"Group JSON",
364
- "filters": "json_encode",
365
- "required": true
366
- },
367
- "Content-Type":{
368
- "type": "string",
369
- "location":"header",
370
- "static": "application/json"
371
- }
372
- }
373
- },
374
- "delete_group": {
375
- "httpMethod":"DELETE",
376
- "uri": "groups/{id}.json",
377
- "summary": "Delete a group",
378
- "parameters":{
379
- "id":{
380
- "location": "uri",
381
- "description":"Group to delete by ID",
382
- "type": "integer",
383
- "required": true
384
- }
385
- }
386
- },
387
- "get_group": {
388
- "httpMethod":"GET",
389
- "uri": "groups/{id}.json",
390
- "summary": "Get a ticket",
391
- "parameters":{
392
- "id":{
393
- "location": "uri",
394
- "description":"Group to get by ID",
395
- "type": "integer",
396
- "required": true
397
- }
398
- }
399
- },
400
- "update_group": {
401
- "httpMethod":"PUT",
402
- "uri": "groups/{id}.json",
403
- "summary": "Update a group",
404
- "parameters":{
405
- "id": {
406
- "location": "uri",
407
- "description":"Group to update by ID",
408
- "type": "integer",
409
- "required": true
410
- },
411
- "data": {
412
- "type": "array",
413
- "location": "body",
414
- "description":"Group JSON",
415
- "filters": "json_encode",
416
- "required": true
417
- },
418
- "Content-Type":{
419
- "type": "string",
420
- "location":"header",
421
- "static": "application/json"
422
- }
423
- }
424
- }
425
- }
426
- ```
427
-
428
- ### Guzzle\Service\Description\ServiceDescription
429
-
430
- Commands are now called Operations
431
-
432
- **Before**
433
-
434
- ```php
435
- use Guzzle\Service\Description\ServiceDescription;
436
-
437
- $sd = new ServiceDescription();
438
- $sd->getCommands(); // @returns ApiCommandInterface[]
439
- $sd->hasCommand($name);
440
- $sd->getCommand($name); // @returns ApiCommandInterface|null
441
- $sd->addCommand($command); // @param ApiCommandInterface $command
442
- ```
443
-
444
- **After**
445
-
446
- ```php
447
- use Guzzle\Service\Description\ServiceDescription;
448
-
449
- $sd = new ServiceDescription();
450
- $sd->getOperations(); // @returns OperationInterface[]
451
- $sd->hasOperation($name);
452
- $sd->getOperation($name); // @returns OperationInterface|null
453
- $sd->addOperation($operation); // @param OperationInterface $operation
454
- ```
455
-
456
- ### Guzzle\Common\Inflection\Inflector
457
-
458
- Namespace is now `Guzzle\Inflection\Inflector`
459
-
460
- ### Guzzle\Http\Plugin
461
-
462
- Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below.
463
-
464
- ### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log
465
-
466
- Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively.
467
-
468
- **Before**
469
-
470
- ```php
471
- use Guzzle\Common\Log\ClosureLogAdapter;
472
- use Guzzle\Http\Plugin\LogPlugin;
473
-
474
- /** @var \Guzzle\Http\Client */
475
- $client;
476
-
477
- // $verbosity is an integer indicating desired message verbosity level
478
- $client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE);
479
- ```
480
-
481
- **After**
482
-
483
- ```php
484
- use Guzzle\Log\ClosureLogAdapter;
485
- use Guzzle\Log\MessageFormatter;
486
- use Guzzle\Plugin\Log\LogPlugin;
487
-
488
- /** @var \Guzzle\Http\Client */
489
- $client;
490
-
491
- // $format is a string indicating desired message format -- @see MessageFormatter
492
- $client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT);
493
- ```
494
-
495
- ### Guzzle\Http\Plugin\CurlAuthPlugin
496
-
497
- Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`.
498
-
499
- ### Guzzle\Http\Plugin\ExponentialBackoffPlugin
500
-
501
- Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes.
502
-
503
- **Before**
504
-
505
- ```php
506
- use Guzzle\Http\Plugin\ExponentialBackoffPlugin;
507
-
508
- $backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge(
509
- ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429)
510
- ));
511
-
512
- $client->addSubscriber($backoffPlugin);
513
- ```
514
-
515
- **After**
516
-
517
- ```php
518
- use Guzzle\Plugin\Backoff\BackoffPlugin;
519
- use Guzzle\Plugin\Backoff\HttpBackoffStrategy;
520
-
521
- // Use convenient factory method instead -- see implementation for ideas of what
522
- // you can do with chaining backoff strategies
523
- $backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge(
524
- HttpBackoffStrategy::getDefaultFailureCodes(), array(429)
525
- ));
526
- $client->addSubscriber($backoffPlugin);
527
- ```
528
-
529
- ### Known Issues
530
-
531
- #### [BUG] Accept-Encoding header behavior changed unintentionally.
532
-
533
- (See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e)
534
-
535
- In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to
536
- properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen.
537
- See issue #217 for a workaround, or use a version containing the fix.
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/build.xml DELETED
@@ -1,45 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project name="guzzle" default="test">
3
- <!-- set local values, like git location -->
4
- <property file="phing/build.properties.dist" override="true" />
5
- <property file="phing/build.properties" override="true" />
6
-
7
- <property name="dir.output" value="${project.basedir}/build/artifacts" />
8
- <property name="dir.imports" value="${project.basedir}/phing/imports" />
9
- <property name="dir.bin" value="${project.basedir}/bin" />
10
- <property name="repo.dir" value="${project.basedir}" />
11
-
12
- <import file="${dir.imports}/dependencies.xml"/>
13
- <import file="${dir.imports}/deploy.xml"/>
14
-
15
- <target name="composer-lint" description="lint-check composer.json only">
16
- <composerlint dir="${project.basedir}/src" file="{$project.basedir}/composer.json" />
17
- </target>
18
-
19
- <target name="test" description="Run unit tests">
20
- <exec passthru="true" command="vendor/bin/phpunit" checkReturn="true" />
21
- </target>
22
-
23
- <target name="build-init" description="Initialize local phing properties">
24
- <copy file="phing/build.properties.dist" tofile="phing/build.properties" overwrite="false" />
25
- </target>
26
-
27
- <target name="clean">
28
- <delete dir="${dir.output}"/>
29
- <delete dir="${project.basedir}/build/pearwork"/>
30
- </target>
31
-
32
- <target name="prepare" depends="clean,build-init">
33
- <mkdir dir="${dir.output}"/>
34
- <mkdir dir="${dir.output}/logs" />
35
- </target>
36
-
37
- <target name="coverage" depends="prepare">
38
- <exec passthru="true" command="vendor/bin/phpunit --coverage-html=${dir.output}/coverage" />
39
- </target>
40
-
41
- <target name="view-coverage">
42
- <exec passthru="true" command="open ${dir.output}/coverage/index.html" />
43
- </target>
44
-
45
- </project>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/composer.json DELETED
@@ -1,74 +0,0 @@
1
- {
2
- "name": "guzzle/guzzle",
3
- "type": "library",
4
- "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
5
- "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
6
- "homepage": "http://guzzlephp.org/",
7
- "license": "MIT",
8
-
9
- "authors": [
10
- {
11
- "name": "Michael Dowling",
12
- "email": "mtdowling@gmail.com",
13
- "homepage": "https://github.com/mtdowling"
14
- },
15
- {
16
- "name": "Guzzle Community",
17
- "homepage": "https://github.com/guzzle/guzzle/contributors"
18
- }
19
- ],
20
-
21
- "replace": {
22
- "guzzle/batch": "self.version",
23
- "guzzle/cache": "self.version",
24
- "guzzle/common": "self.version",
25
- "guzzle/http": "self.version",
26
- "guzzle/inflection": "self.version",
27
- "guzzle/iterator": "self.version",
28
- "guzzle/log": "self.version",
29
- "guzzle/parser": "self.version",
30
- "guzzle/plugin": "self.version",
31
- "guzzle/plugin-async": "self.version",
32
- "guzzle/plugin-backoff": "self.version",
33
- "guzzle/plugin-cache": "self.version",
34
- "guzzle/plugin-cookie": "self.version",
35
- "guzzle/plugin-curlauth": "self.version",
36
- "guzzle/plugin-error-response": "self.version",
37
- "guzzle/plugin-history": "self.version",
38
- "guzzle/plugin-log": "self.version",
39
- "guzzle/plugin-md5": "self.version",
40
- "guzzle/plugin-mock": "self.version",
41
- "guzzle/plugin-oauth": "self.version",
42
- "guzzle/service": "self.version",
43
- "guzzle/stream": "self.version"
44
- },
45
-
46
- "require": {
47
- "php": ">=5.3.3",
48
- "ext-curl": "*",
49
- "symfony/event-dispatcher": ">=2.1"
50
- },
51
-
52
- "autoload": {
53
- "psr-0": {
54
- "Guzzle": "src/",
55
- "Guzzle\\Tests": "tests/"
56
- }
57
- },
58
-
59
- "require-dev": {
60
- "doctrine/cache": "*",
61
- "symfony/class-loader": "*",
62
- "monolog/monolog": "1.*",
63
- "psr/log": "1.0.*",
64
- "zendframework/zend-cache": "<2.3",
65
- "zendframework/zend-log": "<2.3",
66
- "phpunit/phpunit": "3.7.*"
67
- },
68
-
69
- "extra": {
70
- "branch-alias": {
71
- "dev-master": "3.8-dev"
72
- }
73
- }
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/Makefile DELETED
@@ -1,153 +0,0 @@
1
- # Makefile for Sphinx documentation
2
- #
3
-
4
- # You can set these variables from the command line.
5
- SPHINXOPTS =
6
- SPHINXBUILD = sphinx-build
7
- PAPER =
8
- BUILDDIR = _build
9
-
10
- # Internal variables.
11
- PAPEROPT_a4 = -D latex_paper_size=a4
12
- PAPEROPT_letter = -D latex_paper_size=letter
13
- ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14
- # the i18n builder cannot share the environment and doctrees with the others
15
- I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16
-
17
- .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
18
-
19
- help:
20
- @echo "Please use \`make <target>' where <target> is one of"
21
- @echo " html to make standalone HTML files"
22
- @echo " dirhtml to make HTML files named index.html in directories"
23
- @echo " singlehtml to make a single large HTML file"
24
- @echo " pickle to make pickle files"
25
- @echo " json to make JSON files"
26
- @echo " htmlhelp to make HTML files and a HTML help project"
27
- @echo " qthelp to make HTML files and a qthelp project"
28
- @echo " devhelp to make HTML files and a Devhelp project"
29
- @echo " epub to make an epub"
30
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
31
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
32
- @echo " text to make text files"
33
- @echo " man to make manual pages"
34
- @echo " texinfo to make Texinfo files"
35
- @echo " info to make Texinfo files and run them through makeinfo"
36
- @echo " gettext to make PO message catalogs"
37
- @echo " changes to make an overview of all changed/added/deprecated items"
38
- @echo " linkcheck to check all external links for integrity"
39
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
40
-
41
- clean:
42
- -rm -rf $(BUILDDIR)/*
43
-
44
- html:
45
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
46
- @echo
47
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
48
-
49
- dirhtml:
50
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
51
- @echo
52
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
53
-
54
- singlehtml:
55
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
56
- @echo
57
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
58
-
59
- pickle:
60
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
61
- @echo
62
- @echo "Build finished; now you can process the pickle files."
63
-
64
- json:
65
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
66
- @echo
67
- @echo "Build finished; now you can process the JSON files."
68
-
69
- htmlhelp:
70
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
71
- @echo
72
- @echo "Build finished; now you can run HTML Help Workshop with the" \
73
- ".hhp project file in $(BUILDDIR)/htmlhelp."
74
-
75
- qthelp:
76
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
77
- @echo
78
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
79
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
80
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Guzzle.qhcp"
81
- @echo "To view the help file:"
82
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Guzzle.qhc"
83
-
84
- devhelp:
85
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
86
- @echo
87
- @echo "Build finished."
88
- @echo "To view the help file:"
89
- @echo "# mkdir -p $$HOME/.local/share/devhelp/Guzzle"
90
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Guzzle"
91
- @echo "# devhelp"
92
-
93
- epub:
94
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
95
- @echo
96
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
97
-
98
- latex:
99
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100
- @echo
101
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
102
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
103
- "(use \`make latexpdf' here to do that automatically)."
104
-
105
- latexpdf:
106
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
107
- @echo "Running LaTeX files through pdflatex..."
108
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
109
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
110
-
111
- text:
112
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
113
- @echo
114
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
115
-
116
- man:
117
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
118
- @echo
119
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
120
-
121
- texinfo:
122
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
123
- @echo
124
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
125
- @echo "Run \`make' in that directory to run these through makeinfo" \
126
- "(use \`make info' here to do that automatically)."
127
-
128
- info:
129
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
130
- @echo "Running Texinfo files through makeinfo..."
131
- make -C $(BUILDDIR)/texinfo info
132
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
133
-
134
- gettext:
135
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
136
- @echo
137
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
138
-
139
- changes:
140
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
141
- @echo
142
- @echo "The overview file is in $(BUILDDIR)/changes."
143
-
144
- linkcheck:
145
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
146
- @echo
147
- @echo "Link check complete; look for any errors in the above output " \
148
- "or in $(BUILDDIR)/linkcheck/output.txt."
149
-
150
- doctest:
151
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152
- @echo "Testing of doctests in the sources finished, look at the " \
153
- "results in $(BUILDDIR)/doctest/output.txt."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_downloads/guzzle-schema-1.0.json DELETED
@@ -1,176 +0,0 @@
1
- {
2
- "additionalProperties": true,
3
- "name": {
4
- "type": "string",
5
- "description": "Name of the web service"
6
- },
7
- "apiVersion": {
8
- "type": ["string", "number"],
9
- "description": "Version identifier that the service description is compatible with"
10
- },
11
- "baseUrl": {
12
- "type": "string",
13
- "description": "Base URL of the web service. Any relative URI specified in an operation will be merged with the baseUrl using the process defined in RFC 2396"
14
- },
15
- "basePath": {
16
- "type": "string",
17
- "description": "Alias of baseUrl"
18
- },
19
- "_description": {
20
- "type": "string",
21
- "description": "Short summary of the web service. This is actually called 'description' but this JSON schema wont validate using just description."
22
- },
23
- "operations": {
24
- "description": "Operations of the web service",
25
- "type": "object",
26
- "properties": {
27
- "extends": {
28
- "type": "string",
29
- "description": "Extend from another operation by name. The parent operation must be defined before the child."
30
- },
31
- "httpMethod": {
32
- "type": "string",
33
- "description": "HTTP method used with the operation (e.g. GET, POST, PUT, DELETE, PATCH, etc)"
34
- },
35
- "uri": {
36
- "type": "string",
37
- "description": "URI of the operation. The uri attribute can contain URI templates. The variables of the URI template are parameters of the operation with a location value of uri"
38
- },
39
- "summary": {
40
- "type": "string",
41
- "description": "Short summary of what the operation does"
42
- },
43
- "class": {
44
- "type": "string",
45
- "description": "Custom class to instantiate instead of the default Guzzle\\Service\\Command\\OperationCommand"
46
- },
47
- "responseClass": {
48
- "type": "string",
49
- "description": "This is what is returned from the method. Can be a primitive, class name, or model name."
50
- },
51
- "responseNotes": {
52
- "type": "string",
53
- "description": "A description of the response returned by the operation"
54
- },
55
- "responseType": {
56
- "type": "string",
57
- "description": "The type of response that the operation creates. If not specified, this value will be automatically inferred based on whether or not there is a model matching the name, if a matching class name is found, or set to 'primitive' by default.",
58
- "enum": [ "primitive", "class", "model", "documentation" ]
59
- },
60
- "deprecated": {
61
- "type": "boolean",
62
- "description": "Whether or not the operation is deprecated"
63
- },
64
- "errorResponses": {
65
- "description": "Errors that could occur while executing the operation",
66
- "type": "array",
67
- "items": {
68
- "type": "object",
69
- "properties": {
70
- "code": {
71
- "type": "number",
72
- "description": "HTTP response status code of the error"
73
- },
74
- "phrase": {
75
- "type": "string",
76
- "description": "Response reason phrase or description of the error"
77
- },
78
- "class": {
79
- "type": "string",
80
- "description": "A custom exception class that would be thrown if the error is encountered"
81
- }
82
- }
83
- }
84
- },
85
- "data": {
86
- "type": "object",
87
- "additionalProperties": "true"
88
- },
89
- "parameters": {
90
- "$ref": "parameters",
91
- "description": "Parameters of the operation. Parameters are used to define how input data is serialized into a HTTP request."
92
- },
93
- "additionalParameters": {
94
- "$ref": "parameters",
95
- "description": "Validation and serialization rules for any parameter supplied to the operation that was not explicitly defined."
96
- }
97
- }
98
- },
99
- "models": {
100
- "description": "Schema models that can be referenced throughout the service description. Models can be used to define how an HTTP response is parsed into a Guzzle\\Service\\Resource\\Model object.",
101
- "type": "object",
102
- "properties": {
103
- "$ref": "parameters",
104
- "description": "Parameters of the model. When a model is referenced in a responseClass attribute of an operation, parameters define how a HTTP response message is parsed into a Guzzle\\Service\\Resource\\Model."
105
- }
106
- },
107
- "includes": {
108
- "description": "Service description files to include and extend from (can be a .json, .js, or .php file)",
109
- "type": "array",
110
- "items": {
111
- "type": "string",
112
- "pattern": ".+\\.(js|json|php)$"
113
- }
114
- },
115
- "definitions": {
116
- "parameters": {
117
- "extends": "http://json-schema.org/schema",
118
- "id": "parameters",
119
- "name": {
120
- "type": "string",
121
- "description": "Unique name of the parameter"
122
- },
123
- "type": {
124
- "type": ["string", "array"],
125
- "description": "Type of variable (string, number, integer, boolean, object, array, numeric, null, any). Types are using for validation and determining the structure of a parameter. You can use a union type by providing an array of simple types. If one of the union types matches the provided value, then the value is valid."
126
- },
127
- "instanceOf": {
128
- "type": "string",
129
- "description": "When the type is an object, you can specify the class that the object must implement"
130
- },
131
- "required": {
132
- "type": "boolean",
133
- "description": "Whether or not the parameter is required"
134
- },
135
- "default": {
136
- "description": "Default value to use if no value is supplied"
137
- },
138
- "static": {
139
- "type": "bool",
140
- "description": "Set to true to specify that the parameter value cannot be changed from the default setting"
141
- },
142
- "description": {
143
- "type": "string",
144
- "description": "Documentation of the parameter"
145
- },
146
- "location": {
147
- "type": "string",
148
- "description": "The location of a request used to apply a parameter. Custom locations can be registered with a command, but the defaults are uri, query, statusCode, reasonPhrase, header, body, json, xml, postField, postFile, responseBody"
149
- },
150
- "sentAs": {
151
- "type": "string",
152
- "description": "Specifies how the data being modeled is sent over the wire. For example, you may wish to include certain headers in a response model that have a normalized casing of FooBar, but the actual header is x-foo-bar. In this case, sentAs would be set to x-foo-bar."
153
- },
154
- "filters": {
155
- "type": "array",
156
- "description": "Array of static method names to to run a parameter value through. Each value in the array must be a string containing the full class path to a static method or an array of complex filter information. You can specify static methods of classes using the full namespace class name followed by ‘::’ (e.g. FooBar::baz()). Some filters require arguments in order to properly filter a value. For complex filters, use a hash containing a ‘method’ key pointing to a static method, and an ‘args’ key containing an array of positional arguments to pass to the method. Arguments can contain keywords that are replaced when filtering a value: '@value‘ is replaced with the value being validated, '@api‘ is replaced with the Parameter object.",
157
- "items": {
158
- "type": ["string", {
159
- "object": {
160
- "properties": {
161
- "method": {
162
- "type": "string",
163
- "description": "PHP function to call",
164
- "required": true
165
- },
166
- "args": {
167
- "type": "array"
168
- }
169
- }
170
- }
171
- }]
172
- }
173
- }
174
- }
175
- }
176
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png DELETED
Binary file
trunk/vendor/guzzle/guzzle/docs/_static/homepage.css DELETED
@@ -1,122 +0,0 @@
1
- /* Hero unit on homepage */
2
-
3
- .hero-unit h1 {
4
- font-size: 49px;
5
- margin-bottom: 12px;
6
- }
7
-
8
- .hero-unit {
9
- padding: 40px;
10
- }
11
-
12
- .hero-unit p {
13
- font-size: 17px;
14
- }
15
-
16
- .masthead img {
17
- float: left;
18
- margin-right: 17px;
19
- }
20
-
21
- .hero-unit ul li {
22
- margin-left: 220px;
23
- }
24
-
25
- .hero-unit .buttons {
26
- text-align: center;
27
- }
28
-
29
- .jumbotron {
30
- position: relative;
31
- padding: 40px 0;
32
- color: #fff;
33
- text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);
34
- background: #00312F;
35
- background: -moz-linear-gradient(45deg, #002F31 0%, #335A6D 100%);
36
- background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#00312D), color-stop(100%,#33566D));
37
- background: -webkit-linear-gradient(45deg, #020031 0%,#334F6D 100%);
38
- background: -o-linear-gradient(45deg, #002D31 0%,#334D6D 100%);
39
- background: -ms-linear-gradient(45deg, #002F31 0%,#33516D 100%);
40
- background: linear-gradient(45deg, #020031 0%,#33516D 100%);
41
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 );
42
- -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2);
43
- -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
44
- box-shadow: inset 0 3px 7px rgba(0, 0, 0, .2), inset 0 -3px 7px rgba(0, 0, 0, .2);
45
- }
46
-
47
- .jumbotron h1 {
48
- font-size: 80px;
49
- font-weight: bold;
50
- letter-spacing: -1px;
51
- line-height: 1;
52
- }
53
-
54
- .jumbotron p {
55
- font-size: 24px;
56
- font-weight: 300;
57
- line-height: 1.25;
58
- margin-bottom: 30px;
59
- }
60
-
61
- .masthead {
62
- padding: 40px 0 30px;
63
- margin-bottom: 0;
64
- color: #fff;
65
- margin-top: -19px;
66
- }
67
-
68
- .masthead h1 {
69
- display: none;
70
- }
71
-
72
- .masthead p {
73
- font-size: 40px;
74
- font-weight: 200;
75
- line-height: 1.25;
76
- margin: 12px 0 0 0;
77
- }
78
-
79
- .masthead .btn {
80
- padding: 19px 24px;
81
- font-size: 24px;
82
- font-weight: 200;
83
- border: 0;
84
- }
85
-
86
- /* Social bar on homepage */
87
-
88
- .social {
89
- padding: 2px 0;
90
- text-align: center;
91
- background-color: #f5f5f5;
92
- border-top: 1px solid #fff;
93
- border-bottom: 1px solid #ddd;
94
- margin: 0 0 20px 0;
95
- }
96
-
97
- .social ul {
98
- margin-top: 0;
99
- }
100
-
101
- .social-buttons {
102
- margin-left: 0;
103
- margin-bottom: 0;
104
- padding-left: 0;
105
- list-style: none;
106
- }
107
-
108
- .social-buttons li {
109
- display: inline-block;
110
- padding: 5px 8px;
111
- line-height: 1;
112
- *display: inline;
113
- *zoom: 1;
114
- }
115
-
116
- .center-announcement {
117
- padding: 10px;
118
- background-color: rgb(238, 243, 255);
119
- border-radius: 8px;
120
- text-align: center;
121
- margin: 24px 0;
122
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_static/logo.png DELETED
Binary file
trunk/vendor/guzzle/guzzle/docs/_static/prettify.css DELETED
@@ -1,41 +0,0 @@
1
- .com {
2
- color: #93A1A1;
3
- }
4
- .lit {
5
- color: #195F91;
6
- }
7
- .pun, .opn, .clo {
8
- color: #93A1A1;
9
- }
10
- .fun {
11
- color: #DC322F;
12
- }
13
- .str, .atv {
14
- color: #DD1144;
15
- }
16
- .kwd, .linenums .tag {
17
- color: #1E347B;
18
- }
19
- .typ, .atn, .dec, .var {
20
- color: teal;
21
- }
22
- .pln {
23
- color: #48484C;
24
- }
25
- .prettyprint {
26
- background-color: #F7F7F9;
27
- border: 1px solid #E1E1E8;
28
- padding: 8px;
29
- }
30
- .prettyprint.linenums {
31
- box-shadow: 40px 0 0 #FBFBFC inset, 41px 0 0 #ECECF0 inset;
32
- }
33
- ol.linenums {
34
- margin: 0 0 0 33px;
35
- }
36
- ol.linenums li {
37
- color: #BEBEC5;
38
- line-height: 18px;
39
- padding-left: 12px;
40
- text-shadow: 0 1px 0 #FFFFFF;
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_static/prettify.js DELETED
@@ -1,28 +0,0 @@
1
- var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2
- (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
3
- [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
4
- f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
5
- (j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
6
- {b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
7
- t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
8
- "string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
9
- l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10
- q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
11
- q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
12
- "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
13
- a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
14
- for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
15
- m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
16
- a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
17
- j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18
- "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
19
- H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20
- J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
21
- I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
22
- ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
23
- /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
24
- ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
25
- hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
26
- !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
27
- 250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
28
- PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_templates/index.html DELETED
@@ -1,103 +0,0 @@
1
- <script type="text/javascript" src="{{ pathto('_static/prettify.js', 1) }}"></script>
2
- <link rel="stylesheet" type="text/css" href="{{ pathto('_static/prettify.css', 1) }}" />
3
- <link rel="stylesheet" type="text/css" href="{{ pathto('_static/homepage.css', 1) }}" />
4
-
5
- <div class="jumbotron masthead">
6
- <div class="container">
7
- <img src="{{ pathto('_static/logo.png', 1) }}" alt="guzzle" width="199" height="260" />
8
- <h1>Guzzle</h1>
9
- <p>Guzzle is a PHP HTTP client<br />&amp; framework for building RESTful web service clients.</p>
10
- <p>
11
- <a class="btn btn-primary btn-lg" href="https://github.com/guzzle/guzzle">View Guzzle on GitHub</a>
12
- <a class="btn btn-default btn-lg" href="{{ pathto('docs') }}">Read the docs</a>
13
- </p>
14
- </div>
15
- </div>
16
-
17
- <div class="social">
18
- <ul class="social-buttons">
19
- <li>
20
- <iframe src="http://ghbtns.com/github-btn.html?user=guzzle&repo=guzzle&type=watch&count=true"
21
- allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
22
- </li>
23
- <li>
24
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://guzzlephp.org" data-text="Guzzle, PHP HTTP client &amp; framework for building RESTful web service clients" data-via="mtdowling">Tweet</a>
25
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
26
- </li>
27
- <li>
28
- <a href="https://twitter.com/mtdowling" class="twitter-follow-button" data-show-count="false">Follow @mtdowling</a>
29
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
30
- </li>
31
- </ul>
32
- </div>
33
-
34
- <div class="container">
35
-
36
- <h1>Introducing Guzzle</h1>
37
-
38
- <p>Guzzle takes the pain out of sending HTTP requests and the redundancy out of creating web service clients. It's
39
- a framework that includes the tools needed to create a robust web service client, including:
40
- Service descriptions for defining the inputs and outputs of an API, resource iterators for traversing
41
- paginated resources, batching for sending a large number of requests as efficiently as possible.</p>
42
-
43
- <ul>
44
- <li>All the power of cURL with a simple interface.</li>
45
- <li>Persistent connections and parallel requests.</li>
46
- <li>Streams request and response bodies</li>
47
- <li><a href="{{ pathto('webservice-client/guzzle-service-descriptions') }}">Service descriptions</a> for quickly building clients.</li>
48
- <li>Powered by the Symfony2 EventDispatcher.</li>
49
- <li>Use all of the code or only <a href="https://packagist.org/packages/guzzle/">specific components</a>.</li>
50
- <li><a href="{{ pathto('plugins/plugins-overview') }}">Plugins</a> for caching, logging, OAuth, mocks, and more</a>
51
- <li>Includes a custom node.js webserver to <a href="{{ pathto('testing/unit-testing') }}">test your clients</a>.</li>
52
- </ul>
53
-
54
- <div class="center-announcement">
55
- Guzzle is now part of Drupal 8 core and powers the official <a href="https://github.com/aws/aws-sdk-php">AWS SDK for PHP</a>
56
- </div>
57
-
58
- <h2>Quick Twitter example</h2>
59
-
60
- <pre class="prettyprint">&lt;?php
61
- require_once 'vendor/autoload.php';
62
- use Guzzle\Http\Client;
63
-
64
- // Create a client and provide a base URL
65
- $client = new Client('https://api.github.com');
66
- // Create a request with basic Auth
67
- $request = $client->get('/user')->setAuth('user', 'pass');
68
- // Send the request and get the response
69
- $response = $request->send();
70
- echo $response->getBody();
71
- // >>> {"type":"User", ...
72
- echo $response->getHeader('Content-Length');
73
- // >>> 792
74
-
75
- // Create a client to work with the Twitter API
76
- $client = new Client('https://api.twitter.com/{version}', array(
77
- 'version' => '1.1'
78
- ));
79
-
80
- // Sign all requests with the OauthPlugin
81
- $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(array(
82
- 'consumer_key' => '***',
83
- 'consumer_secret' => '***',
84
- 'token' => '***',
85
- 'token_secret' => '***'
86
- )));
87
-
88
- echo $client->get('statuses/user_timeline.json')->send()->getBody();
89
- // >>> {"public_gists":6,"type":"User" ...
90
-
91
- // Create a tweet using POST
92
- $request = $client->post('statuses/update.json', null, array(
93
- 'status' => 'Tweeted with Guzzle, http://guzzlephp.org'
94
- ));
95
-
96
- // Send the request and parse the JSON response into an array
97
- $data = $request->send()->json();
98
- echo $data['text'];
99
- // >>> Tweeted with Guzzle, http://t.co/kngJMfRk
100
- </pre>
101
- </div>
102
-
103
- <script type="text/javascript">prettyPrint();</script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/_templates/leftbar.html DELETED
File without changes
trunk/vendor/guzzle/guzzle/docs/_templates/nav_links.html DELETED
@@ -1,5 +0,0 @@
1
- <li><a href="{{ pathto('docs') }}">Docs</a></li>
2
- <li><a href="http://guzzlephp.org/api/index.html">API</a></li>
3
- <li><a href="https://github.com/guzzle/guzzle">GitHub</a></li>
4
- <li><a href="https://groups.google.com/forum/?hl=en#!forum/guzzle">Forum</a></li>
5
- <li><a href="irc:irc.freenode.com/#guzzlephp">IRC</a></li>
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/batching/batching.rst DELETED
@@ -1,183 +0,0 @@
1
- ========
2
- Batching
3
- ========
4
-
5
- Guzzle provides a fairly generic and very customizable batching framework that allows developers to efficiently
6
- transfer requests in parallel.
7
-
8
- Sending requests and commands in parallel
9
- -----------------------------------------
10
-
11
- You can send HTTP requests in parallel by passing an array of ``Guzzle\Http\Message\RequestInterface`` objects to
12
- ``Guzzle\Http\Client::send()``:
13
-
14
- .. code-block:: php
15
-
16
- $responses = $client->send(array(
17
- $client->get('http://www.example.com/foo'),
18
- $client->get('http://www.example.com/baz')
19
- $client->get('http://www.example.com/bar')
20
- ));
21
-
22
- You can send commands in parallel by passing an array of ``Guzzle\Service\Command\CommandInterface`` objects
23
- ``Guzzle\Service\Client::execute()``:
24
-
25
- .. code-block:: php
26
-
27
- $commands = $client->execute(array(
28
- $client->getCommand('foo'),
29
- $client->getCommand('baz'),
30
- $client->getCommand('bar')
31
- ));
32
-
33
- These approaches work well for most use-cases. When you need more control over the requests that are sent in
34
- parallel or you need to send a large number of requests, you need to use the functionality provided in the
35
- ``Guzzle\Batch`` namespace.
36
-
37
- Batching overview
38
- -----------------
39
-
40
- The batch object, ``Guzzle\Batch\Batch``, is a queue. You add requests to the queue until you are ready to transfer
41
- all of the requests. In order to efficiently transfer the items in the queue, the batch object delegates the
42
- responsibility of dividing the queue into manageable parts to a divisor (``Guzzle\Batch\BatchDivisorInterface``).
43
- The batch object then iterates over each array of items created by the divisor and sends them to the batch object's
44
- ``Guzzle\Batch\BatchTransferInterface``.
45
-
46
- .. code-block:: php
47
-
48
- use Guzzle\Batch\Batch;
49
- use Guzzle\Http\BatchRequestTransfer;
50
-
51
- // BatchRequestTransfer acts as both the divisor and transfer strategy
52
- $transferStrategy = new BatchRequestTransfer(10);
53
- $divisorStrategy = $transferStrategy;
54
-
55
- $batch = new Batch($transferStrategy, $divisorStrategy);
56
-
57
- // Add some requests to the batch queue
58
- $batch->add($request1)
59
- ->add($request2)
60
- ->add($request3);
61
-
62
- // Flush the queue and retrieve the flushed items
63
- $arrayOfTransferredRequests = $batch->flush();
64
-
65
- .. note::
66
-
67
- You might find that your transfer strategy will need to act as both the divisor and transfer strategy.
68
-
69
- Using the BatchBuilder
70
- ----------------------
71
-
72
- The ``Guzzle\Batch\BatchBuilder`` makes it easier to create batch objects. The batch builder also provides an easier
73
- way to add additional behaviors to your batch object.
74
-
75
- Transferring requests
76
- ~~~~~~~~~~~~~~~~~~~~~
77
-
78
- The ``Guzzle\Http\BatchRequestTransfer`` class efficiently transfers HTTP requests in parallel by grouping batches of
79
- requests by the curl_multi handle that is used to transfer the requests.
80
-
81
- .. code-block:: php
82
-
83
- use Guzzle\Batch\BatchBuilder;
84
-
85
- $batch = BatchBuilder::factory()
86
- ->transferRequests(10)
87
- ->build();
88
-
89
- Transferring commands
90
- ~~~~~~~~~~~~~~~~~~~~~
91
-
92
- The ``Guzzle\Service\Command\BatchCommandTransfer`` class efficiently transfers service commands by grouping commands
93
- by the client that is used to transfer them. You can add commands to a batch object that are transferred by different
94
- clients, and the batch will handle the rest.
95
-
96
- .. code-block:: php
97
-
98
- use Guzzle\Batch\BatchBuilder;
99
-
100
- $batch = BatchBuilder::factory()
101
- ->transferCommands(10)
102
- ->build();
103
-
104
- $batch->add($client->getCommand('foo'))
105
- ->add($client->getCommand('baz'))
106
- ->add($client->getCommand('bar'));
107
-
108
- $commands = $batch->flush();
109
-
110
- Batch behaviors
111
- ---------------
112
-
113
- You can add various behaviors to your batch that allow for more customizable transfers.
114
-
115
- Automatically flushing a queue
116
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117
-
118
- Use the ``Guzzle\Batch\FlushingBatch`` decorator when you want to pump a large number of items into a batch queue and
119
- have the queue automatically flush when the size of the queue reaches a certain threshold.
120
-
121
- .. code-block:: php
122
-
123
- use Guzzle\Batch\BatchBuilder;
124
-
125
- $batch = BatchBuilder::factory()
126
- ->transferRequests(10)
127
- ->autoFlushAt(10)
128
- ->build();
129
-
130
- Batch builder method: ``autoFlushAt($threshold)``
131
-
132
- Notifying on flush
133
- ~~~~~~~~~~~~~~~~~~
134
-
135
- Use the ``Guzzle\Batch\NotifyingBatch`` decorator if you want a function to be notified each time the batch queue is
136
- flushed. This is useful when paired with the flushing batch decorator. Pass a callable to the ``notify()`` method of
137
- a batch builder to use this decorator with the builder.
138
-
139
- .. code-block:: php
140
-
141
- use Guzzle\Batch\BatchBuilder;
142
-
143
- $batch = BatchBuilder::factory()
144
- ->transferRequests(10)
145
- ->autoFlushAt(10)
146
- ->notify(function (array $transferredItems) {
147
- echo 'Transferred ' . count($transferredItems) . "items\n";
148
- })
149
- ->build();
150
-
151
- Batch builder method:: ``notify(callable $callback)``
152
-
153
- Keeping a history
154
- ~~~~~~~~~~~~~~~~~
155
-
156
- Use the ``Guzzle\Batch\HistoryBatch`` decorator if you want to maintain a history of all the items transferred with
157
- the batch queue.
158
-
159
- .. code-block:: php
160
-
161
- use Guzzle\Batch\BatchBuilder;
162
-
163
- $batch = BatchBuilder::factory()
164
- ->transferRequests(10)
165
- ->keepHistory()
166
- ->build();
167
-
168
- After transferring items, you can use the ``getHistory()`` of a batch to retrieve an array of transferred items. Be
169
- sure to periodically clear the history using ``clearHistory()``.
170
-
171
- Batch builder method: ``keepHistory()``
172
-
173
- Exception buffering
174
- ~~~~~~~~~~~~~~~~~~~
175
-
176
- Use the ``Guzzle\Batch\ExceptionBufferingBatch`` decorator to buffer exceptions during a transfer so that you can
177
- transfer as many items as possible then deal with the errored batches after the transfer completes. After transfer,
178
- use the ``getExceptions()`` method of a batch to retrieve an array of
179
- ``Guzzle\Batch\Exception\BatchTransferException`` objects. You can use these exceptions to attempt to retry the
180
- failed batches. Be sure to clear the buffered exceptions when you are done with them by using the
181
- ``clearExceptions()`` method.
182
-
183
- Batch builder method: ``bufferExceptions()``
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/conf.py DELETED
@@ -1,95 +0,0 @@
1
- import sys, os
2
- from sphinx.highlighting import lexers
3
- from pygments.lexers.web import PhpLexer
4
-
5
- lexers['php'] = PhpLexer(startinline=True, linenos=1)
6
- lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
7
- primary_domain = 'php'
8
-
9
- # -- General configuration -----------------------------------------------------
10
-
11
- extensions = []
12
- templates_path = ['_templates']
13
- source_suffix = '.rst'
14
- master_doc = 'index'
15
-
16
- project = u'Guzzle'
17
- copyright = u'2012, Michael Dowling'
18
- version = '3.0.0'
19
- release = '3.0.0'
20
-
21
- exclude_patterns = ['_build']
22
-
23
- # -- Options for HTML output ---------------------------------------------------
24
-
25
- # The name for this set of Sphinx documents. If None, it defaults to
26
- # "<project> v<release> documentation".
27
- html_title = "Guzzle documentation"
28
- html_short_title = "Guzzle"
29
-
30
- # Add any paths that contain custom static files (such as style sheets) here,
31
- # relative to this directory. They are copied after the builtin static files,
32
- # so a file named "default.css" will overwrite the builtin "default.css".
33
- html_static_path = ['_static']
34
-
35
- # Custom sidebar templates, maps document names to template names.
36
- html_sidebars = {
37
- '**': ['localtoc.html', 'leftbar.html', 'searchbox.html']
38
- }
39
-
40
- # Output file base name for HTML help builder.
41
- htmlhelp_basename = 'Guzzledoc'
42
-
43
- # -- Guzzle Sphinx theme setup ------------------------------------------------
44
-
45
- sys.path.insert(0, '/Users/dowling/projects/guzzle_sphinx_theme')
46
-
47
- import guzzle_sphinx_theme
48
- pygments_style = 'guzzle_sphinx_theme.GuzzleStyle'
49
- html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator'
50
- html_theme_path = guzzle_sphinx_theme.html_theme_path()
51
- html_theme = 'guzzle_sphinx_theme'
52
-
53
- # Guzzle theme options (see theme.conf for more information)
54
- html_theme_options = {
55
- "index_template": "index.html",
56
- "project_nav_name": "Guzzle",
57
- "github_user": "guzzle",
58
- "github_repo": "guzzle",
59
- "disqus_comments_shortname": "guzzle",
60
- "google_analytics_account": "UA-22752917-1"
61
- }
62
-
63
- # -- Options for LaTeX output --------------------------------------------------
64
-
65
- latex_elements = {}
66
-
67
- # Grouping the document tree into LaTeX files. List of tuples
68
- # (source start file, target name, title, author, documentclass [howto/manual]).
69
- latex_documents = [
70
- ('index', 'Guzzle.tex', u'Guzzle Documentation',
71
- u'Michael Dowling', 'manual'),
72
- ]
73
-
74
- # -- Options for manual page output --------------------------------------------
75
-
76
- # One entry per manual page. List of tuples
77
- # (source start file, name, description, authors, manual section).
78
- man_pages = [
79
- ('index', 'guzzle', u'Guzzle Documentation',
80
- [u'Michael Dowling'], 1)
81
- ]
82
-
83
- # If true, show URL addresses after external links.
84
- #man_show_urls = False
85
-
86
- # -- Options for Texinfo output ------------------------------------------------
87
-
88
- # Grouping the document tree into Texinfo files. List of tuples
89
- # (source start file, target name, title, author,
90
- # dir menu entry, description, category)
91
- texinfo_documents = [
92
- ('index', 'Guzzle', u'Guzzle Documentation',
93
- u'Michael Dowling', 'Guzzle', 'One line description of project.',
94
- 'Miscellaneous'),
95
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/docs.rst DELETED
@@ -1,73 +0,0 @@
1
- .. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services
2
-
3
- ====================
4
- Guzzle Documentation
5
- ====================
6
-
7
- Getting started
8
- ---------------
9
-
10
- .. toctree::
11
- :maxdepth: 1
12
-
13
- getting-started/overview
14
- getting-started/installation
15
- getting-started/faq
16
-
17
- The HTTP client
18
- ---------------
19
-
20
- .. toctree::
21
- :maxdepth: 2
22
-
23
- http-client/client
24
- http-client/request
25
- http-client/response
26
- http-client/entity-bodies
27
- http-client/http-redirects
28
- http-client/uri-templates
29
-
30
- Plugins
31
- -------
32
-
33
- .. toctree::
34
- :maxdepth: 1
35
-
36
- plugins/plugins-overview
37
- plugins/creating-plugins
38
- plugins/async-plugin
39
- plugins/backoff-plugin
40
- plugins/cache-plugin
41
- plugins/cookie-plugin
42
- plugins/curl-auth-plugin
43
- plugins/history-plugin
44
- plugins/log-plugin
45
- plugins/md5-validator-plugin
46
- plugins/mock-plugin
47
- plugins/oauth-plugin
48
-
49
- The web service client
50
- ----------------------
51
-
52
- .. toctree::
53
- :maxdepth: 1
54
-
55
- webservice-client/webservice-client
56
- webservice-client/using-the-service-builder
57
- webservice-client/guzzle-service-descriptions
58
- batching/batching
59
- iterators/resource-iterators
60
- iterators/guzzle-iterators
61
-
62
- Testing
63
- -------
64
-
65
- .. toctree::
66
- :maxdepth: 2
67
-
68
- testing/unit-testing
69
-
70
- API Docs
71
- --------
72
-
73
- `Read the API docs <http://guzzlephp.org/api/index.html>`_
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/getting-started/faq.rst DELETED
@@ -1,29 +0,0 @@
1
- ===
2
- FAQ
3
- ===
4
-
5
- What should I do if I get this error: Fatal error: Maximum function nesting level of '100' reached, aborting!
6
- -------------------------------------------------------------------------------------------------------------
7
-
8
- You could run into this error if you have the XDebug extension installed and you execute a lot of requests in
9
- callbacks. This error message comes specifically from the XDebug extension. PHP itself does not have a function
10
- nesting limit. Change this setting in your php.ini to increase the limit::
11
-
12
- xdebug.max_nesting_level = 1000
13
-
14
- [`source <http://stackoverflow.com/a/4293870/151504>`_]
15
-
16
- How can I speed up my client?
17
- -----------------------------
18
-
19
- There are several things you can do to speed up your client:
20
-
21
- 1. Utilize a C based HTTP message parser (e.g. ``Guzzle\Parser\Message\PeclHttpMessageParser``)
22
- 2. Disable operation validation by setting the ``command.disable_validation`` option to true on a command
23
-
24
- Why am I getting a 417 error response?
25
- --------------------------------------
26
-
27
- This can occur for a number of reasons, but if you are sending PUT, POST, or PATCH requests with an
28
- ``Expect: 100-Continue`` header, a server that does not support this header will return a 417 response. You can work
29
- around this by calling ``$request->removeHeader('Expect');`` after setting the entity body of a request.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/getting-started/installation.rst DELETED
@@ -1,154 +0,0 @@
1
- ============
2
- Installation
3
- ============
4
-
5
- Requirements
6
- ------------
7
-
8
- #. PHP 5.3.3+ compiled with the cURL extension
9
- #. A recent version of cURL 7.16.2+ compiled with OpenSSL and zlib
10
-
11
- Installing Guzzle
12
- -----------------
13
-
14
- Composer
15
- ~~~~~~~~
16
-
17
- The recommended way to install Guzzle is with `Composer <http://getcomposer.org>`_. Composer is a dependency
18
- management tool for PHP that allows you to declare the dependencies your project needs and installs them into your
19
- project.
20
-
21
- .. code-block:: bash
22
-
23
- # Install Composer
24
- curl -sS https://getcomposer.org/installer | php
25
-
26
- # Add Guzzle as a dependency
27
- php composer.phar require guzzle/guzzle:~3.7
28
-
29
- After installing, you need to require Composer's autoloader:
30
-
31
- .. code-block:: php
32
-
33
- require 'vendor/autoload.php';
34
-
35
- You can find out more on how to install Composer, configure autoloading, and other best-practices for defining
36
- dependencies at `getcomposer.org <http://getcomposer.org>`_.
37
-
38
- Using only specific parts of Guzzle
39
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
-
41
- While you can always just rely on ``guzzle/guzzle``, Guzzle provides several smaller parts of Guzzle as individual
42
- packages available through Composer.
43
-
44
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
45
- | Package name | Description |
46
- +===============================================================================================+==========================================+
47
- | `guzzle/common <https://packagist.org/packages/guzzle/common>`_ | Provides ``Guzzle\Common`` |
48
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
49
- | `guzzle/http <https://packagist.org/packages/guzzle/http>`_ | Provides ``Guzzle\Http`` |
50
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
51
- | `guzzle/parser <https://packagist.org/packages/guzzle/parser>`_ | Provides ``Guzzle\Parser`` |
52
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
53
- | `guzzle/batch <https://packagist.org/packages/guzzle/batch>`_ | Provides ``Guzzle\Batch`` |
54
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
55
- | `guzzle/cache <https://packagist.org/packages/guzzle/cache>`_ | Provides ``Guzzle\Cache`` |
56
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
57
- | `guzzle/inflection <https://packagist.org/packages/guzzle/inflection>`_ | Provides ``Guzzle\Inflection`` |
58
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
59
- | `guzzle/iterator <https://packagist.org/packages/guzzle/iterator>`_ | Provides ``Guzzle\Iterator`` |
60
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
61
- | `guzzle/log <https://packagist.org/packages/guzzle/log>`_ | Provides ``Guzzle\Log`` |
62
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
63
- | `guzzle/plugin <https://packagist.org/packages/guzzle/plugin>`_ | Provides ``Guzzle\Plugin`` (all plugins) |
64
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
65
- | `guzzle/plugin-async <https://packagist.org/packages/guzzle/plugin-async>`_ | Provides ``Guzzle\Plugin\Async`` |
66
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
67
- | `guzzle/plugin-backoff <https://packagist.org/packages/guzzle/plugin-backoff>`_ | Provides ``Guzzle\Plugin\BackoffPlugin`` |
68
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
69
- | `guzzle/plugin-cache <https://packagist.org/packages/guzzle/plugin-cache>`_ | Provides ``Guzzle\Plugin\Cache`` |
70
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
71
- | `guzzle/plugin-cookie <https://packagist.org/packages/guzzle/plugin-cookie>`_ | Provides ``Guzzle\Plugin\Cookie`` |
72
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
73
- | `guzzle/plugin-error-response <https://packagist.org/packages/guzzle/plugin-error-response>`_ | Provides ``Guzzle\Plugin\ErrorResponse`` |
74
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
75
- | `guzzle/plugin-history <https://packagist.org/packages/guzzle/plugin-history>`_ | Provides ``Guzzle\Plugin\History`` |
76
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
77
- | `guzzle/plugin-log <https://packagist.org/packages/guzzle/plugin-log>`_ | Provides ``Guzzle\Plugin\Log`` |
78
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
79
- | `guzzle/plugin-md5 <https://packagist.org/packages/guzzle/plugin-md5>`_ | Provides ``Guzzle\Plugin\Md5`` |
80
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
81
- | `guzzle/plugin-mock <https://packagist.org/packages/guzzle/plugin-mock>`_ | Provides ``Guzzle\Plugin\Mock`` |
82
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
83
- | `guzzle/plugin-oauth <https://packagist.org/packages/guzzle/plugin-oauth>`_ | Provides ``Guzzle\Plugin\Oauth`` |
84
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
85
- | `guzzle/service <https://packagist.org/packages/guzzle/service>`_ | Provides ``Guzzle\Service`` |
86
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
87
- | `guzzle/stream <https://packagist.org/packages/guzzle/stream>`_ | Provides ``Guzzle\Stream`` |
88
- +-----------------------------------------------------------------------------------------------+------------------------------------------+
89
-
90
- Bleeding edge
91
- ^^^^^^^^^^^^^
92
-
93
- During your development, you can keep up with the latest changes on the master branch by setting the version
94
- requirement for Guzzle to ``dev-master``.
95
-
96
- .. code-block:: js
97
-
98
- {
99
- "require": {
100
- "guzzle/guzzle": "dev-master"
101
- }
102
- }
103
-
104
- PEAR
105
- ~~~~
106
-
107
- Guzzle can be installed through PEAR:
108
-
109
- .. code-block:: bash
110
-
111
- pear channel-discover guzzlephp.org/pear
112
- pear install guzzle/guzzle
113
-
114
- You can install a specific version of Guzzle by providing a version number suffix:
115
-
116
- .. code-block:: bash
117
-
118
- pear install guzzle/guzzle-3.7.0
119
-
120
- Contributing to Guzzle
121
- ----------------------
122
-
123
- In order to contribute, you'll need to checkout the source from GitHub and install Guzzle's dependencies using
124
- Composer:
125
-
126
- .. code-block:: bash
127
-
128
- git clone https://github.com/guzzle/guzzle.git
129
- cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev
130
-
131
- Guzzle is unit tested with PHPUnit. You will need to create your own phpunit.xml file in order to run the unit tests
132
- (or just copy phpunit.xml.dist to phpunit.xml). Run the tests using the vendored PHPUnit binary:
133
-
134
- .. code-block:: bash
135
-
136
- vendor/bin/phpunit
137
-
138
- You'll need to install node.js v0.5.0 or newer in order to test the cURL implementation.
139
-
140
- Framework integrations
141
- ----------------------
142
-
143
- Using Guzzle with Symfony
144
- ~~~~~~~~~~~~~~~~~~~~~~~~~
145
-
146
- Bundles are available on GitHub:
147
-
148
- - `DdeboerGuzzleBundle <https://github.com/ddeboer/GuzzleBundle>`_ for Guzzle 2
149
- - `MisdGuzzleBundle <https://github.com/misd-service-development/guzzle-bundle>`_ for Guzzle 3
150
-
151
- Using Guzzle with Silex
152
- ~~~~~~~~~~~~~~~~~~~~~~~
153
-
154
- A `Guzzle Silex service provider <https://github.com/guzzle/guzzle-silex-extension>`_ is available on GitHub.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/getting-started/overview.rst DELETED
@@ -1,85 +0,0 @@
1
- =================
2
- Welcome to Guzzle
3
- =================
4
-
5
- What is Guzzle?
6
- ~~~~~~~~~~~~~~~
7
-
8
- Guzzle is a PHP HTTP client and framework for building web service clients. Guzzle takes the pain out of sending HTTP
9
- requests and the redundancy out of creating web service clients.
10
-
11
- Features at a glance
12
- --------------------
13
-
14
- - All the power of cURL with a simple interface.
15
- - Persistent connections and parallel requests.
16
- - Streams request and response bodies
17
- - Service descriptions for quickly building clients.
18
- - Powered by the Symfony2 EventDispatcher.
19
- - Use all of the code or only specific components.
20
- - Plugins for caching, logging, OAuth, mocks, and more
21
- - Includes a custom node.js webserver to test your clients.
22
- - Service descriptions for defining the inputs and outputs of an API
23
- - Resource iterators for traversing paginated resources
24
- - Batching for sending a large number of requests as efficiently as possible
25
-
26
- .. code-block:: php
27
-
28
- // Really simple using a static facade
29
- Guzzle\Http\StaticClient::mount();
30
- $response = Guzzle::get('http://guzzlephp.org');
31
-
32
- // More control using a client class
33
- $client = new \Guzzle\Http\Client('http://guzzlephp.org');
34
- $request = $client->get('/');
35
- $response = $request->send();
36
-
37
- License
38
- -------
39
-
40
- Licensed using the `MIT license <http://opensource.org/licenses/MIT>`_.
41
-
42
- Copyright (c) 2013 Michael Dowling <https://github.com/mtdowling>
43
-
44
- Permission is hereby granted, free of charge, to any person obtaining a copy
45
- of this software and associated documentation files (the "Software"), to deal
46
- in the Software without restriction, including without limitation the rights
47
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48
- copies of the Software, and to permit persons to whom the Software is
49
- furnished to do so, subject to the following conditions:
50
-
51
- The above copyright notice and this permission notice shall be included in
52
- all copies or substantial portions of the Software.
53
-
54
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60
- THE SOFTWARE.
61
-
62
- Contributing
63
- ------------
64
-
65
- Guidelines
66
- ~~~~~~~~~~
67
-
68
- This is still a work in progress, but there are only a few rules:
69
-
70
- 1. Guzzle follows PSR-0, PSR-1, and PSR-2
71
- 2. All pull requests must include unit tests to ensure the change works as expected and to prevent future regressions
72
-
73
- Reporting a security vulnerability
74
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
-
76
- We want to ensure that Guzzle is a secure HTTP client library for everyone. If you've discovered a security
77
- vulnerability in Guzzle, we appreciate your help in disclosing it to us in a
78
- `responsible manner <http://en.wikipedia.org/wiki/Responsible_disclosure>`_.
79
-
80
- Publicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern,
81
- please email us at security@guzzlephp.org. We'll work with you to make sure that we understand the scope of the issue,
82
- and that we fully address your concern. We consider correspondence sent to security@guzzlephp.org our highest priority,
83
- and work to address any issues that arise as quickly as possible.
84
-
85
- After a security vulnerability has been corrected, a security hotfix release will be deployed as soon as possible.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/http-client/client.rst DELETED
@@ -1,569 +0,0 @@
1
- ======================
2
- The Guzzle HTTP client
3
- ======================
4
-
5
- Guzzle gives PHP developers complete control over HTTP requests while utilizing HTTP/1.1 best practices. Guzzle's HTTP
6
- functionality is a robust framework built on top of the `PHP libcurl bindings <http://www.php.net/curl>`_.
7
-
8
- The three main parts of the Guzzle HTTP client are:
9
-
10
- +--------------+-------------------------------------------------------------------------------------------------------+
11
- | Clients | ``Guzzle\Http\Client`` (creates and sends requests, associates a response with a request) |
12
- +--------------+-------------------------------------------------------------------------------------------------------+
13
- | Requests | ``Guzzle\Http\Message\Request`` (requests with no body), |
14
- | | ``Guzzle\Http\Message\EntityEnclosingRequest`` (requests with a body) |
15
- +--------------+-------------------------------------------------------------------------------------------------------+
16
- | Responses | ``Guzzle\Http\Message\Response`` |
17
- +--------------+-------------------------------------------------------------------------------------------------------+
18
-
19
- Creating a Client
20
- -----------------
21
-
22
- Clients create requests, send requests, and set responses on a request object. When instantiating a client object,
23
- you can pass an optional "base URL" and optional array of configuration options. A base URL is a
24
- :doc:`URI template <uri-templates>` that contains the URL of a remote server. When creating requests with a relative
25
- URL, the base URL of a client will be merged into the request's URL.
26
-
27
- .. code-block:: php
28
-
29
- use Guzzle\Http\Client;
30
-
31
- // Create a client and provide a base URL
32
- $client = new Client('https://api.github.com');
33
-
34
- $request = $client->get('/user');
35
- $request->setAuth('user', 'pass');
36
- echo $request->getUrl();
37
- // >>> https://api.github.com/user
38
-
39
- // You must send a request in order for the transfer to occur
40
- $response = $request->send();
41
-
42
- echo $response->getBody();
43
- // >>> {"type":"User", ...
44
-
45
- echo $response->getHeader('Content-Length');
46
- // >>> 792
47
-
48
- $data = $response->json();
49
- echo $data['type'];
50
- // >>> User
51
-
52
- Base URLs
53
- ~~~~~~~~~
54
-
55
- Notice that the URL provided to the client's ``get()`` method is relative. Relative URLs will always merge into the
56
- base URL of the client. There are a few rules that control how the URLs are merged.
57
-
58
- .. tip::
59
-
60
- Guzzle follows `RFC 3986 <http://tools.ietf.org/html/rfc3986#section-5.2>`_ when merging base URLs and
61
- relative URLs.
62
-
63
- In the above example, we passed ``/user`` to the ``get()`` method of the client. This is a relative URL, so it will
64
- merge into the base URL of the client-- resulting in the derived URL of ``https://api.github.com/users``.
65
-
66
- ``/user`` is a relative URL but uses an absolute path because it contains the leading slash. Absolute paths will
67
- overwrite any existing path of the base URL. If an absolute path is provided (e.g. ``/path/to/something``), then the
68
- path specified in the base URL of the client will be replaced with the absolute path, and the query string provided
69
- by the relative URL will replace the query string of the base URL.
70
-
71
- Omitting the leading slash and using relative paths will add to the path of the base URL of the client. So using a
72
- client base URL of ``https://api.twitter.com/v1.1`` and creating a GET request with ``statuses/user_timeline.json``
73
- will result in a URL of ``https://api.twitter.com/v1.1/statuses/user_timeline.json``. If a relative path and a query
74
- string are provided, then the relative path will be appended to the base URL path, and the query string provided will
75
- be merged into the query string of the base URL.
76
-
77
- If an absolute URL is provided (e.g. ``http://httpbin.org/ip``), then the request will completely use the absolute URL
78
- as-is without merging in any of the URL parts specified in the base URL.
79
-
80
- Configuration options
81
- ~~~~~~~~~~~~~~~~~~~~~
82
-
83
- The second argument of the client's constructor is an array of configuration data. This can include URI template data
84
- or special options that alter the client's behavior:
85
-
86
- +-------------------------------+-------------------------------------------------------------------------------------+
87
- | ``request.options`` | Associative array of :ref:`Request options <request-options>` to apply to every |
88
- | | request created by the client. |
89
- +-------------------------------+-------------------------------------------------------------------------------------+
90
- | ``redirect.disable`` | Disable HTTP redirects for every request created by the client. |
91
- +-------------------------------+-------------------------------------------------------------------------------------+
92
- | ``curl.options`` | Associative array of cURL options to apply to every request created by the client. |
93
- | | if either the key or value of an entry in the array is a string, Guzzle will |
94
- | | attempt to find a matching defined cURL constant automatically (e.g. |
95
- | | "CURLOPT_PROXY" will be converted to the constant ``CURLOPT_PROXY``). |
96
- +-------------------------------+-------------------------------------------------------------------------------------+
97
- | ``ssl.certificate_authority`` | Set to true to use the Guzzle bundled SSL certificate bundle (this is used by |
98
- | | default, 'system' to use the bundle on your system, a string pointing to a file to |
99
- | | use a specific certificate file, a string pointing to a directory to use multiple |
100
- | | certificates, or ``false`` to disable SSL validation (not recommended). |
101
- | | |
102
- | | When using Guzzle inside of a phar file, the bundled SSL certificate will be |
103
- | | extracted to your system's temp folder, and each time a client is created an MD5 |
104
- | | check will be performed to ensure the integrity of the certificate. |
105
- +-------------------------------+-------------------------------------------------------------------------------------+
106
- | ``command.params`` | When using a ``Guzzle\Service\Client`` object, this is an associative array of |
107
- | | default options to set on each command created by the client. |
108
- +-------------------------------+-------------------------------------------------------------------------------------+
109
-
110
- Here's an example showing how to set various configuration options, including default headers to send with each request,
111
- default query string parameters to add to each request, a default auth scheme for each request, and a proxy to use for
112
- each request. Values can be injected into the client's base URL using variables from the configuration array.
113
-
114
- .. code-block:: php
115
-
116
- use Guzzle\Http\Client;
117
-
118
- $client = new Client('https://api.twitter.com/{version}', array(
119
- 'version' => 'v1.1',
120
- 'request.options' => array(
121
- 'headers' => array('Foo' => 'Bar'),
122
- 'query' => array('testing' => '123'),
123
- 'auth' => array('username', 'password', 'Basic|Digest|NTLM|Any'),
124
- 'proxy' => 'tcp://localhost:80'
125
- )
126
- ));
127
-
128
- Setting a custom User-Agent
129
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
-
131
- The default Guzzle User-Agent header is ``Guzzle/<Guzzle_Version> curl/<curl_version> PHP/<PHP_VERSION>``. You can
132
- customize the User-Agent header of a client by calling the ``setUserAgent()`` method of a Client object.
133
-
134
- .. code-block:: php
135
-
136
- // Completely override the default User-Agent
137
- $client->setUserAgent('Test/123');
138
-
139
- // Prepend a string to the default User-Agent
140
- $client->setUserAgent('Test/123', true);
141
-
142
- Creating requests with a client
143
- -------------------------------
144
-
145
- A Client object exposes several methods used to create Request objects:
146
-
147
- * Create a custom HTTP request: ``$client->createRequest($method, $uri, array $headers, $body, $options)``
148
- * Create a GET request: ``$client->get($uri, array $headers, $options)``
149
- * Create a HEAD request: ``$client->head($uri, array $headers, $options)``
150
- * Create a DELETE request: ``$client->delete($uri, array $headers, $body, $options)``
151
- * Create a POST request: ``$client->post($uri, array $headers, $postBody, $options)``
152
- * Create a PUT request: ``$client->put($uri, array $headers, $body, $options)``
153
- * Create a PATCH request: ``$client->patch($uri, array $headers, $body, $options)``
154
-
155
- .. code-block:: php
156
-
157
- use Guzzle\Http\Client;
158
-
159
- $client = new Client('http://baseurl.com/api/v1');
160
-
161
- // Create a GET request using Relative to base URL
162
- // URL of the request: http://baseurl.com/api/v1/path?query=123&value=abc)
163
- $request = $client->get('path?query=123&value=abc');
164
- $response = $request->send();
165
-
166
- // Create HEAD request using a relative URL with an absolute path
167
- // URL of the request: http://baseurl.com/path?query=123&value=abc
168
- $request = $client->head('/path?query=123&value=abc');
169
- $response = $request->send();
170
-
171
- // Create a DELETE request using an absolute URL
172
- $request = $client->delete('http://www.example.com/path?query=123&value=abc');
173
- $response = $request->send();
174
-
175
- // Create a PUT request using the contents of a PHP stream as the body
176
- // Specify custom HTTP headers
177
- $request = $client->put('http://www.example.com/upload', array(
178
- 'X-Header' => 'My Header'
179
- ), fopen('http://www.test.com/', 'r'));
180
- $response = $request->send();
181
-
182
- // Create a POST request and add the POST files manually
183
- $request = $client->post('http://localhost:8983/solr/update')
184
- ->addPostFiles(array('file' => '/path/to/documents.xml'));
185
- $response = $request->send();
186
-
187
- // Check if a resource supports the DELETE method
188
- $supportsDelete = $client->options('/path')->send()->isMethodAllowed('DELETE');
189
- $response = $request->send();
190
-
191
- Client objects create Request objects using a request factory (``Guzzle\Http\Message\RequestFactoryInterface``).
192
- You can inject a custom request factory into the Client using ``$client->setRequestFactory()``, but you can typically
193
- rely on a Client's default request factory.
194
-
195
- Static clients
196
- --------------
197
-
198
- You can use Guzzle's static client facade to more easily send simple HTTP requests.
199
-
200
- .. code-block:: php
201
-
202
- // Mount the client so that you can access it at \Guzzle
203
- Guzzle\Http\StaticClient::mount();
204
- $response = Guzzle::get('http://guzzlephp.org');
205
-
206
- Each request method of the static client (e.g. ``get()``, ``post()`, ``put()``, etc) accepts an associative array of request
207
- options to apply to the request.
208
-
209
- .. code-block:: php
210
-
211
- $response = Guzzle::post('http://test.com', array(
212
- 'headers' => array('X-Foo' => 'Bar'),
213
- 'body' => array('Test' => '123'),
214
- 'timeout' => 10
215
- ));
216
-
217
- .. _request-options:
218
-
219
- Request options
220
- ---------------
221
-
222
- Request options can be specified when creating a request or in the ``request.options`` parameter of a client. These
223
- options can control various aspects of a request including: headers to send, query string data, where the response
224
- should be downloaded, proxies, auth, etc.
225
-
226
- headers
227
- ~~~~~~~
228
-
229
- Associative array of headers to apply to the request. When specified in the ``$options`` argument of a client creational
230
- method (e.g. ``get()``, ``post()``, etc), the headers in the ``$options`` array will overwrite headers specified in the
231
- ``$headers`` array.
232
-
233
- .. code-block:: php
234
-
235
- $request = $client->get($url, array(), array(
236
- 'headers' => array('X-Foo' => 'Bar')
237
- ));
238
-
239
- Headers can be specified on a client to add default headers to every request sent by a client.
240
-
241
- .. code-block:: php
242
-
243
- $client = new Guzzle\Http\Client();
244
-
245
- // Set a single header using path syntax
246
- $client->setDefaultOption('headers/X-Foo', 'Bar');
247
-
248
- // Set all headers
249
- $client->setDefaultOption('headers', array('X-Foo' => 'Bar'));
250
-
251
- .. note::
252
-
253
- In addition to setting request options when creating requests or using the ``setDefaultOption()`` method, any
254
- default client request option can be set using a client's config object:
255
-
256
- .. code-block:: php
257
-
258
- $client->getConfig()->setPath('request.options/headers/X-Foo', 'Bar');
259
-
260
- query
261
- ~~~~~
262
-
263
- Associative array of query string parameters to the request. When specified in the ``$options`` argument of a client
264
- creational method, the query string parameters in the ``$options`` array will overwrite query string parameters
265
- specified in the `$url`.
266
-
267
- .. code-block:: php
268
-
269
- $request = $client->get($url, array(), array(
270
- 'query' => array('abc' => '123')
271
- ));
272
-
273
- Query string parameters can be specified on a client to add default query string parameters to every request sent by a
274
- client.
275
-
276
- .. code-block:: php
277
-
278
- $client = new Guzzle\Http\Client();
279
-
280
- // Set a single query string parameter using path syntax
281
- $client->setDefaultOption('query/abc', '123');
282
-
283
- // Set an array of default query string parameters
284
- $client->setDefaultOption('query', array('abc' => '123'));
285
-
286
- body
287
- ~~~~
288
-
289
- Sets the body of a request. The value supplied to the body option can be a ``Guzzle\Http\EntityBodyInterface``, string,
290
- fopen resource, or array when sending POST requests. When a ``body`` request option is supplied, the option value will
291
- overwrite the ``$body`` argument of a client creational method.
292
-
293
- auth
294
- ~~~~
295
-
296
- Specifies and array of HTTP authorization parameters parameters to use with the request. The array must contain the
297
- username in index [0], the password in index [1], and can optionally contain the authentication type in index [2].
298
- The available authentication types are: "Basic" (default), "Digest", "NTLM", or "Any".
299
-
300
- .. code-block:: php
301
-
302
- $request = $client->get($url, array(), array(
303
- 'auth' => array('username', 'password', 'Digest')
304
- ));
305
-
306
- // You can add auth headers to every request of a client
307
- $client->setDefaultOption('auth', array('username', 'password', 'Digest'));
308
-
309
- cookies
310
- ~~~~~~~
311
-
312
- Specifies an associative array of cookies to add to the request.
313
-
314
- allow_redirects
315
- ~~~~~~~~~~~~~~~
316
-
317
- Specifies whether or not the request should follow redirects. Requests will follow redirects by default. Set
318
- ``allow_redirects`` to ``false`` to disable redirects.
319
-
320
- save_to
321
- ~~~~~~~
322
-
323
- The ``save_to`` option specifies where the body of a response is downloaded. You can pass the path to a file, an fopen
324
- resource, or a ``Guzzle\Http\EntityBodyInterface`` object.
325
-
326
- See :ref:`Changing where a response is downloaded <request-set-response-body>` for more information on setting the
327
- `save_to` option.
328
-
329
- events
330
- ~~~~~~
331
-
332
- The `events` option makes it easy to attach listeners to the various events emitted by a request object. The `events`
333
- options must be an associative array mapping an event name to a Closure or array the contains a Closure and the
334
- priority of the event.
335
-
336
- .. code-block:: php
337
-
338
- $request = $client->get($url, array(), array(
339
- 'events' => array(
340
- 'request.before_send' => function (\Guzzle\Common\Event $e) {
341
- echo 'About to send ' . $e['request'];
342
- }
343
- )
344
- ));
345
-
346
- // Using the static client:
347
- Guzzle::get($url, array(
348
- 'events' => array(
349
- 'request.before_send' => function (\Guzzle\Common\Event $e) {
350
- echo 'About to send ' . $e['request'];
351
- }
352
- )
353
- ));
354
-
355
- plugins
356
- ~~~~~~~
357
-
358
- The `plugins` options makes it easy to attach an array of plugins to a request.
359
-
360
- .. code-block:: php
361
-
362
- // Using the static client:
363
- Guzzle::get($url, array(
364
- 'plugins' => array(
365
- new Guzzle\Plugin\Cache\CachePlugin(),
366
- new Guzzle\Plugin\Cookie\CookiePlugin()
367
- )
368
- ));
369
-
370
- exceptions
371
- ~~~~~~~~~~
372
-
373
- The `exceptions` option can be used to disable throwing exceptions for unsuccessful HTTP response codes
374
- (e.g. 404, 500, etc). Set `exceptions` to false to not throw exceptions.
375
-
376
- params
377
- ~~~~~~
378
-
379
- The `params` options can be used to specify an associative array of data parameters to add to a request. Note that
380
- these are not query string parameters.
381
-
382
- timeout / connect_timeout
383
- ~~~~~~~~~~~~~~~~~~~~~~~~~
384
-
385
- You can specify the maximum number of seconds to allow for an entire transfer to take place before timing out using
386
- the `timeout` request option. You can specify the maximum number of seconds to wait while trying to connect using the
387
- `connect_timeout` request option. Set either of these options to 0 to wait indefinitely.
388
-
389
- .. code-block:: php
390
-
391
- $request = $client->get('http://www.example.com', array(), array(
392
- 'timeout' => 20,
393
- 'connect_timeout' => 1.5
394
- ));
395
-
396
- verify
397
- ~~~~~~
398
-
399
- Set to true to enable SSL certificate validation (the default), false to disable SSL certificate validation, or supply
400
- the path to a CA bundle to enable verification using a custom certificate.
401
-
402
- cert
403
- ~~~~
404
-
405
- The `cert` option lets you specify a PEM formatted SSL client certificate to use with servers that require one. If the
406
- certificate requires a password, provide an array with the password as the second item.
407
-
408
- This would typically be used in conjuction with the `ssl_key` option.
409
-
410
- .. code-block:: php
411
-
412
- $request = $client->get('https://www.example.com', array(), array(
413
- 'cert' => '/etc/pki/client_certificate.pem'
414
- )
415
-
416
- $request = $client->get('https://www.example.com', array(), array(
417
- 'cert' => array('/etc/pki/client_certificate.pem', 's3cr3tp455w0rd')
418
- )
419
-
420
- ssl_key
421
- ~~~~~~~
422
-
423
- The `ssl_key` option lets you specify a file containing your PEM formatted private key, optionally protected by a password.
424
- Note: your password is sensitive, keep the PHP script containing it safe.
425
-
426
- This would typically be used in conjuction with the `cert` option.
427
-
428
- .. code-block:: php
429
-
430
- $request = $client->get('https://www.example.com', array(), array(
431
- 'ssl_key' => '/etc/pki/private_key.pem'
432
- )
433
-
434
- $request = $client->get('https://www.example.com', array(), array(
435
- 'ssl_key' => array('/etc/pki/private_key.pem', 's3cr3tp455w0rd')
436
- )
437
-
438
- proxy
439
- ~~~~~
440
-
441
- The `proxy` option is used to specify an HTTP proxy (e.g. `http://username:password@192.168.16.1:10`).
442
-
443
- debug
444
- ~~~~~
445
-
446
- The `debug` option is used to show verbose cURL output for a transfer.
447
-
448
- stream
449
- ~~~~~~
450
-
451
- When using a static client, you can set the `stream` option to true to return a `Guzzle\Stream\Stream` object that can
452
- be used to pull data from a stream as needed (rather than have cURL download the entire contents of a response to a
453
- stream all at once).
454
-
455
- .. code-block:: php
456
-
457
- $stream = Guzzle::get('http://guzzlephp.org', array('stream' => true));
458
- while (!$stream->feof()) {
459
- echo $stream->readLine();
460
- }
461
-
462
- Sending requests
463
- ----------------
464
-
465
- Requests can be sent by calling the ``send()`` method of a Request object, but you can also send requests using the
466
- ``send()`` method of a Client.
467
-
468
- .. code-block:: php
469
-
470
- $request = $client->get('http://www.amazon.com');
471
- $response = $client->send($request);
472
-
473
- Sending requests in parallel
474
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
475
-
476
- The Client's ``send()`` method accept a single ``Guzzle\Http\Message\RequestInterface`` object or an array of
477
- RequestInterface objects. When an array is specified, the requests will be sent in parallel.
478
-
479
- Sending many HTTP requests serially (one at a time) can cause an unnecessary delay in a script's execution. Each
480
- request must complete before a subsequent request can be sent. By sending requests in parallel, a pool of HTTP
481
- requests can complete at the speed of the slowest request in the pool, significantly reducing the amount of time
482
- needed to execute multiple HTTP requests. Guzzle provides a wrapper for the curl_multi functions in PHP.
483
-
484
- Here's an example of sending three requests in parallel using a client object:
485
-
486
- .. code-block:: php
487
-
488
- use Guzzle\Common\Exception\MultiTransferException;
489
-
490
- try {
491
- $responses = $client->send(array(
492
- $client->get('http://www.google.com/'),
493
- $client->head('http://www.google.com/'),
494
- $client->get('https://www.github.com/')
495
- ));
496
- } catch (MultiTransferException $e) {
497
-
498
- echo "The following exceptions were encountered:\n";
499
- foreach ($e as $exception) {
500
- echo $exception->getMessage() . "\n";
501
- }
502
-
503
- echo "The following requests failed:\n";
504
- foreach ($e->getFailedRequests() as $request) {
505
- echo $request . "\n\n";
506
- }
507
-
508
- echo "The following requests succeeded:\n";
509
- foreach ($e->getSuccessfulRequests() as $request) {
510
- echo $request . "\n\n";
511
- }
512
- }
513
-
514
- If the requests succeed, an array of ``Guzzle\Http\Message\Response`` objects are returned. A single request failure
515
- will not cause the entire pool of requests to fail. Any exceptions thrown while transferring a pool of requests will
516
- be aggregated into a ``Guzzle\Common\Exception\MultiTransferException`` exception.
517
-
518
- Plugins and events
519
- ------------------
520
-
521
- Guzzle provides easy to use request plugins that add behavior to requests based on signal slot event notifications
522
- powered by the
523
- `Symfony2 Event Dispatcher component <http://symfony.com/doc/2.0/components/event_dispatcher/introduction.html>`_. Any
524
- event listener or subscriber attached to a Client object will automatically be attached to each request created by the
525
- client.
526
-
527
- Using the same cookie session for each request
528
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
529
-
530
- Attach a ``Guzzle\Plugin\Cookie\CookiePlugin`` to a client which will in turn add support for cookies to every request
531
- created by a client, and each request will use the same cookie session:
532
-
533
- .. code-block:: php
534
-
535
- use Guzzle\Plugin\Cookie\CookiePlugin;
536
- use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar;
537
-
538
- // Create a new cookie plugin
539
- $cookiePlugin = new CookiePlugin(new ArrayCookieJar());
540
-
541
- // Add the cookie plugin to the client
542
- $client->addSubscriber($cookiePlugin);
543
-
544
- .. _client-events:
545
-
546
- Events emitted from a client
547
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
548
-
549
- A ``Guzzle\Http\Client`` object emits the following events:
550
-
551
- +------------------------------+--------------------------------------------+------------------------------------------+
552
- | Event name | Description | Event data |
553
- +==============================+============================================+==========================================+
554
- | client.create_request | Called when a client creates a request | * client: The client |
555
- | | | * request: The created request |
556
- +------------------------------+--------------------------------------------+------------------------------------------+
557
-
558
- .. code-block:: php
559
-
560
- use Guzzle\Common\Event;
561
- use Guzzle\Http\Client;
562
-
563
- $client = new Client();
564
-
565
- // Add a listener that will echo out requests as they are created
566
- $client->getEventDispatcher()->addListener('client.create_request', function (Event $e) {
567
- echo 'Client object: ' . spl_object_hash($e['client']) . "\n";
568
- echo "Request object: {$e['request']}\n";
569
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/http-client/entity-bodies.rst DELETED
@@ -1,151 +0,0 @@
1
- ===========================
2
- Request and response bodies
3
- ===========================
4
-
5
- `Entity body <http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html>`_ is the term used for the body of an HTTP
6
- message. The entity body of requests and responses is inherently a
7
- `PHP stream <http://php.net/manual/en/book.stream.php>`_ in Guzzle. The body of the request can be either a string or
8
- a PHP stream which are converted into a ``Guzzle\Http\EntityBody`` object using its factory method. When using a
9
- string, the entity body is stored in a `temp PHP stream <http://www.php.net/manual/en/wrappers.php.php>`_. The use of
10
- temp PHP streams helps to protect your application from running out of memory when sending or receiving large entity
11
- bodies in your messages. When more than 2MB of data is stored in a temp stream, it automatically stores the data on
12
- disk rather than in memory.
13
-
14
- EntityBody objects provide a great deal of functionality: compression, decompression, calculate the Content-MD5,
15
- calculate the Content-Length (when the resource is repeatable), guessing the Content-Type, and more. Guzzle doesn't
16
- need to load an entire entity body into a string when sending or retrieving data; entity bodies are streamed when
17
- being uploaded and downloaded.
18
-
19
- Here's an example of gzip compressing a text file then sending the file to a URL:
20
-
21
- .. code-block:: php
22
-
23
- use Guzzle\Http\EntityBody;
24
-
25
- $body = EntityBody::factory(fopen('/path/to/file.txt', 'r+'));
26
- echo $body->read(1024);
27
- $body->seek(0, SEEK_END);
28
- $body->write('foo');
29
- echo $body->ftell();
30
- $body->rewind();
31
-
32
- // Send a request using the body
33
- $response = $client->put('http://localhost:8080/uploads', null, $body)->send();
34
-
35
- The body of the request can be specified in the ``Client::put()`` or ``Client::post()`` method, or, you can specify
36
- the body of the request by calling the ``setBody()`` method of any
37
- ``Guzzle\Http\Message\EntityEnclosingRequestInterface`` object.
38
-
39
- Compression
40
- -----------
41
-
42
- You can compress the contents of an EntityBody object using the ``compress()`` method. The compress method accepts a
43
- filter that must match to one of the supported
44
- `PHP stream filters <http://www.php.net/manual/en/filters.compression.php>`_ on your system (e.g. `zlib.deflate`,
45
- ``bzip2.compress``, etc). Compressing an entity body will stream the entire entity body through a stream compression
46
- filter into a temporary PHP stream. You can uncompress an entity body using the ``uncompress()`` method and passing
47
- the PHP stream filter to use when decompressing the stream (e.g. ``zlib.inflate``).
48
-
49
- .. code-block:: php
50
-
51
- use Guzzle\Http\EntityBody;
52
-
53
- $body = EntityBody::factory(fopen('/tmp/test.txt', 'r+'));
54
- echo $body->getSize();
55
- // >>> 1048576
56
-
57
- // Compress using the default zlib.deflate filter
58
- $body->compress();
59
- echo $body->getSize();
60
- // >>> 314572
61
-
62
- // Decompress the stream
63
- $body->uncompress();
64
- echo $body->getSize();
65
- // >>> 1048576
66
-
67
- Decorators
68
- ----------
69
-
70
- Guzzle provides several EntityBody decorators that can be used to add functionality to an EntityBody at runtime.
71
-
72
- IoEmittingEntityBody
73
- ~~~~~~~~~~~~~~~~~~~~
74
-
75
- This decorator will emit events when data is read from a stream or written to a stream. Add an event subscriber to the
76
- entity body's ``body.read`` or ``body.write`` methods to receive notifications when data data is transferred.
77
-
78
- .. code-block:: php
79
-
80
- use Guzzle\Common\Event;
81
- use Guzzle\Http\EntityBody;
82
- use Guzzle\Http\IoEmittingEntityBody;
83
-
84
- $original = EntityBody::factory(fopen('/tmp/test.txt', 'r+'));
85
- $body = new IoEmittingEntityBody($original);
86
-
87
- // Listen for read events
88
- $body->getEventDispatcher()->addListener('body.read', function (Event $e) {
89
- // Grab data from the event
90
- $entityBody = $e['body'];
91
- // Amount of data retrieved from the body
92
- $lengthOfData = $e['length'];
93
- // The actual data that was read
94
- $data = $e['read'];
95
- });
96
-
97
- // Listen for write events
98
- $body->getEventDispatcher()->addListener('body.write', function (Event $e) {
99
- // Grab data from the event
100
- $entityBody = $e['body'];
101
- // The data that was written
102
- $data = $e['write'];
103
- // The actual amount of data that was written
104
- $data = $e['read'];
105
- });
106
-
107
- ReadLimitEntityBody
108
- ~~~~~~~~~~~~~~~~~~~
109
-
110
- The ReadLimitEntityBody decorator can be used to transfer a subset or slice of an existing EntityBody object. This can
111
- be useful for breaking a large file into smaller pieces to be sent in chunks (e.g. Amazon S3's multipart upload API).
112
-
113
- .. code-block:: php
114
-
115
- use Guzzle\Http\EntityBody;
116
- use Guzzle\Http\ReadLimitEntityBody;
117
-
118
- $original = EntityBody::factory(fopen('/tmp/test.txt', 'r+'));
119
- echo $original->getSize();
120
- // >>> 1048576
121
-
122
- // Limit the size of the body to 1024 bytes and start reading from byte 2048
123
- $body = new ReadLimitEntityBody($original, 1024, 2048);
124
- echo $body->getSize();
125
- // >>> 1024
126
- echo $body->ftell();
127
- // >>> 0
128
-
129
- CachingEntityBody
130
- ~~~~~~~~~~~~~~~~~
131
-
132
- The CachingEntityBody decorator is used to allow seeking over previously read bytes on non-seekable read streams. This
133
- can be useful when transferring a non-seekable entity body fails due to needing to rewind the stream (for example,
134
- resulting from a redirect). Data that is read from the remote stream will be buffered in a PHP temp stream so that
135
- previously read bytes are cached first in memory, then on disk.
136
-
137
- .. code-block:: php
138
-
139
- use Guzzle\Http\EntityBody;
140
- use Guzzle\Http\CachingEntityBody;
141
-
142
- $original = EntityBody::factory(fopen('http://www.google.com', 'r'));
143
- $body = new CachingEntityBody($original);
144
-
145
- $body->read(1024);
146
- echo $body->ftell();
147
- // >>> 1024
148
-
149
- $body->seek(0);
150
- echo $body->ftell();
151
- // >>> 0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/http-client/http-redirects.rst DELETED
@@ -1,99 +0,0 @@
1
- ==============
2
- HTTP redirects
3
- ==============
4
-
5
- By default, Guzzle will automatically follow redirects using the non-RFC compliant implementation used by most web
6
- browsers. This means that redirects for POST requests are followed by a GET request. You can force RFC compliance by
7
- enabling the strict mode on a request's parameter object:
8
-
9
- .. code-block:: php
10
-
11
- // Set per request
12
- $request = $client->post();
13
- $request->getParams()->set('redirect.strict', true);
14
-
15
- // You can set globally on a client so all requests use strict redirects
16
- $client->getConfig()->set('request.params', array(
17
- 'redirect.strict' => true
18
- ));
19
-
20
- By default, Guzzle will redirect up to 5 times before throwing a ``Guzzle\Http\Exception\TooManyRedirectsException``.
21
- You can raise or lower this value using the ``redirect.max`` parameter of a request object:
22
-
23
- .. code-block:: php
24
-
25
- $request->getParams()->set('redirect.max', 2);
26
-
27
- Redirect history
28
- ----------------
29
-
30
- You can get the number of redirects of a request using the resulting response object's ``getRedirectCount()`` method.
31
- Similar to cURL's ``effective_url`` property, Guzzle provides the effective URL, or the last redirect URL that returned
32
- the request, in a response's ``getEffectiveUrl()`` method.
33
-
34
- When testing or debugging, it is often useful to see a history of redirects for a particular request. This can be
35
- achieved using the HistoryPlugin.
36
-
37
- .. code-block:: php
38
-
39
- $request = $client->get('/');
40
- $history = new Guzzle\Plugin\History\HistoryPlugin();
41
- $request->addSubscriber($history);
42
- $response = $request->send();
43
-
44
- // Get the last redirect URL or the URL of the request that received
45
- // this response
46
- echo $response->getEffectiveUrl();
47
-
48
- // Get the number of redirects
49
- echo $response->getRedirectCount();
50
-
51
- // Iterate over each sent request and response
52
- foreach ($history->getAll() as $transaction) {
53
- // Request object
54
- echo $transaction['request']->getUrl() . "\n";
55
- // Response object
56
- echo $transaction['response']->getEffectiveUrl() . "\n";
57
- }
58
-
59
- // Or, simply cast the HistoryPlugin to a string to view each request and response
60
- echo $history;
61
-
62
- Disabling redirects
63
- -------------------
64
-
65
- You can disable redirects on a client by passing a configuration option in the client's constructor:
66
-
67
- .. code-block:: php
68
-
69
- $client = new Client(null, array('redirect.disable' => true));
70
-
71
- You can also disable redirects per request:
72
-
73
- .. code-block:: php
74
-
75
- $request = $client->get($url, array(), array('allow_redirects' => false));
76
-
77
- Redirects and non-repeatable streams
78
- ------------------------------------
79
-
80
- If you are redirected when sending data from a non-repeatable stream and some of the data has been read off of the
81
- stream, then you will get a ``Guzzle\Http\Exception\CouldNotRewindStreamException``. You can get around this error by
82
- adding a custom rewind method to the entity body object being sent in the request.
83
-
84
- .. code-block:: php
85
-
86
- $request = $client->post(
87
- 'http://httpbin.com/redirect/2',
88
- null,
89
- fopen('http://httpbin.com/get', 'r')
90
- );
91
-
92
- // Add a custom function that can be used to rewind the stream
93
- // (reopen in this example)
94
- $request->getBody()->setRewindFunction(function ($body) {
95
- $body->setStream(fopen('http://httpbin.com/get', 'r'));
96
- return true;
97
- );
98
-
99
- $response = $client->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/http-client/request.rst DELETED
@@ -1,667 +0,0 @@
1
- =====================
2
- Using Request objects
3
- =====================
4
-
5
- HTTP request messages
6
- ---------------------
7
-
8
- Request objects are all about building an HTTP message. Each part of an HTTP request message can be set individually
9
- using methods on the request object or set in bulk using the ``setUrl()`` method. Here's the format of an HTTP request
10
- with each part of the request referencing the method used to change it::
11
-
12
- PUT(a) /path(b)?query=123(c) HTTP/1.1(d)
13
- X-Header(e): header
14
- Content-Length(e): 4
15
-
16
- data(f)
17
-
18
- +-------------------------+---------------------------------------------------------------------------------+
19
- | a. **Method** | The request method can only be set when instantiating a request |
20
- +-------------------------+---------------------------------------------------------------------------------+
21
- | b. **Path** | ``$request->setPath('/path');`` |
22
- +-------------------------+---------------------------------------------------------------------------------+
23
- | c. **Query** | ``$request->getQuery()->set('query', '123');`` |
24
- +-------------------------+---------------------------------------------------------------------------------+
25
- | d. **Protocol version** | ``$request->setProtocolVersion('1.1');`` |
26
- +-------------------------+---------------------------------------------------------------------------------+
27
- | e. **Header** | ``$request->setHeader('X-Header', 'header');`` |
28
- +-------------------------+---------------------------------------------------------------------------------+
29
- | f. **Entity Body** | ``$request->setBody('data'); // Only available with PUT, POST, PATCH, DELETE`` |
30
- +-------------------------+---------------------------------------------------------------------------------+
31
-
32
- Creating requests with a client
33
- -------------------------------
34
-
35
- Client objects are responsible for creating HTTP request objects.
36
-
37
- GET requests
38
- ~~~~~~~~~~~~
39
-
40
- `GET requests <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3>`_ are the most common form of HTTP
41
- requests. When you visit a website in your browser, the HTML of the website is downloaded using a GET request. GET
42
- requests are idempotent requests that are typically used to download content (an entity) identified by a request URL.
43
-
44
- .. code-block:: php
45
-
46
- use Guzzle\Http\Client;
47
-
48
- $client = new Client();
49
-
50
- // Create a request that has a query string and an X-Foo header
51
- $request = $client->get('http://www.amazon.com?a=1', array('X-Foo' => 'Bar'));
52
-
53
- // Send the request and get the response
54
- $response = $request->send();
55
-
56
- You can change where the body of a response is downloaded on any request using the
57
- ``$request->setResponseBody(string|EntityBodyInterface|resource)`` method of a request. You can also set the ``save_to``
58
- option of a request:
59
-
60
- .. code-block:: php
61
-
62
- // Send the response body to a file
63
- $request = $client->get('http://test.com', array(), array('save_to' => '/path/to/file'));
64
-
65
- // Send the response body to an fopen resource
66
- $request = $client->get('http://test.com', array(), array('save_to' => fopen('/path/to/file', 'w')));
67
-
68
- HEAD requests
69
- ~~~~~~~~~~~~~
70
-
71
- `HEAD requests <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4>`_ work exactly like GET requests except
72
- that they do not actually download the response body (entity) of the response message. HEAD requests are useful for
73
- retrieving meta information about an entity identified by a Request-URI.
74
-
75
- .. code-block:: php
76
-
77
- $client = new Guzzle\Http\Client();
78
- $request = $client->head('http://www.amazon.com');
79
- $response = $request->send();
80
- echo $response->getContentLength();
81
- // >>> Will output the Content-Length header value
82
-
83
- DELETE requests
84
- ~~~~~~~~~~~~~~~
85
-
86
- A `DELETE method <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7>`_ requests that the origin server
87
- delete the resource identified by the Request-URI.
88
-
89
- .. code-block:: php
90
-
91
- $client = new Guzzle\Http\Client();
92
- $request = $client->delete('http://example.com');
93
- $response = $request->send();
94
-
95
- POST requests
96
- ~~~~~~~~~~~~~
97
-
98
- While `POST requests <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5>`_ can be used for a number of
99
- reasons, POST requests are often used when submitting HTML form data to a website. POST requests can include an entity
100
- body in the HTTP request.
101
-
102
- POST requests in Guzzle are sent with an ``application/x-www-form-urlencoded`` Content-Type header if POST fields are
103
- present but no files are being sent in the POST. If files are specified in the POST request, then the Content-Type
104
- header will become ``multipart/form-data``.
105
-
106
- The ``post()`` method of a client object accepts four arguments: the URL, optional headers, post fields, and an array of
107
- request options. To send files in the POST request, prepend the ``@`` symbol to the array value (just like you would if
108
- you were using the PHP ``curl_setopt`` function).
109
-
110
- Here's how to create a multipart/form-data POST request containing files and fields:
111
-
112
- .. code-block:: php
113
-
114
- $request = $client->post('http://httpbin.org/post', array(), array(
115
- 'custom_field' => 'my custom value',
116
- 'file_field' => '@/path/to/file.xml'
117
- ));
118
-
119
- $response = $request->send();
120
-
121
- .. note::
122
-
123
- Remember to **always** sanitize user input when sending POST requests:
124
-
125
- .. code-block:: php
126
-
127
- // Prevent users from accessing sensitive files by sanitizing input
128
- $_POST = array('firstname' => '@/etc/passwd');
129
- $request = $client->post('http://www.example.com', array(), array (
130
- 'firstname' => str_replace('@', '', $_POST['firstname'])
131
- ));
132
-
133
- You can alternatively build up the contents of a POST request.
134
-
135
- .. code-block:: php
136
-
137
- $request = $client->post('http://httpbin.org/post')
138
- ->setPostField('custom_field', 'my custom value')
139
- ->addPostFile('file', '/path/to/file.xml');
140
-
141
- $response = $request->send();
142
-
143
- Raw POST data
144
- ^^^^^^^^^^^^^
145
-
146
- POST requests can also contain raw POST data that is not related to HTML forms.
147
-
148
- .. code-block:: php
149
-
150
- $request = $client->post('http://httpbin.org/post', array(), 'this is the body');
151
- $response = $request->send();
152
-
153
- You can set the body of POST request using the ``setBody()`` method of the
154
- ``Guzzle\Http\Message\EntityEnclosingRequest`` object. This method accepts a string, a resource returned from
155
- ``fopen``, or a ``Guzzle\Http\EntityBodyInterface`` object.
156
-
157
- .. code-block:: php
158
-
159
- $request = $client->post('http://httpbin.org/post');
160
- // Set the body of the POST to stream the contents of /path/to/large_body.txt
161
- $request->setBody(fopen('/path/to/large_body.txt', 'r'));
162
- $response = $request->send();
163
-
164
- PUT requests
165
- ~~~~~~~~~~~~
166
-
167
- The `PUT method <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6>`_ requests that the enclosed entity be
168
- stored under the supplied Request-URI. PUT requests are similar to POST requests in that they both can send an entity
169
- body in the request message.
170
-
171
- The body of a PUT request (any any ``Guzzle\Http\Message\EntityEnclosingRequestInterface`` object) is always stored as
172
- a ``Guzzle\Http\Message\EntityBodyInterface`` object. This allows a great deal of flexibility when sending data to a
173
- remote server. For example, you can stream the contents of a stream returned by fopen, stream the contents of a
174
- callback function, or simply send a string of data.
175
-
176
- .. code-block:: php
177
-
178
- $request = $client->put('http://httpbin.org/put', array(), 'this is the body');
179
- $response = $request->send();
180
-
181
- Just like with POST, PATH, and DELETE requests, you can set the body of a PUT request using the ``setBody()`` method.
182
-
183
- .. code-block:: php
184
-
185
- $request = $client->put('http://httpbin.org/put');
186
- $request->setBody(fopen('/path/to/large_body.txt', 'r'));
187
- $response = $request->send();
188
-
189
- PATCH requests
190
- ~~~~~~~~~~~~~~
191
-
192
- `PATCH requests <http://tools.ietf.org/html/rfc5789>`_ are used to modify a resource.
193
-
194
- .. code-block:: php
195
-
196
- $request = $client->patch('http://httpbin.org', array(), 'this is the body');
197
- $response = $request->send();
198
-
199
- OPTIONS requests
200
- ~~~~~~~~~~~~~~~~
201
-
202
- The `OPTIONS method <http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2>`_ represents a request for
203
- information about the communication options available on the request/response chain identified by the Request-URI.
204
-
205
- .. code-block:: php
206
-
207
- $request = $client->options('http://httpbin.org');
208
- $response = $request->send();
209
-
210
- // Check if the PUT method is supported by this resource
211
- var_export($response->isMethodAllows('PUT'));
212
-
213
- Custom requests
214
- ~~~~~~~~~~~~~~~
215
-
216
- You can create custom HTTP requests that use non-standard HTTP methods using the ``createRequest()`` method of a
217
- client object.
218
-
219
- .. code-block:: php
220
-
221
- $request = $client->createRequest('COPY', 'http://example.com/foo', array(
222
- 'Destination' => 'http://example.com/bar',
223
- 'Overwrite' => 'T'
224
- ));
225
- $response = $request->send();
226
-
227
- Query string parameters
228
- -----------------------
229
-
230
- Query string parameters of a request are owned by a request's ``Guzzle\Http\Query`` object that is accessible by
231
- calling ``$request->getQuery()``. The Query class extends from ``Guzzle\Common\Collection`` and allows you to set one
232
- or more query string parameters as key value pairs. You can set a parameter on a Query object using the
233
- ``set($key, $value)`` method or access the query string object like an associative array. Any previously specified
234
- value for a key will be overwritten when using ``set()``. Use ``add($key, $value)`` to add a value to query string
235
- object, and in the event of a collision with an existing value at a specific key, the value will be converted to an
236
- array that contains all of the previously set values.
237
-
238
- .. code-block:: php
239
-
240
- $request = new Guzzle\Http\Message\Request('GET', 'http://www.example.com?foo=bar&abc=123');
241
-
242
- $query = $request->getQuery();
243
- echo "{$query}\n";
244
- // >>> foo=bar&abc=123
245
-
246
- $query->remove('abc');
247
- echo "{$query}\n";
248
- // >>> foo=bar
249
-
250
- $query->set('foo', 'baz');
251
- echo "{$query}\n";
252
- // >>> foo=baz
253
-
254
- $query->add('foo', 'bar');
255
- echo "{$query}\n";
256
- // >>> foo%5B0%5D=baz&foo%5B1%5D=bar
257
-
258
- Whoah! What happened there? When ``foo=bar`` was added to the existing ``foo=baz`` query string parameter, the
259
- aggregator associated with the Query object was used to help convert multi-value query string parameters into a string.
260
- Let's disable URL-encoding to better see what's happening.
261
-
262
- .. code-block:: php
263
-
264
- $query->useUrlEncoding(false);
265
- echo "{$query}\n";
266
- // >>> foo[0]=baz&foo[1]=bar
267
-
268
- .. note::
269
-
270
- URL encoding can be disabled by passing false, enabled by passing true, set to use RFC 1738 by passing
271
- ``Query::FORM_URLENCODED`` (internally uses PHP's ``urlencode`` function), or set to RFC 3986 by passing
272
- ``Query::RFC_3986`` (this is the default and internally uses PHP's ``rawurlencode`` function).
273
-
274
- As you can see, the multiple values were converted into query string parameters following the default PHP convention of
275
- adding numerically indexed square bracket suffixes to each key (``foo[0]=baz&foo[1]=bar``). The strategy used to convert
276
- multi-value parameters into a string can be customized using the ``setAggregator()`` method of the Query class. Guzzle
277
- ships with the following query string aggregators by default:
278
-
279
- 1. ``Guzzle\Http\QueryAggregator\PhpAggregator``: Aggregates using PHP style brackets (e.g. ``foo[0]=baz&foo[1]=bar``)
280
- 2. ``Guzzle\Http\QueryAggregator\DuplicateAggregator``: Performs no aggregation and allows for key value pairs to be
281
- repeated in a URL (e.g. ``foo=baz&foo=bar``)
282
- 3. ``Guzzle\Http\QueryAggregator\CommaAggregator``: Aggregates using commas (e.g. ``foo=baz,bar``)
283
-
284
- .. _http-message-headers:
285
-
286
- HTTP Message Headers
287
- --------------------
288
-
289
- HTTP message headers are case insensitive, multiple occurrences of any header can be present in an HTTP message
290
- (whether it's valid or not), and some servers require specific casing of particular headers. Because of this, request
291
- and response headers are stored in ``Guzzle\Http\Message\Header`` objects. The Header object can be cast as a string,
292
- counted, or iterated to retrieve each value from the header. Casting a Header object to a string will return all of
293
- the header values concatenated together using a glue string (typically ", ").
294
-
295
- A request (and response) object have several methods that allow you to retrieve and modify headers.
296
-
297
- * ``getHeaders()``: Get all of the headers of a message as a ``Guzzle\Http\Message\Header\HeaderCollection`` object.
298
- * ``getHeader($header)``: Get a specific header from a message. If the header exists, you'll get a
299
- ``Guzzle\Http\Message\Header`` object. If the header does not exist, this methods returns ``null``.
300
- * ``hasHeader($header)``: Returns true or false based on if the message has a particular header.
301
- * ``setHeader($header, $value)``: Set a header value and overwrite any previously set value for this header.
302
- * ``addHeader($header, $value)``: Add a header with a particular name. If a previous value was already set by the same,
303
- then the header will contain multiple values.
304
- * ``removeHeader($header)``: Remove a header by name from the message.
305
-
306
- .. code-block:: php
307
-
308
- $request = new Request('GET', 'http://httpbin.com/cookies');
309
- // addHeader will set and append to any existing header values
310
- $request->addHeader('Foo', 'bar');
311
- $request->addHeader('foo', 'baz');
312
- // setHeader overwrites any existing values
313
- $request->setHeader('Test', '123');
314
-
315
- // Request headers can be cast as a string
316
- echo $request->getHeader('Foo');
317
- // >>> bar, baz
318
- echo $request->getHeader('Test');
319
- // >>> 123
320
-
321
- // You can count the number of headers of a particular case insensitive name
322
- echo count($request->getHeader('foO'));
323
- // >>> 2
324
-
325
- // You can iterate over Header objects
326
- foreach ($request->getHeader('foo') as $header) {
327
- echo $header . "\n";
328
- }
329
-
330
- // You can get all of the request headers as a Guzzle\Http\Message\Header\HeaderCollection object
331
- $headers = $request->getHeaders();
332
-
333
- // Missing headers return NULL
334
- var_export($request->getHeader('Missing'));
335
- // >>> null
336
-
337
- // You can see all of the different variations of a header by calling raw() on the Header
338
- var_export($request->getHeader('foo')->raw());
339
-
340
- Setting the body of a request
341
- -----------------------------
342
-
343
- Requests that can send a body (e.g. PUT, POST, DELETE, PATCH) are instances of
344
- ``Guzzle\Http\Message\EntityEnclosingRequestInterface``. Entity enclosing requests contain several methods that allow
345
- you to specify the body to send with a request.
346
-
347
- Use the ``setBody()`` method of a request to set the body that will be sent with a request. This method accepts a
348
- string, a resource returned by ``fopen()``, an array, or an instance of ``Guzzle\Http\EntityBodyInterface``. The body
349
- will then be streamed from the underlying ``EntityBodyInterface`` object owned by the request. When setting the body
350
- of the request, you can optionally specify a Content-Type header and whether or not to force the request to use
351
- chunked Transfer-Encoding.
352
-
353
- .. code-block:: php
354
-
355
- $request = $client->put('/user.json');
356
- $request->setBody('{"foo":"baz"}', 'application/json');
357
-
358
- Content-Type header
359
- ~~~~~~~~~~~~~~~~~~~
360
-
361
- Guzzle will automatically add a Content-Type header to a request if the Content-Type can be guessed based on the file
362
- extension of the payload being sent or the file extension present in the path of a request.
363
-
364
- .. code-block:: php
365
-
366
- $request = $client->put('/user.json', array(), '{"foo":"bar"}');
367
- // The Content-Type was guessed based on the path of the request
368
- echo $request->getHeader('Content-Type');
369
- // >>> application/json
370
-
371
- $request = $client->put('/user.json');
372
- $request->setBody(fopen('/tmp/user_data.json', 'r'));
373
- // The Content-Type was guessed based on the path of the entity body
374
- echo $request->getHeader('Content-Type');
375
- // >>> application/json
376
-
377
- Transfer-Encoding: chunked header
378
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
379
-
380
- When sending HTTP requests that contain a payload, you must let the remote server know how to determine when the entire
381
- message has been sent. This usually is done by supplying a ``Content-Length`` header that tells the origin server the
382
- size of the body that is to be sent. In some cases, the size of the payload being sent in a request cannot be known
383
- before initiating the transfer. In these cases (when using HTTP/1.1), you can use the ``Transfer-Encoding: chunked``
384
- header.
385
-
386
- If the Content-Length cannot be determined (i.e. using a PHP ``http://`` stream), then Guzzle will automatically add
387
- the ``Transfer-Encoding: chunked`` header to the request.
388
-
389
- .. code-block:: php
390
-
391
- $request = $client->put('/user.json');
392
- $request->setBody(fopen('http://httpbin.org/get', 'r'));
393
-
394
- // The Content-Length could not be determined
395
- echo $request->getHeader('Transfer-Encoding');
396
- // >>> chunked
397
-
398
- See :doc:`/http-client/entity-bodies` for more information on entity bodies.
399
-
400
- Expect: 100-Continue header
401
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
402
-
403
- The ``Expect: 100-Continue`` header is used to help a client prevent sending a large payload to a server that will
404
- reject the request. This allows clients to fail fast rather than waste bandwidth sending an erroneous payload. Guzzle
405
- will automatically add the ``Expect: 100-Continue`` header to a request when the size of the payload exceeds 1MB or if
406
- the body of the request is not seekable (this helps to prevent errors when a non-seekable body request is redirected).
407
-
408
- .. note::
409
-
410
- If you find that your larger requests are taking too long to complete, you should first check if the
411
- ``Expect: 100-Continue`` header is being sent with the request. Some servers do not respond well to this header,
412
- which causes cURL to sleep for `1 second <http://curl.haxx.se/mail/lib-2010-01/0182.html>`_.
413
-
414
- POST fields and files
415
- ~~~~~~~~~~~~~~~~~~~~~
416
-
417
- Any entity enclosing request can send POST style fields and files. This includes POST, PUT, PATCH, and DELETE requests.
418
- Any request that has set POST fields or files will use cURL's POST message functionality.
419
-
420
- .. code-block:: php
421
-
422
- $request = $client->post('/post');
423
- // Set an overwrite any previously specified value
424
- $request->setPostField('foo', 'bar');
425
- // Append a value to any existing values
426
- $request->getPostFields()->add('foo', 'baz');
427
- // Remove a POST field by name
428
- $request->removePostField('fizz');
429
-
430
- // Add a file to upload (forces multipart/form-data)
431
- $request->addPostFile('my_file', '/path/to/file', 'plain/text');
432
- // Remove a POST file by POST key name
433
- $request->removePostFile('my_other_file');
434
-
435
- .. tip::
436
-
437
- Adding a large number of POST fields to a POST request is faster if you use the ``addPostFields()`` method so that
438
- you can add and process multiple fields with a single call. Adding multiple POST files is also faster using
439
- ``addPostFiles()``.
440
-
441
- Working with cookies
442
- --------------------
443
-
444
- Cookies can be modified and retrieved from a request using the following methods:
445
-
446
- .. code-block:: php
447
-
448
- $request->addCookie($name, $value);
449
- $request->removeCookie($name);
450
- $value = $request->getCookie($name);
451
- $valueArray = $request->getCookies();
452
-
453
- Use the :doc:`cookie plugin </plugins/cookie-plugin>` if you need to reuse cookies between requests.
454
-
455
- .. _request-set-response-body:
456
-
457
- Changing where a response is downloaded
458
- ----------------------------------------
459
-
460
- When a request is sent, the body of the response will be stored in a PHP temp stream by default. You can change the
461
- location in which the response will be downloaded using ``$request->setResponseBody($body)`` or the ``save_to`` request
462
- option. This can be useful for downloading the contents of a URL to a specific file.
463
-
464
- Here's an example of using request options:
465
-
466
- .. code-block:: php
467
-
468
- $request = $this->client->get('http://example.com/large.mov', array(), array(
469
- 'save_to' => '/tmp/large_file.mov'
470
- ));
471
- $request->send();
472
- var_export(file_exists('/tmp/large_file.mov'));
473
- // >>> true
474
-
475
- Here's an example of using ``setResponseBody()``:
476
-
477
- .. code-block:: php
478
-
479
- $body = fopen('/tmp/large_file.mov', 'w');
480
- $request = $this->client->get('http://example.com/large.mov');
481
- $request->setResponseBody($body);
482
-
483
- // You can more easily specify the name of a file to save the contents
484
- // of the response to by passing a string to ``setResponseBody()``.
485
-
486
- $request = $this->client->get('http://example.com/large.mov');
487
- $request->setResponseBody('/tmp/large_file.mov');
488
-
489
- Custom cURL options
490
- -------------------
491
-
492
- Most of the functionality implemented in the libcurl bindings has been simplified and abstracted by Guzzle. Developers
493
- who need access to `cURL specific functionality <http://www.php.net/curl_setopt>`_ can still add cURL handle
494
- specific behavior to Guzzle HTTP requests by modifying the cURL options collection of a request:
495
-
496
- .. code-block:: php
497
-
498
- $request->getCurlOptions()->set(CURLOPT_LOW_SPEED_LIMIT, 200);
499
-
500
- Other special options that can be set in the ``curl.options`` array include:
501
-
502
- +-------------------------+---------------------------------------------------------------------------------+
503
- | debug | Adds verbose cURL output to a temp stream owned by the cURL handle object |
504
- +-------------------------+---------------------------------------------------------------------------------+
505
- | progress | Instructs cURL to emit events when IO events occur. This allows you to be |
506
- | | notified when bytes are transferred over the wire by subscribing to a request's |
507
- | | ``curl.callback.read``, ``curl.callback.write``, and ``curl.callback.progress`` |
508
- | | events. |
509
- +-------------------------+---------------------------------------------------------------------------------+
510
-
511
- Request options
512
- ---------------
513
-
514
- Requests options can be specified when creating a request or in the ``request.options`` parameter of a client. These
515
- options can control various aspects of a request including: headers to send, query string data, where the response
516
- should be downloaded, proxies, auth, etc.
517
-
518
- .. code-block:: php
519
-
520
- $request = $client->get($url, $headers, array('proxy' => 'http://proxy.com'));
521
-
522
- See :ref:`Request options <request-options>` for more information.
523
-
524
- Working with errors
525
- -------------------
526
-
527
- HTTP errors
528
- ~~~~~~~~~~~
529
-
530
- Requests that receive a 4xx or 5xx response will throw a ``Guzzle\Http\Exception\BadResponseException``. More
531
- specifically, 4xx errors throw a ``Guzzle\Http\Exception\ClientErrorResponseException``, and 5xx errors throw a
532
- ``Guzzle\Http\Exception\ServerErrorResponseException``. You can catch the specific exceptions or just catch the
533
- BadResponseException to deal with either type of error. Here's an example of catching a generic BadResponseException:
534
-
535
- .. code-block:: php
536
-
537
- try {
538
- $response = $client->get('/not_found.xml')->send();
539
- } catch (Guzzle\Http\Exception\BadResponseException $e) {
540
- echo 'Uh oh! ' . $e->getMessage();
541
- echo 'HTTP request URL: ' . $e->getRequest()->getUrl() . "\n";
542
- echo 'HTTP request: ' . $e->getRequest() . "\n";
543
- echo 'HTTP response status: ' . $e->getResponse()->getStatusCode() . "\n";
544
- echo 'HTTP response: ' . $e->getResponse() . "\n";
545
- }
546
-
547
- Throwing an exception when a 4xx or 5xx response is encountered is the default behavior of Guzzle requests. This
548
- behavior can be overridden by adding an event listener with a higher priority than -255 that stops event propagation.
549
- You can subscribe to ``request.error`` to receive notifications any time an unsuccessful response is received.
550
-
551
- You can change the response that will be associated with the request by calling ``setResponse()`` on the
552
- ``$event['request']`` object passed into your listener, or by changing the ``$event['response']`` value of the
553
- ``Guzzle\Common\Event`` object that is passed to your listener. Transparently changing the response associated with a
554
- request by modifying the event allows you to retry failed requests without complicating the code that uses the client.
555
- This might be useful for sending requests to a web service that has expiring auth tokens. When a response shows that
556
- your token has expired, you can get a new token, retry the request with the new token, and return the successful
557
- response to the user.
558
-
559
- Here's an example of retrying a request using updated authorization credentials when a 401 response is received,
560
- overriding the response of the original request with the new response, and still allowing the default exception
561
- behavior to be called when other non-200 response status codes are encountered:
562
-
563
- .. code-block:: php
564
-
565
- // Add custom error handling to any request created by this client
566
- $client->getEventDispatcher()->addListener('request.error', function(Event $event) {
567
-
568
- if ($event['response']->getStatusCode() == 401) {
569
-
570
- $newRequest = $event['request']->clone();
571
- $newRequest->setHeader('X-Auth-Header', MyApplication::getNewAuthToken());
572
- $newResponse = $newRequest->send();
573
-
574
- // Set the response object of the request without firing more events
575
- $event['response'] = $newResponse;
576
-
577
- // You can also change the response and fire the normal chain of
578
- // events by calling $event['request']->setResponse($newResponse);
579
-
580
- // Stop other events from firing when you override 401 responses
581
- $event->stopPropagation();
582
- }
583
-
584
- });
585
-
586
- cURL errors
587
- ~~~~~~~~~~~
588
-
589
- Connection problems and cURL specific errors can also occur when transferring requests using Guzzle. When Guzzle
590
- encounters cURL specific errors while transferring a single request, a ``Guzzle\Http\Exception\CurlException`` is
591
- thrown with an informative error message and access to the cURL error message.
592
-
593
- A ``Guzzle\Common\Exception\MultiTransferException`` exception is thrown when a cURL specific error occurs while
594
- transferring multiple requests in parallel. You can then iterate over all of the exceptions encountered during the
595
- transfer.
596
-
597
- Plugins and events
598
- ------------------
599
-
600
- Guzzle request objects expose various events that allow you to hook in custom logic. A request object owns a
601
- ``Symfony\Component\EventDispatcher\EventDispatcher`` object that can be accessed by calling
602
- ``$request->getEventDispatcher()``. You can use the event dispatcher to add listeners (a simple callback function) or
603
- event subscribers (classes that listen to specific events of a dispatcher). You can add event subscribers to a request
604
- directly by just calling ``$request->addSubscriber($mySubscriber);``.
605
-
606
- .. _request-events:
607
-
608
- Events emitted from a request
609
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610
-
611
- A ``Guzzle\Http\Message\Request`` and ``Guzzle\Http\Message\EntityEnclosingRequest`` object emit the following events:
612
-
613
- +------------------------------+--------------------------------------------+------------------------------------------+
614
- | Event name | Description | Event data |
615
- +==============================+============================================+==========================================+
616
- | request.before_send | About to send request | * request: Request to be sent |
617
- +------------------------------+--------------------------------------------+------------------------------------------+
618
- | request.sent | Sent the request | * request: Request that was sent |
619
- | | | * response: Received response |
620
- +------------------------------+--------------------------------------------+------------------------------------------+
621
- | request.complete | Completed a full HTTP transaction | * request: Request that was sent |
622
- | | | * response: Received response |
623
- +------------------------------+--------------------------------------------+------------------------------------------+
624
- | request.success | Completed a successful request | * request: Request that was sent |
625
- | | | * response: Received response |
626
- +------------------------------+--------------------------------------------+------------------------------------------+
627
- | request.error | Completed an unsuccessful request | * request: Request that was sent |
628
- | | | * response: Received response |
629
- +------------------------------+--------------------------------------------+------------------------------------------+
630
- | request.exception | An unsuccessful response was | * request: Request |
631
- | | received. | * response: Received response |
632
- | | | * exception: BadResponseException |
633
- +------------------------------+--------------------------------------------+------------------------------------------+
634
- | request.receive.status_line | Received the start of a response | * line: Full response start line |
635
- | | | * status_code: Status code |
636
- | | | * reason_phrase: Reason phrase |
637
- | | | * previous_response: (e.g. redirect) |
638
- +------------------------------+--------------------------------------------+------------------------------------------+
639
- | curl.callback.progress | cURL progress event (only dispatched when | * handle: CurlHandle |
640
- | | ``emit_io`` is set on a request's curl | * download_size: Total download size |
641
- | | options) | * downloaded: Bytes downloaded |
642
- | | | * upload_size: Total upload bytes |
643
- | | | * uploaded: Bytes uploaded |
644
- +------------------------------+--------------------------------------------+------------------------------------------+
645
- | curl.callback.write | cURL event called when data is written to | * request: Request |
646
- | | an outgoing stream | * write: Data being written |
647
- +------------------------------+--------------------------------------------+------------------------------------------+
648
- | curl.callback.read | cURL event called when data is written to | * request: Request |
649
- | | an incoming stream | * read: Data being read |
650
- +------------------------------+--------------------------------------------+------------------------------------------+
651
-
652
- Creating a request event listener
653
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
654
-
655
- Here's an example that listens to the ``request.complete`` event of a request and prints the request and response.
656
-
657
- .. code-block:: php
658
-
659
- use Guzzle\Common\Event;
660
-
661
- $request = $client->get('http://www.google.com');
662
-
663
- // Echo out the response that was received
664
- $request->getEventDispatcher()->addListener('request.complete', function (Event $e) {
665
- echo $e['request'] . "\n\n";
666
- echo $e['response'];
667
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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ending a request will return a ``Guzzle\Http\Message\Response`` object. You can view the raw HTTP response message by
6
- casting the Response object to a string. Casting the response to a string will return the entity body of the response
7
- as a string too, so this might be an expensive operation if the entity body is stored in a file or network stream. If
8
- you only want to see the response headers, you can call ``getRawHeaders()``.
9
-
10
- Response status line
11
- --------------------
12
-
13
- The different parts of a response's `status line <http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1>`_
14
- (the first line of the response HTTP message) are easily retrievable.
15
-
16
- .. code-block:: php
17
-
18
- $response = $client->get('http://www.amazon.com')->send();
19
-
20
- echo $response->getStatusCode(); // >>> 200
21
- echo $response->getReasonPhrase(); // >>> OK
22
- echo $response->getProtocol(); // >>> HTTP
23
- echo $response->getProtocolVersion(); // >>> 1.1
24
-
25
- You can determine the type of the response using several helper methods:
26
-
27
- .. code-block:: php
28
-
29
- $response->isSuccessful(); // true
30
- $response->isInformational();
31
- $response->isRedirect();
32
- $response->isClientError();
33
- $response->isServerError();
34
-
35
- Response headers
36
- ----------------
37
-
38
- The Response object contains helper methods for retrieving common response headers. These helper methods normalize the
39
- variations of HTTP response headers.
40
-
41
- .. code-block:: php
42
-
43
- $response->getCacheControl();
44
- $response->getContentType();
45
- $response->getContentLength();
46
- $response->getContentEncoding();
47
- $response->getContentMd5();
48
- $response->getEtag();
49
- // etc... There are methods for every known response header
50
-
51
- You can interact with the Response headers using the same exact methods used to interact with Request headers. See
52
- :ref:`http-message-headers` for more information.
53
-
54
- .. code-block:: php
55
-
56
- echo $response->getHeader('Content-Type');
57
- echo $response->getHeader('Content-Length');
58
- echo $response->getHeaders()['Content-Type']; // PHP 5.4
59
-
60
- Response body
61
- -------------
62
-
63
- The entity body object of a response can be retrieved by calling ``$response->getBody()``. The response EntityBody can
64
- be cast to a string, or you can pass ``true`` to this method to retrieve the body as a string.
65
-
66
- .. code-block:: php
67
-
68
- $request = $client->get('http://www.amazon.com');
69
- $response = $request->send();
70
- echo $response->getBody();
71
-
72
- See :doc:`/http-client/entity-bodies` for more information on entity bodies.
73
-
74
- JSON Responses
75
- ~~~~~~~~~~~~~~
76
-
77
- You can easily parse and use a JSON response as an array using the ``json()`` method of a response. This method will
78
- always return an array if the response is valid JSON or if the response body is empty. You will get an exception if you
79
- call this method and the response is not valid JSON.
80
-
81
- .. code-block:: php
82
-
83
- $data = $response->json();
84
- echo gettype($data);
85
- // >>> array
86
-
87
- XML Responses
88
- ~~~~~~~~~~~~~
89
-
90
- You can easily parse and use a XML response as SimpleXMLElement object using the ``xml()`` method of a response. This
91
- method will always return a SimpleXMLElement object if the response is valid XML or if the response body is empty. You
92
- will get an exception if you call this method and the response is not valid XML.
93
-
94
- .. code-block:: php
95
-
96
- $xml = $response->xml();
97
- echo $xml->foo;
98
- // >>> Bar!
99
-
100
- Streaming responses
101
- -------------------
102
-
103
- Some web services provide streaming APIs that allow a client to keep a HTTP request open for an extended period of
104
- time while polling and reading. Guzzle provides a simple way to convert HTTP request messages into
105
- ``Guzzle\Stream\Stream`` objects so that you can send the initial headers of a request, read the response headers, and
106
- pull in the response body manually as needed.
107
-
108
- Here's an example using the Twitter Streaming API to track the keyword "bieber":
109
-
110
- .. code-block:: php
111
-
112
- use Guzzle\Http\Client;
113
- use Guzzle\Stream\PhpStreamRequestFactory;
114
-
115
- $client = new Client('https://stream.twitter.com/1');
116
-
117
- $request = $client->post('statuses/filter.json', null, array(
118
- 'track' => 'bieber'
119
- ));
120
-
121
- $request->setAuth('myusername', 'mypassword');
122
-
123
- $factory = new PhpStreamRequestFactory();
124
- $stream = $factory->fromRequest($request);
125
-
126
- // Read until the stream is closed
127
- while (!$stream->feof()) {
128
- // Read a line from the stream
129
- $line = $stream->readLine();
130
- // JSON decode the line of data
131
- $data = json_decode($line, true);
132
- }
133
-
134
- You can use the ``stream`` request option when using a static client to more easily create a streaming response.
135
-
136
- .. code-block:: php
137
-
138
- $stream = Guzzle::get('http://guzzlephp.org', array('stream' => true));
139
- while (!$stream->feof()) {
140
- echo $stream->readLine();
141
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/http-client/uri-templates.rst DELETED
@@ -1,52 +0,0 @@
1
- =============
2
- URI templates
3
- =============
4
-
5
- The ``$uri`` passed to one of the client's request creational methods or the base URL of a client can utilize URI
6
- templates. Guzzle supports the entire `URI templates RFC <http://tools.ietf.org/html/rfc6570>`_. URI templates add a
7
- special syntax to URIs that replace template place holders with user defined variables.
8
-
9
- Every request created by a Guzzle HTTP client passes through a URI template so that URI template expressions are
10
- automatically expanded:
11
-
12
- .. code-block:: php
13
-
14
- $client = new Guzzle\Http\Client('https://example.com/', array('a' => 'hi'));
15
- $request = $client->get('/{a}');
16
-
17
- Because of URI template expansion, the URL of the above request will become ``https://example.com/hi``. Notice that
18
- the template was expanded using configuration variables of the client. You can pass in custom URI template variables
19
- by passing the URI of your request as an array where the first index of the array is the URI template and the second
20
- index of the array are template variables that are merged into the client's configuration variables.
21
-
22
- .. code-block:: php
23
-
24
- $request = $client->get(array('/test{?a,b}', array('b' => 'there')));
25
-
26
- The URL for this request will become ``https://test.com?a=hi&b=there``. URI templates aren't limited to just simple
27
- variable replacements; URI templates can provide an enormous amount of flexibility when creating request URIs.
28
-
29
- .. code-block:: php
30
-
31
- $request = $client->get(array('http://example.com{+path}{/segments*}{?query,data*}', array(
32
- 'path' => '/foo/bar',
33
- 'segments' => array('one', 'two'),
34
- 'query' => 'test',
35
- 'data' => array(
36
- 'more' => 'value'
37
- )
38
- )));
39
-
40
- The resulting URL would become ``http://example.com/foo/bar/one/two?query=test&more=value``.
41
-
42
- By default, URI template expressions are enclosed in an opening and closing brace (e.g. ``{var}``). If you are working
43
- with a web service that actually uses braces (e.g. Solr), then you can specify a custom regular expression to use to
44
- match URI template expressions.
45
-
46
- .. code-block:: php
47
-
48
- $client->getUriTemplate()->setRegex('/\<\$(.+)\>/');
49
- $client->get('/<$a>');
50
-
51
- You can learn about all of the different features of URI templates by reading the
52
- `URI templates RFC <http://tools.ietf.org/html/rfc6570>`_.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/index.rst DELETED
@@ -1,5 +0,0 @@
1
- .. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services
2
- .. toctree::
3
- :hidden:
4
-
5
- docs.rst
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/iterators/guzzle-iterators.rst DELETED
@@ -1,97 +0,0 @@
1
- ================
2
- Guzzle iterators
3
- ================
4
-
5
- Guzzle provides several SPL iterators that can be used with other SPL iterators, including Guzzle resource iterators.
6
- Guzzle's ``guzzle/iterator`` component can also be used independently of the rest of Guzzle through Packagist and
7
- Composer: https://packagist.org/packages/guzzle/iterator
8
-
9
- ChunkedIterator
10
- ---------------
11
-
12
- Pulls out multiple values from an inner iterator and yields and array of values for each outer iteration -- essentially
13
- pulling out chunks of values from the inner iterator.
14
-
15
- .. code-block:: php
16
-
17
- use Guzzle\Iterator\ChunkedIterator;
18
-
19
- $inner = new ArrayIterator(range(0, 8));
20
- $chunkedIterator = new ChunkedIterator($inner, 10);
21
-
22
- foreach ($chunkedIterator as $chunk) {
23
- echo implode(', ', $chunk) . "\n";
24
- }
25
-
26
- // >>> 0, 1
27
- // >>> 2, 3
28
- // >>> 4, 5
29
- // >>> 6, 7
30
- // >>> 8
31
-
32
- FilterIterator
33
- --------------
34
-
35
- This iterator is used to filter values out of the inner iterator. This iterator can be used when PHP 5.4's
36
- CallbackFilterIterator is not available.
37
-
38
- .. code-block:: php
39
-
40
- use Guzzle\Iterator\FilterIterator;
41
-
42
- $inner = new ArrayIterator(range(1, 10));
43
- $filterIterator = new FilterIterator($inner, function ($value) {
44
- return $value % 2;
45
- });
46
-
47
- foreach ($filterIterator as $value) {
48
- echo $value . "\n";
49
- }
50
-
51
- // >>> 2
52
- // >>> 4
53
- // >>> 6
54
- // >>> 8
55
- // >>> 10
56
-
57
- MapIterator
58
- -----------
59
-
60
- This iterator modifies the values of the inner iterator before yielding.
61
-
62
- .. code-block:: php
63
-
64
- use Guzzle\Iterator\MapIterator;
65
-
66
- $innner = new ArrayIterator(range(0, 3));
67
-
68
- $mapIterator = new MapIterator($inner, function ($value) {
69
- return $value * 10;
70
- });
71
-
72
- foreach ($mapIterator as $value) {
73
- echo $value . "\n";
74
- }
75
-
76
- // >>> 0
77
- // >>> 10
78
- // >>> 20
79
- // >>> 30
80
-
81
- MethodProxyIterator
82
- -------------------
83
-
84
- This decorator is useful when you need to expose a specific method from an inner iterator that might be wrapper
85
- by one or more iterator decorators. This decorator proxies missing method calls to each inner iterator until one
86
- of the inner iterators can fulfill the call.
87
-
88
- .. code-block:: php
89
-
90
- use Guzzle\Iterator\MethodProxyIterator;
91
-
92
- $inner = new \ArrayIterator();
93
- $proxy = new MethodProxyIterator($inner);
94
-
95
- // Proxy method calls to the ArrayIterator
96
- $proxy->append('a');
97
- $proxy->append('b');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/iterators/resource-iterators.rst DELETED
@@ -1,149 +0,0 @@
1
- ==================
2
- Resource iterators
3
- ==================
4
-
5
- Web services often implement pagination in their responses which requires the end-user to issue a series of consecutive
6
- requests in order to fetch all of the data they asked for. Users of your web service client should not be responsible
7
- for implementing the logic involved in iterating through pages of results. Guzzle provides a simple resource iterator
8
- foundation to make it easier on web service client developers to offer a useful abstraction layer.
9
-
10
- Getting an iterator from a client
11
- ---------------------------------
12
-
13
- ResourceIteratorInterface Guzzle\Service\Client::getIterator($command [, array $commandOptions, array $iteratorOptions ])
14
-
15
- The ``getIterator`` method of a ``Guzzle\Service\ClientInterface`` object provides a convenient interface for
16
- instantiating a resource iterator for a specific command. This method implicitly uses a
17
- ``Guzzle\Service\Resource\ResourceIteratorFactoryInterface`` object to create resource iterators. Pass an
18
- instantiated command object or the name of a command in the first argument. When passing the name of a command, the
19
- command factory of the client will create the command by name using the ``$commandOptions`` array. The third argument
20
- may be used to pass an array of options to the constructor of the instantiated ``ResourceIteratorInterface`` object.
21
-
22
- .. code-block:: php
23
-
24
- $iterator = $client->getIterator('get_users');
25
-
26
- foreach ($iterator as $user) {
27
- echo $user['name'] . ' age ' . $user['age'] . PHP_EOL;
28
- }
29
-
30
- The above code sample might execute a single request or a thousand requests. As a consumer of a web service, I don't
31
- care. I just want to iterate over all of the users.
32
-
33
- Iterator options
34
- ~~~~~~~~~~~~~~~~
35
-
36
- The two universal options that iterators should support are ``limit`` and ``page_size``. Using the ``limit`` option
37
- tells the resource iterator to attempt to limit the total number of iterated resources to a specific amount. Keep in
38
- mind that this is not always possible due to limitations that may be inherent to a web service. The ``page_size``
39
- option is used to tell a resource iterator how many resources to request per page of results. Much like the ``limit``
40
- option, you can not rely on getting back exactly the number of resources your specify in the ``page_size`` option.
41
-
42
- .. note::
43
-
44
- The ``limit`` and ``page_size`` options can also be specified on an iterator using the ``setLimit($limit)`` and
45
- ``setPageSize($pageSize)`` methods.
46
-
47
- Resolving iterator class names
48
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49
-
50
- The default resource iterator factory of a client object expects that your iterators are stored under the ``Model``
51
- folder of your client and that an iterator is names after the CamelCase name of a command followed by the word
52
- "Iterator". For example, if you wanted to create an iterator for the ``get_users`` command, then your iterator class
53
- would be ``Model\GetUsersIterator`` and would be stored in ``Model/GetUsersIterator.php``.
54
-
55
- Creating an iterator
56
- --------------------
57
-
58
- While not required, resource iterators in Guzzle typically iterate using a ``Guzzle\Service\Command\CommandInterface``
59
- object. ``Guzzle\Service\Resource\ResourceIterator``, the default iterator implementation that you should extend,
60
- accepts a command object and array of iterator options in its constructor. The command object passed to the resource
61
- iterator is expected to be ready to execute and not previously executed. The resource iterator keeps a reference of
62
- this command and clones the original command each time a subsequent request needs to be made to fetch more data.
63
-
64
- Implement the sendRequest method
65
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66
-
67
- The most important thing (and usually the only thing) you need to do when creating a resource iterator is to implement
68
- the ``sendRequest()`` method of the resource iterator. The ``sendRequest()`` method is called when you begin
69
- iterating or if there are no resources left to iterate and it you expect to retrieve more resources by making a
70
- subsequent request. The ``$this->command`` property of the resource iterator is updated with a cloned copy of the
71
- original command object passed into the constructor of the iterator. Use this command object to issue your subsequent
72
- requests.
73
-
74
- The ``sendRequest()`` method must return an array of the resources you retrieved from making the subsequent call.
75
- Returning an empty array will stop the iteration. If you suspect that your web service client will occasionally return
76
- an empty result set but still requires further iteration, then you must implement a sort of loop in your
77
- ``sendRequest()`` method that will continue to issue subsequent requests until your reach the end of the paginated
78
- result set or until additional resources are retrieved from the web service.
79
-
80
- Update the nextToken property
81
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82
-
83
- Beyond fetching more results, the ``sendRequest()`` method is responsible for updating the ``$this->nextToken``
84
- property of the iterator. Setting this property to anything other than null tells the iterator that issuing a
85
- subsequent request using the nextToken value will probably return more results. You must continually update this
86
- value in your ``sendRequest()`` method as each response is received from the web service.
87
-
88
- Example iterator
89
- ----------------
90
-
91
- Let's say you want to implement a resource iterator for the ``get_users`` command of your web service. The
92
- ``get_users`` command receives a response that contains a list of users, and if there are more pages of results to
93
- retrieve, returns a value called ``next_user``. This return value is known as the **next token** and should be used to
94
- issue subsequent requests.
95
-
96
- Assume the response to a ``get_users`` command returns JSON data that looks like this:
97
-
98
- .. code-block:: javascript
99
-
100
- {
101
- "users": [
102
- { "name": "Craig Johnson", "age": 10 },
103
- { "name": "Tom Barker", "age": 20 },
104
- { "name": "Bob Mitchell", "age": 74 }
105
- ],
106
- "next_user": "Michael Dowling"
107
- }
108
-
109
- Assume that because there is a ``next_user`` value, there will be more users if a subsequent request is issued. If the
110
- ``next_user`` value is missing or null, then we know there are no more results to fetch. Let's implement a resource
111
- iterator for this command.
112
-
113
- .. code-block:: php
114
-
115
- namespace MyService\Model;
116
-
117
- use Guzzle\Service\Resource\ResourceIterator;
118
-
119
- /**
120
- * Iterate over a get_users command
121
- */
122
- class GetUsersIterator extends ResourceIterator
123
- {
124
- protected function sendRequest()
125
- {
126
- // If a next token is set, then add it to the command
127
- if ($this->nextToken) {
128
- $this->command->set('next_user', $this->nextToken);
129
- }
130
-
131
- // Execute the command and parse the result
132
- $result = $this->command->execute();
133
-
134
- // Parse the next token
135
- $this->nextToken = isset($result['next_user']) ? $result['next_user'] : false;
136
-
137
- return $result['users'];
138
- }
139
- }
140
-
141
- As you can see, it's pretty simple to implement an iterator. There are a few things that you should notice from this
142
- example:
143
-
144
- 1. You do not need to create a new command in the ``sendRequest()`` method. A new command object is cloned from the
145
- original command passed into the constructor of the iterator before the ``sendRequest()`` method is called.
146
- Remember that the resource iterator expects a command that has not been executed.
147
- 2. When the ``sendRequest()`` method is first called, you will not have a ``$this->nextToken`` value, so always check
148
- before setting it on a command. Notice that the next token is being updated each time a request is sent.
149
- 3. After fetching more resources from the service, always return an array of resources.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst DELETED
@@ -1,18 +0,0 @@
1
- ============
2
- Async plugin
3
- ============
4
-
5
- The AsyncPlugin allows you to send requests that do not wait on a response. This is handled through cURL by utilizing
6
- the progress event. When a request has sent all of its data to the remote server, Guzzle adds a 1ms timeout on the
7
- request and instructs cURL to not download the body of the response. The async plugin then catches the exception and
8
- adds a mock response to the request, along with an X-Guzzle-Async header to let you know that the response was not
9
- fully downloaded.
10
-
11
- .. code-block:: php
12
-
13
- use Guzzle\Http\Client;
14
- use Guzzle\Plugin\Async\AsyncPlugin;
15
-
16
- $client = new Client('http://www.example.com');
17
- $client->addSubscriber(new AsyncPlugin());
18
- $response = $client->get()->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst DELETED
@@ -1,22 +0,0 @@
1
- ====================
2
- Backoff retry plugin
3
- ====================
4
-
5
- The ``Guzzle\Plugin\Backoff\BackoffPlugin`` automatically retries failed HTTP requests using custom backoff strategies:
6
-
7
- .. code-block:: php
8
-
9
- use Guzzle\Http\Client;
10
- use Guzzle\Plugin\Backoff\BackoffPlugin;
11
-
12
- $client = new Client('http://www.test.com/');
13
- // Use a static factory method to get a backoff plugin using the exponential backoff strategy
14
- $backoffPlugin = BackoffPlugin::getExponentialBackoff();
15
-
16
- // Add the backoff plugin to the client object
17
- $client->addSubscriber($backoffPlugin);
18
-
19
- The BackoffPlugin's constructor accepts a ``Guzzle\Plugin\Backoff\BackoffStrategyInterface`` object that is used to
20
- determine when a retry should be issued and how long to delay between retries. The above code example shows how to
21
- attach a BackoffPlugin to a client that is pre-configured to retry failed 500 and 503 responses using truncated
22
- exponential backoff (emulating the behavior of Guzzle 2's ExponentialBackoffPlugin).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/cache-plugin.rst DELETED
@@ -1,169 +0,0 @@
1
- =================
2
- HTTP Cache plugin
3
- =================
4
-
5
- Guzzle can leverage HTTP's caching specifications using the ``Guzzle\Plugin\Cache\CachePlugin``. The CachePlugin
6
- provides a private transparent proxy cache that caches HTTP responses. The caching logic, based on
7
- `RFC 2616 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html>`_, uses HTTP headers to control caching behavior,
8
- cache lifetime, and supports Vary, ETag, and Last-Modified based revalidation:
9
-
10
- .. code-block:: php
11
-
12
- use Guzzle\Http\Client;
13
- use Doctrine\Common\Cache\FilesystemCache;
14
- use Guzzle\Cache\DoctrineCacheAdapter;
15
- use Guzzle\Plugin\Cache\CachePlugin;
16
- use Guzzle\Plugin\Cache\DefaultCacheStorage;
17
-
18
- $client = new Client('http://www.test.com/');
19
-
20
- $cachePlugin = new CachePlugin(array(
21
- 'storage' => new DefaultCacheStorage(
22
- new DoctrineCacheAdapter(
23
- new FilesystemCache('/path/to/cache/files')
24
- )
25
- )
26
- ));
27
-
28
- // Add the cache plugin to the client object
29
- $client->addSubscriber($cachePlugin);
30
- $client->get('http://www.wikipedia.org/')->send();
31
-
32
- // The next request will revalidate against the origin server to see if it
33
- // has been modified. If a 304 response is received the response will be
34
- // served from cache
35
- $client->get('http://www.wikipedia.org/')->send();
36
-
37
- The cache plugin intercepts GET and HEAD requests before they are actually transferred to the origin server. The cache
38
- plugin then generates a hash key based on the request method and URL, and checks to see if a response exists in the cache. If
39
- a response exists in the cache, the cache adapter then checks to make sure that the caching rules associated with the response
40
- satisfy the request, and ensures that response still fresh. If the response is acceptable for the request any required
41
- revalidation, then the cached response is served instead of contacting the origin server.
42
-
43
- Vary
44
- ----
45
-
46
- Cache keys are derived from a request method and a request URL. Multiple responses can map to the same cache key and
47
- stored in Guzzle's underlying cache storage object. You should use the ``Vary`` HTTP header to tell the cache storage
48
- object that the cache response must have been cached for a request that matches the headers specified in the Vary header
49
- of the request. This allows you to have specific cache entries for the same request URL but variations in a request's
50
- headers determine which cache entry is served. Please see the http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44
51
- for more information.
52
-
53
- Cache options
54
- -------------
55
-
56
- There are several options you can add to requests or clients to modify the behavior of the cache plugin.
57
-
58
- Override cache TTL
59
- ~~~~~~~~~~~~~~~~~~
60
-
61
- You can override the number of seconds a cacheable response is stored in the cache by setting the
62
- ``cache.override_ttl`` parameter on the params object of a request:
63
-
64
- .. code-block:: php
65
-
66
- // If the response to the request is cacheable, then the response will be cached for 100 seconds
67
- $request->getParams()->set('cache.override_ttl', 100);
68
-
69
- If a response doesn't specify any freshness policy, it will be kept in cache for 3600 seconds by default.
70
-
71
- Custom caching decision
72
- ~~~~~~~~~~~~~~~~~~~~~~~
73
-
74
- If the service you are interacting with does not return caching headers or returns responses that are normally
75
- something that would not be cached, you can set a custom ``can_cache`` object on the constructor of the CachePlugin
76
- and provide a ``Guzzle\Plugin\Cache\CanCacheInterface`` object. You can use the
77
- ``Guzzle\Plugin\Cache\CallbackCanCacheStrategy`` to easily make a caching decision based on an HTTP request and
78
- response.
79
-
80
- Revalidation options
81
- ~~~~~~~~~~~~~~~~~~~~
82
-
83
- You can change the revalidation behavior of a request using the ``cache.revalidate`` parameter. Setting this
84
- parameter to ``never`` will ensure that a revalidation request is never sent, and the response is always served from
85
- the origin server. Setting this parameter to ``skip`` will never revalidate and uses the response stored in the cache.
86
-
87
- Normalizing requests for caching
88
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
-
90
- Use the ``cache.key_filter`` parameter if you wish to strip certain query string parameters from your
91
- request before creating a unique hash for the request. This parameter can be useful if your requests have query
92
- string values that cause each request URL to be unique (thus preventing a cache hit). The ``cache.key_filter``
93
- format is simply a comma separated list of query string values to remove from the URL when creating a cache key.
94
- For example, here we are saying that the ``a`` and ``q`` query string variables should be ignored when generating a
95
- cache key for the request:
96
-
97
- .. code-block:: php
98
-
99
- $request->getParams()->set('cache.key_filter', 'a, q');
100
-
101
- Other options
102
- ~~~~~~~~~~~~~
103
-
104
- There are many other options available to the CachePlugin that can meet almost any caching requirement, including
105
- custom revalidation implementations, custom cache key generators, custom caching decision strategies, and custom
106
- cache storage objects. Take a look the constructor of ``Guzzle\Plugin\Cache\CachePlugin`` for more information.
107
-
108
- Setting Client-wide cache settings
109
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
-
111
- You can specify cache settings for every request created by a client by adding cache settings to the configuration
112
- options of a client.
113
-
114
- .. code-block:: php
115
-
116
- $client = new Guzzle\Http\Client('http://www.test.com', array(
117
- 'request.params' => array(
118
- 'cache.override_ttl' => 3600,
119
- 'params.cache.revalidate' => 'never'
120
- )
121
- ));
122
-
123
- echo $client->get('/')->getParams()->get('cache.override_ttl');
124
- // >>> 3600
125
-
126
- echo $client->get('/')->getParams()->get('cache.revalidate');
127
- // >>> never
128
-
129
- Cache revalidation
130
- ------------------
131
-
132
- If the cache plugin determines that a response to a GET request needs revalidation, a conditional GET is transferred
133
- to the origin server. If the origin server returns a 304 response, then a response containing the merged headers of
134
- the cached response with the new response and the entity body of the cached response is returned. Custom revalidation
135
- strategies can be injected into a CachePlugin if needed.
136
-
137
- Cache adapters
138
- --------------
139
-
140
- Guzzle doesn't try to reinvent the wheel when it comes to caching or logging. Plenty of other frameworks have
141
- excellent solutions in place that you are probably already using in your applications. Guzzle uses adapters for
142
- caching and logging. The cache plugin requires a cache adapter so that is can store responses in a cache. Guzzle
143
- currently supports cache adapters for `Doctrine 2.0 <http://www.doctrine-project.org/>`_ and the
144
- `Zend Framework <http://framework.zend.com>`_.
145
-
146
- Doctrine cache adapter
147
- ~~~~~~~~~~~~~~~~~~~~~~
148
-
149
- .. code-block:: php
150
-
151
- use Doctrine\Common\Cache\ArrayCache;
152
- use Guzzle\Cache\DoctrineCacheAdapter;
153
- use Guzzle\Plugin\Cache\CachePlugin;
154
-
155
- $backend = new ArrayCache();
156
- $adapter = new DoctrineCacheAdapter($backend);
157
- $cache = new CachePlugin($adapter);
158
-
159
- Zend Framework cache adapter
160
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161
-
162
- .. code-block:: php
163
-
164
- use Guzzle\Cache\ZendCacheAdapter;
165
- use Zend\Cache\Backend\TestBackend;
166
-
167
- $backend = new TestBackend();
168
- $adapter = new ZendCacheAdapter($backend);
169
- $cache = new CachePlugin($adapter);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst DELETED
@@ -1,33 +0,0 @@
1
- =============
2
- Cookie plugin
3
- =============
4
-
5
- Some web services require a Cookie in order to maintain a session. The ``Guzzle\Plugin\Cookie\CookiePlugin`` will add
6
- cookies to requests and parse cookies from responses using a CookieJar object:
7
-
8
- .. code-block:: php
9
-
10
- use Guzzle\Http\Client;
11
- use Guzzle\Plugin\Cookie\CookiePlugin;
12
- use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar;
13
-
14
- $cookiePlugin = new CookiePlugin(new ArrayCookieJar());
15
-
16
- // Add the cookie plugin to a client
17
- $client = new Client('http://www.test.com/');
18
- $client->addSubscriber($cookiePlugin);
19
-
20
- // Send the request with no cookies and parse the returned cookies
21
- $client->get('http://www.yahoo.com/')->send();
22
-
23
- // Send the request again, noticing that cookies are being sent
24
- $request = $client->get('http://www.yahoo.com/');
25
- $request->send();
26
-
27
- echo $request;
28
-
29
- You can disable cookies per-request by setting the ``cookies.disable`` value to true on a request's params object.
30
-
31
- .. code-block:: php
32
-
33
- $request->getParams()->set('cookies.disable', true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/creating-plugins.rst DELETED
@@ -1,93 +0,0 @@
1
- ================
2
- Creating plugins
3
- ================
4
-
5
- .. highlight:: php
6
-
7
- Guzzle is extremely extensible because of the behavioral modifications that can be added to requests, clients, and
8
- commands using an event system. Before and after the majority of actions are taken in the library, an event is emitted
9
- with the name of the event and context surrounding the event. Observers can subscribe to a subject and modify the
10
- subject based on the events received. Guzzle's event system utilizes the Symfony2 EventDispatcher and is the backbone
11
- of its plugin architecture.
12
-
13
- Overview
14
- --------
15
-
16
- Plugins must implement the ``Symfony\Component\EventDispatcher\EventSubscriberInterface`` interface. The
17
- ``EventSubscriberInterface`` requires that your class implements a static method, ``getSubscribedEvents()``, that
18
- returns an associative array mapping events to methods on the object. See the
19
- `Symfony2 documentation <http://symfony.com/doc/2.0/book/internals.html#the-event-dispatcher>`_ for more information.
20
-
21
- Plugins can be attached to any subject, or object in Guzzle that implements that
22
- ``Guzzle\Common\HasDispatcherInterface``.
23
-
24
- Subscribing to a subject
25
- ~~~~~~~~~~~~~~~~~~~~~~~~
26
-
27
- You can subscribe an instantiated observer to an event by calling ``addSubscriber`` on a subject.
28
-
29
- .. code-block:: php
30
-
31
- $testPlugin = new TestPlugin();
32
- $client->addSubscriber($testPlugin);
33
-
34
- You can also subscribe to only specific events using a closure::
35
-
36
- $client->getEventDispatcher()->addListener('request.create', function(Event $event) {
37
- echo $event->getName();
38
- echo $event['request'];
39
- });
40
-
41
- ``Guzzle\Common\Event`` objects are passed to notified functions. The Event object has a ``getName()`` method which
42
- return the name of the emitted event and may contain contextual information that can be accessed like an array.
43
-
44
- Knowing what events to listen to
45
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
-
47
- Any class that implements the ``Guzzle\Common\HasDispatcherInterface`` must implement a static method,
48
- ``getAllEvents()``, that returns an array of the events that are emitted from the object. You can browse the source
49
- to see each event, or you can call the static method directly in your code to get a list of available events.
50
-
51
- Event hooks
52
- -----------
53
-
54
- * :ref:`client-events`
55
- * :ref:`service-client-events`
56
- * :ref:`request-events`
57
- * ``Guzzle\Http\Curl\CurlMulti``:
58
- * :ref:`service-builder-events`
59
-
60
- Examples of the event system
61
- ----------------------------
62
-
63
- Simple Echo plugin
64
- ~~~~~~~~~~~~~~~~~~
65
-
66
- This simple plugin prints a string containing the request that is about to be sent by listening to the
67
- ``request.before_send`` event::
68
-
69
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
70
-
71
- class EchoPlugin implements EventSubscriberInterface
72
- {
73
- public static function getSubscribedEvents()
74
- {
75
- return array('request.before_send' => 'onBeforeSend');
76
- }
77
-
78
- public function onBeforeSend(Guzzle\Common\Event $event)
79
- {
80
- echo 'About to send a request: ' . $event['request'] . "\n";
81
- }
82
- }
83
-
84
- $client = new Guzzle\Service\Client('http://www.test.com/');
85
-
86
- // Create the plugin and add it as an event subscriber
87
- $plugin = new EchoPlugin();
88
- $client->addSubscriber($plugin);
89
-
90
- // Send a request and notice that the request is printed to the screen
91
- $client->get('/')->send();
92
-
93
- Running the above code will print a string containing the HTTP request that is about to be sent.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst DELETED
@@ -1,32 +0,0 @@
1
- ==========================
2
- cURL authentication plugin
3
- ==========================
4
-
5
- .. warning::
6
-
7
- The CurlAuthPlugin is deprecated. You should use the `auth` parameter of a client to add authorization headers to
8
- every request created by a client.
9
-
10
- .. code-block:: php
11
-
12
- $client->setDefaultOption('auth', array('username', 'password', 'Basic|Digest|NTLM|Any'));
13
-
14
- If your web service client requires basic authorization, then you can use the CurlAuthPlugin to easily add an
15
- Authorization header to each request sent by the client.
16
-
17
- .. code-block:: php
18
-
19
- use Guzzle\Http\Client;
20
- use Guzzle\Plugin\CurlAuth\CurlAuthPlugin;
21
-
22
- $client = new Client('http://www.test.com/');
23
-
24
- // Add the auth plugin to the client object
25
- $authPlugin = new CurlAuthPlugin('username', 'password');
26
- $client->addSubscriber($authPlugin);
27
-
28
- $response = $client->get('projects/1/people')->send();
29
- $xml = new SimpleXMLElement($response->getBody(true));
30
- foreach ($xml->person as $person) {
31
- echo $person->email . "\n";
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst DELETED
@@ -1,24 +0,0 @@
1
- ==============
2
- History plugin
3
- ==============
4
-
5
- The history plugin tracks all of the requests and responses sent through a request or client. This plugin can be
6
- useful for crawling or unit testing. By default, the history plugin stores up to 10 requests and responses.
7
-
8
- .. code-block:: php
9
-
10
- use Guzzle\Http\Client;
11
- use Guzzle\Plugin\History\HistoryPlugin;
12
-
13
- $client = new Client('http://www.test.com/');
14
-
15
- // Add the history plugin to the client object
16
- $history = new HistoryPlugin();
17
- $history->setLimit(5);
18
- $client->addSubscriber($history);
19
-
20
- $client->get('http://www.yahoo.com/')->send();
21
-
22
- echo $history->getLastRequest();
23
- echo $history->getLastResponse();
24
- echo count($history);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/log-plugin.rst DELETED
@@ -1,69 +0,0 @@
1
- ==========
2
- Log plugin
3
- ==========
4
-
5
- Use the ``Guzzle\Plugin\Log\LogPlugin`` to view all data sent over the wire, including entity bodies and redirects.
6
-
7
- .. code-block:: php
8
-
9
- use Guzzle\Http\Client;
10
- use Guzzle\Log\Zf1LogAdapter;
11
- use Guzzle\Plugin\Log\LogPlugin;
12
- use Guzzle\Log\MessageFormatter;
13
-
14
- $client = new Client('http://www.test.com/');
15
-
16
- $adapter = new Zf1LogAdapter(
17
- new \Zend_Log(new \Zend_Log_Writer_Stream('php://output'))
18
- );
19
- $logPlugin = new LogPlugin($adapter, MessageFormatter::DEBUG_FORMAT);
20
-
21
- // Attach the plugin to the client, which will in turn be attached to all
22
- // requests generated by the client
23
- $client->addSubscriber($logPlugin);
24
-
25
- $response = $client->get('http://google.com')->send();
26
-
27
- The code sample above wraps a ``Zend_Log`` object using a ``Guzzle\Log\Zf1LogAdapter``. After attaching the plugin to
28
- the client, all data sent over the wire will be logged to stdout.
29
-
30
- The first argument of the LogPlugin's constructor accepts a ``Guzzle\Log\LogAdapterInterface`` object. This object is
31
- an adapter that allows you to use the logging capabilities of your favorite log implementation. The second argument of
32
- the constructor accepts a ``Guzzle\Log\MessageFormatter`` or a log messaged format string. The format string uses
33
- variable substitution and allows you to define the log data that is important to your application. The different
34
- variables that can be injected are as follows:
35
-
36
- ================== ====================================================================================
37
- Variable Substitution
38
- ================== ====================================================================================
39
- {request} Full HTTP request message
40
- {response} Full HTTP response message
41
- {ts} Timestamp
42
- {host} Host of the request
43
- {method} Method of the request
44
- {url} URL of the request
45
- {host} Host of the request
46
- {protocol} Request protocol
47
- {version} Protocol version
48
- {resource} Resource of the request (path + query + fragment)
49
- {port} Port of the request
50
- {hostname} Hostname of the machine that sent the request
51
- {code} Status code of the response (if available)
52
- {phrase} Reason phrase of the response (if available)
53
- {curl_error} Curl error message (if available)
54
- {curl_code} Curl error code (if available)
55
- {curl_stderr} Curl standard error (if available)
56
- {connect_time} Time in seconds it took to establish the connection (if available)
57
- {total_time} Total transaction time in seconds for last transfer (if available)
58
- {req_header_*} Replace `*` with the lowercased name of a request header to add to the message
59
- {res_header_*} Replace `*` with the lowercased name of a response header to add to the message
60
- {req_body} Request body
61
- {res_body} Response body
62
- ================== ====================================================================================
63
-
64
- The LogPlugin has a helper method that can be used when debugging that will output the full HTTP request and
65
- response of a transaction:
66
-
67
- .. code-block:: php
68
-
69
- $client->addSubscriber(LogPlugin::getDebugPlugin());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst DELETED
@@ -1,29 +0,0 @@
1
- ====================
2
- MD5 validator plugin
3
- ====================
4
-
5
- Entity bodies can sometimes be modified over the wire due to a faulty TCP transport or misbehaving proxy. If an HTTP
6
- response contains a Content-MD5 header, then a MD5 hash of the entity body of a response can be compared against the
7
- Content-MD5 header of the response to determine if the response was delivered intact. The
8
- ``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` will throw an ``UnexpectedValueException`` if the calculated MD5 hash does
9
- not match the Content-MD5 header value:
10
-
11
- .. code-block:: php
12
-
13
- use Guzzle\Http\Client;
14
- use Guzzle\Plugin\Md5\Md5ValidatorPlugin;
15
-
16
- $client = new Client('http://www.test.com/');
17
-
18
- $md5Plugin = new Md5ValidatorPlugin();
19
-
20
- // Add the md5 plugin to the client object
21
- $client->addSubscriber($md5Plugin);
22
-
23
- $request = $client->get('http://www.yahoo.com/');
24
- $request->send();
25
-
26
- Calculating the MD5 hash of a large entity body or an entity body that was transferred using a Content-Encoding is an
27
- expensive operation. When working in high performance applications, you might consider skipping the MD5 hash
28
- validation for entity bodies bigger than a certain size or Content-Encoded entity bodies
29
- (see ``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` for more information).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst DELETED
@@ -1,27 +0,0 @@
1
- ===========
2
- Mock plugin
3
- ===========
4
-
5
- The mock plugin is useful for testing Guzzle clients. The mock plugin allows you to queue an array of responses that
6
- will satisfy requests sent from a client by consuming the request queue in FIFO order.
7
-
8
- .. code-block:: php
9
-
10
- use Guzzle\Http\Client;
11
- use Guzzle\Plugin\Mock\MockPlugin;
12
- use Guzzle\Http\Message\Response;
13
-
14
- $client = new Client('http://www.test.com/');
15
-
16
- $mock = new MockPlugin();
17
- $mock->addResponse(new Response(200))
18
- ->addResponse(new Response(404));
19
-
20
- // Add the mock plugin to the client object
21
- $client->addSubscriber($mock);
22
-
23
- // The following request will receive a 200 response from the plugin
24
- $client->get('http://www.example.com/')->send();
25
-
26
- // The following request will receive a 404 response from the plugin
27
- $client->get('http://www.test.com/')->send();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst DELETED
@@ -1,30 +0,0 @@
1
- ============
2
- OAuth plugin
3
- ============
4
-
5
- Guzzle ships with an OAuth 1.0 plugin that can sign requests using a consumer key, consumer secret, OAuth token,
6
- and OAuth secret. Here's an example showing how to send an authenticated request to the Twitter REST API:
7
-
8
- .. code-block:: php
9
-
10
- use Guzzle\Http\Client;
11
- use Guzzle\Plugin\Oauth\OauthPlugin;
12
-
13
- $client = new Client('http://api.twitter.com/1');
14
- $oauth = new OauthPlugin(array(
15
- 'consumer_key' => 'my_key',
16
- 'consumer_secret' => 'my_secret',
17
- 'token' => 'my_token',
18
- 'token_secret' => 'my_token_secret'
19
- ));
20
- $client->addSubscriber($oauth);
21
-
22
- $response = $client->get('statuses/public_timeline.json')->send();
23
-
24
- If you need to use a custom signing method, you can pass a ``signature_method`` configuration option in the
25
- constructor of the OAuth plugin. The ``signature_method`` option must be a callable variable that accepts a string to
26
- sign and signing key and returns a signed string.
27
-
28
- .. note::
29
-
30
- You can omit the ``token`` and ``token_secret`` options to use two-legged OAuth.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc DELETED
@@ -1,9 +0,0 @@
1
- * :doc:`/plugins/async-plugin`
2
- * :doc:`/plugins/backoff-plugin`
3
- * :doc:`/plugins/cache-plugin`
4
- * :doc:`/plugins/cookie-plugin`
5
- * :doc:`/plugins/history-plugin`
6
- * :doc:`/plugins/log-plugin`
7
- * :doc:`/plugins/md5-validator-plugin`
8
- * :doc:`/plugins/mock-plugin`
9
- * :doc:`/plugins/oauth-plugin`
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/plugins/plugins-overview.rst DELETED
@@ -1,59 +0,0 @@
1
- ======================
2
- Plugin system overview
3
- ======================
4
-
5
- The workflow of sending a request and parsing a response is driven by Guzzle's event system, which is powered by the
6
- `Symfony2 Event Dispatcher component <http://symfony.com/doc/current/components/event_dispatcher/introduction.html>`_.
7
-
8
- Any object in Guzzle that emits events will implement the ``Guzzle\Common\HasEventDispatcher`` interface. You can add
9
- event subscribers directly to these objects using the ``addSubscriber()`` method, or you can grab the
10
- ``Symfony\Component\EventDispatcher\EventDispatcher`` object owned by the object using ``getEventDispatcher()`` and
11
- add a listener or event subscriber.
12
-
13
- Adding event subscribers to clients
14
- -----------------------------------
15
-
16
- Any event subscriber or event listener attached to the EventDispatcher of a ``Guzzle\Http\Client`` or
17
- ``Guzzle\Service\Client`` object will automatically be attached to all request objects created by the client. This
18
- allows you to attach, for example, a HistoryPlugin to a client object, and from that point on, every request sent
19
- through that client will utilize the HistoryPlugin.
20
-
21
- .. code-block:: php
22
-
23
- use Guzzle\Plugin\History\HistoryPlugin;
24
- use Guzzle\Service\Client;
25
-
26
- $client = new Client();
27
-
28
- // Create a history plugin and attach it to the client
29
- $history = new HistoryPlugin();
30
- $client->addSubscriber($history);
31
-
32
- // Create and send a request. This request will also utilize the HistoryPlugin
33
- $client->get('http://httpbin.org')->send();
34
-
35
- // Echo out the last sent request by the client
36
- echo $history->getLastRequest();
37
-
38
- .. tip::
39
-
40
- :doc:`Create event subscribers <creating-plugins>`, or *plugins*, to implement reusable logic that can be
41
- shared across clients. Event subscribers are also easier to test than anonymous functions.
42
-
43
- Pre-Built plugins
44
- -----------------
45
-
46
- Guzzle provides easy to use request plugins that add behavior to requests based on signal slot event notifications
47
- powered by the Symfony2 Event Dispatcher component.
48
-
49
- * :doc:`async-plugin`
50
- * :doc:`backoff-plugin`
51
- * :doc:`cache-plugin`
52
- * :doc:`cookie-plugin`
53
- * :doc:`curl-auth-plugin`
54
- * :doc:`history-plugin`
55
- * :doc:`log-plugin`
56
- * :doc:`md5-validator-plugin`
57
- * :doc:`mock-plugin`
58
- * :doc:`oauth-plugin`
59
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/requirements.txt DELETED
@@ -1,2 +0,0 @@
1
- Sphinx>=1.2b1
2
- guzzle_sphinx_theme>=0.5.0
 
 
trunk/vendor/guzzle/guzzle/docs/testing/unit-testing.rst DELETED
@@ -1,201 +0,0 @@
1
- ===========================
2
- Unit Testing Guzzle clients
3
- ===========================
4
-
5
- Guzzle provides several tools that will enable you to easily unit test your web service clients.
6
-
7
- * PHPUnit integration
8
- * Mock responses
9
- * node.js web server for integration testing
10
-
11
- PHPUnit integration
12
- -------------------
13
-
14
- Guzzle is unit tested using `PHPUnit <http://www.phpunit.de/>`_. Your web service client's unit tests should extend
15
- ``Guzzle\Tests\GuzzleTestCase`` so that you can take advantage of some of the built in helpers.
16
-
17
- In order to unit test your client, a developer would need to copy phpunit.xml.dist to phpunit.xml and make any needed
18
- modifications. As a best practice and security measure for you and your contributors, it is recommended to add an
19
- ignore statement to your SCM so that phpunit.xml is ignored.
20
-
21
- Bootstrapping
22
- ~~~~~~~~~~~~~
23
-
24
- Your web service client should have a tests/ folder that contains a bootstrap.php file. The bootstrap.php file
25
- responsible for autoloading and configuring a ``Guzzle\Service\Builder\ServiceBuilder`` that is used throughout your
26
- unit tests for loading a configured client. You can add custom parameters to your phpunit.xml file that expects users
27
- to provide the path to their configuration data.
28
-
29
- .. code-block:: php
30
-
31
- Guzzle\Tests\GuzzleTestCase::setServiceBuilder(Aws\Common\Aws::factory($_SERVER['CONFIG']));
32
-
33
- Guzzle\Tests\GuzzleTestCase::setServiceBuilder(Guzzle\Service\Builder\ServiceBuilder::factory(array(
34
- 'test.unfuddle' => array(
35
- 'class' => 'Guzzle.Unfuddle.UnfuddleClient',
36
- 'params' => array(
37
- 'username' => 'test_user',
38
- 'password' => '****',
39
- 'subdomain' => 'test'
40
- )
41
- )
42
- )));
43
-
44
- The above code registers a service builder that can be used throughout your unit tests. You would then be able to
45
- retrieve an instantiated and configured Unfuddle client by calling ``$this->getServiceBuilder()->get('test.unfuddle)``.
46
- The above code assumes that ``$_SERVER['CONFIG']`` contains the path to a file that stores service description
47
- configuration.
48
-
49
- Unit testing remote APIs
50
- ------------------------
51
-
52
- Mock responses
53
- ~~~~~~~~~~~~~~
54
-
55
- One of the benefits of unit testing is the ability to quickly determine if there are errors in your code. If your
56
- unit tests run slowly, then they become tedious and will likely be run less frequently. Guzzle's philosophy on unit
57
- testing web service clients is that no network access should be required to run the unit tests. This means that
58
- responses are served from mock responses or local servers. By adhering to this principle, tests will run much faster
59
- and will not require an external resource to be available. The problem with this approach is that your mock responses
60
- must first be gathered and then subsequently updated each time the remote API changes.
61
-
62
- Integration testing over the internet
63
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
-
65
- You can perform integration testing with a web service over the internet by making calls directly to the service. If
66
- the web service you are requesting uses a complex signing algorithm or some other specific implementation, then you
67
- may want to include at least one actual network test that can be run specifically through the command line using
68
- `PHPUnit group annotations <http://www.phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group>`_.
69
-
70
- @group internet annotation
71
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
72
-
73
- When creating tests that require an internet connection, it is recommended that you add ``@group internet`` annotations
74
- to your unit tests to specify which tests require network connectivity.
75
-
76
- You can then `run PHPUnit tests <http://www.phpunit.de/manual/current/en/textui.html>`_ that exclude the @internet
77
- group by running ``phpunit --exclude-group internet``.
78
-
79
- API credentials
80
- ^^^^^^^^^^^^^^^
81
-
82
- If API credentials are required to run your integration tests, you must add ``<php>`` parameters to your
83
- phpunit.xml.dist file and extract these parameters in your bootstrap.php file.
84
-
85
- .. code-block:: xml
86
-
87
- <?xml version="1.0" encoding="UTF-8"?>
88
- <phpunit bootstrap="./tests/bootstrap.php" colors="true">
89
- <php>
90
- <!-- Specify the path to a service configuration file -->
91
- <server name="CONFIG" value="test_services.json" />
92
- <!-- Or, specify each require parameter individually -->
93
- <server name="API_USER" value="change_me" />
94
- <server name="API_PASSWORD" value="****" />
95
- </php>
96
- <testsuites>
97
- <testsuite name="guzzle-service">
98
- <directory suffix="Test.php">./Tests</directory>
99
- </testsuite>
100
- </testsuites>
101
- </phpunit>
102
-
103
- You can then extract the ``server`` variables in your bootstrap.php file by grabbing them from the ``$_SERVER``
104
- superglobal: ``$apiUser = $_SERVER['API_USER'];``
105
-
106
- Further reading
107
- ^^^^^^^^^^^^^^^
108
-
109
- A good discussion on the topic of testing remote APIs can be found in Sebastian Bergmann's
110
- `Real-World Solutions for Developing High-Quality PHP Frameworks and Applications <http://www.amazon.com/dp/0470872497>`_.
111
-
112
- Queueing Mock responses
113
- -----------------------
114
-
115
- Mock responses can be used to test if requests are being generated correctly and responses and handled correctly by
116
- your client. Mock responses can be queued up for a client using the ``$this->setMockResponse($client, $path)`` method
117
- of your test class. Pass the client you are adding mock responses to and a single path or array of paths to mock
118
- response files relative to the ``/tests/mock/ folder``. This will queue one or more mock responses for your client by
119
- creating a simple observer on the client. Mock response files must contain a full HTTP response message:
120
-
121
- .. code-block:: none
122
-
123
- HTTP/1.1 200 OK
124
- Date: Wed, 25 Nov 2009 12:00:00 GMT
125
- Connection: close
126
- Server: AmazonS3
127
- Content-Type: application/xml
128
-
129
- <?xml version="1.0" encoding="UTF-8"?>
130
- <LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>
131
-
132
- After queuing mock responses for a client, you can get an array of the requests that were sent by the client that
133
- were issued a mock response by calling ``$this->getMockedRequests()``.
134
-
135
- You can also use the ``Guzzle\Plugin\Mock\MockPlugin`` object directly with your clients.
136
-
137
- .. code-block:: php
138
-
139
- $plugin = new Guzzle\Plugin\Mock\MockPlugin();
140
- $plugin->addResponse(new Guzzle\Http\Message\Response(200));
141
- $client = new Guzzle\Http\Client();
142
- $client->addSubscriber($plugin);
143
-
144
- // The following request will get the mock response from the plugin in FIFO order
145
- $request = $client->get('http://www.test.com/');
146
- $request->send();
147
-
148
- // The MockPlugin maintains a list of requests that were mocked
149
- $this->assertContainsOnly($request, $plugin->getReceivedRequests());
150
-
151
- node.js web server for integration testing
152
- ------------------------------------------
153
-
154
- Using mock responses is usually enough when testing a web service client. If your client needs to add custom cURL
155
- options to requests, then you should use the node.js test web server to ensure that your HTTP request message is
156
- being created correctly.
157
-
158
- Guzzle is based around PHP's libcurl bindings. cURL sometimes modifies an HTTP request message based on
159
- ``CURLOPT_*`` options. Headers that are added to your request by cURL will not be accounted for if you inject mock
160
- responses into your tests. Additionally, some request entity bodies cannot be loaded by the client before transmitting
161
- it to the sever (for example, when using a client as a sort of proxy and streaming content from a remote server). You
162
- might also need to inspect the entity body of a ``multipart/form-data`` POST request.
163
-
164
- .. note::
165
-
166
- You can skip all of the tests that require the node.js test web server by excluding the ``server`` group:
167
- ``phpunit --exclude-group server``
168
-
169
- Using the test server
170
- ~~~~~~~~~~~~~~~~~~~~~
171
-
172
- The node.js test server receives requests and returns queued responses. The test server exposes a simple API that is
173
- used to enqueue responses and inspect the requests that it has received.
174
-
175
- Retrieve the server object by calling ``$this->getServer()``. If the node.js server is not running, it will be
176
- started as a forked process and an object that interfaces with the server will be returned. (note: stopping the
177
- server is handled internally by Guzzle.)
178
-
179
- You can queue an HTTP response or an array of responses by calling ``$this->getServer()->enqueue()``:
180
-
181
- .. code-block:: php
182
-
183
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
184
-
185
- The above code queues a single 200 response with an empty body. Responses are queued using a FIFO order; this
186
- response will be returned by the server when it receives the first request and then removed from the queue. If a
187
- request is received by a server with no queued responses, an exception will be thrown in your unit test.
188
-
189
- You can inspect the requests that the server has retrieved by calling ``$this->getServer()->getReceivedRequests()``.
190
- This method accepts an optional ``$hydrate`` parameter that specifies if you are retrieving an array of string HTTP
191
- requests or an array of ``Guzzle\Http\RequestInterface`` subclassed objects. "Hydrating" the requests will allow
192
- greater flexibility in your unit tests so that you can easily assert the state of the various parts of a request.
193
-
194
- You will need to modify the base_url of your web service client in order to use it against the test server.
195
-
196
- .. code-block:: php
197
-
198
- $client = $this->getServiceBuilder()->get('my_client');
199
- $client->setBaseUrl($this->getServer()->getUrl());
200
-
201
- After running the above code, all calls made from the ``$client`` object will be sent to the test web server.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/webservice-client/guzzle-service-descriptions.rst DELETED
@@ -1,619 +0,0 @@
1
- ===========================
2
- Guzzle service descriptions
3
- ===========================
4
-
5
- Guzzle allows you to serialize HTTP requests and parse HTTP responses using a DSL called a service descriptions.
6
- Service descriptions define web service APIs by documenting each operation, the operation's parameters, validation
7
- options for each parameter, an operation's response, how the response is parsed, and any errors that can be raised for
8
- an operation. Writing a service description for a web service allows you to more quickly consume a web service than
9
- writing concrete commands for each web service operation.
10
-
11
- Guzzle service descriptions can be representing using a PHP array or JSON document. Guzzle's service descriptions are
12
- heavily inspired by `Swagger <http://swagger.wordnik.com/>`_.
13
-
14
- Service description schema
15
- ==========================
16
-
17
- A Guzzle Service description must match the following JSON schema document. This document can also serve as a guide when
18
- implementing a Guzzle service description.
19
-
20
- Download the schema here: :download:`Guzzle JSON schema document </_downloads/guzzle-schema-1.0.json>`
21
-
22
- .. class:: overflow-height-500px
23
-
24
- .. literalinclude:: ../_downloads/guzzle-schema-1.0.json
25
- :language: json
26
-
27
- Top-level attributes
28
- --------------------
29
-
30
- Service descriptions are comprised of the following top-level attributes:
31
-
32
- .. code-block:: json
33
-
34
- {
35
- "name": "string",
36
- "apiVersion": "string|number",
37
- "baseUrl": "string",
38
- "description": "string",
39
- "operations": {},
40
- "models": {},
41
- "includes": ["string.php", "string.json"]
42
- }
43
-
44
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
45
- | Property Name | Value | Description |
46
- +=========================================+=========================+=======================================================================================================================+
47
- | name | string | Name of the web service |
48
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
49
- | apiVersion | string|number | Version identifier that the service description is compatible with |
50
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
51
- | baseUrl or basePath | string | Base URL of the web service. Any relative URI specified in an operation will be merged with the baseUrl using the |
52
- | | | process defined in RFC 2396. Some clients require custom logic to determine the baseUrl. In those cases, it is best |
53
- | | | to not include a baseUrl in the service description, but rather allow the factory method of the client to configure |
54
- | | | the client’s baseUrl. |
55
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
56
- | description | string | Short summary of the web service |
57
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
58
- | operations | object containing | Operations of the service. The key is the name of the operation and value is the attributes of the operation. |
59
- | | :ref:`operation-schema` | |
60
- | | | |
61
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
62
- | models | object containing | Schema models that can be referenced throughout the service description. Models can be used to define how an HTTP |
63
- | | :ref:`model-schema` | response is parsed into a ``Guzzle\Service\Resource\Model`` object when an operation uses a ``model`` ``responseType``|
64
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
65
- | includes | array of .js, | Service description files to include and extend from (can be a .json, .js, or .php file) |
66
- | | .json, or .php | |
67
- | | files. | |
68
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
69
- | (any additional properties) | mixed | Any additional properties specified as top-level attributes are allowed and will be treated as arbitrary data |
70
- +-----------------------------------------+-------------------------+-----------------------------------------------------------------------------------------------------------------------+
71
-
72
- .. _operation-schema:
73
-
74
- Operations
75
- ----------
76
-
77
- Operations are the actions that can be taken on a service. Each operation is given a unique name and has a distinct
78
- endpoint and HTTP method. If an API has a ``DELETE /users/:id`` operation, a satisfactory operation name might be
79
- ``DeleteUser`` with a parameter of ``id`` that is inserted into the URI.
80
-
81
- .. class:: overflow-height-250px
82
-
83
- .. code-block:: json
84
-
85
- {
86
- "operations": {
87
- "operationName": {
88
- "extends": "string",
89
- "httpMethod": "GET|POST|PUT|DELETE|PATCH|string",
90
- "uri": "string",
91
- "summary": "string",
92
- "class": "string",
93
- "responseClass": "string",
94
- "responseNotes": "string",
95
- "type": "string",
96
- "description": "string",
97
- "responseType": "primitive|class|(model by name)|documentation|(string)",
98
- "deprecated": false,
99
- "errorResponses": [
100
- {
101
- "code": 500,
102
- "phrase": "Unexpected Error",
103
- "class": "string"
104
- }
105
- ],
106
- "data": {
107
- "foo": "bar",
108
- "baz": "bam"
109
- },
110
- "parameters": {}
111
- }
112
- }
113
- }
114
-
115
- .. csv-table::
116
- :header: "Property Name", "Value", "Description"
117
- :widths: 20, 15, 65
118
-
119
- "extends", "string", "Extend from another operation by name. The parent operation must be defined before the child."
120
- "httpMethod", "string", "HTTP method used with the operation (e.g. GET, POST, PUT, DELETE, PATCH, etc)"
121
- "uri", "string", "URI of the operation. The uri attribute can contain URI templates. The variables of the URI template are parameters of the operation with a location value of uri"
122
- "summary", "string", "Short summary of what the operation does"
123
- "class", "string", "Custom class to instantiate instead of the default Guzzle\\Service\\Command\\OperationCommand. Using this attribute allows you to define an operation using a service description, but allows more customized logic to be implemented in user-land code."
124
- "responseClass", "string", "Defined what is returned from the method. Can be a primitive, class name, or model name. You can specify the name of a class to return a more customized result from the operation (for example, a domain model object). When using the name of a PHP class, the class must implement ``Guzzle\Service\Command\ResponseClassInterface``."
125
- "responseNotes", "string", "A description of the response returned by the operation"
126
- "responseType", "string", "The type of response that the operation creates: one of primitive, class, model, or documentation. If not specified, this value will be automatically inferred based on whether or not there is a model matching the name, if a matching class name is found, or set to 'primitive' by default."
127
- "deprecated", "boolean", "Whether or not the operation is deprecated"
128
- "errorResponses", "array", "Errors that could occur while executing the operation. Each item of the array is an object that can contain a 'code' (HTTP response status code of the error), 'phrase' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this error is encountered)"
129
- "data", "object", "Any arbitrary data to associate with the operation"
130
- "parameters", "object containing :ref:`parameter-schema` objects", "Parameters of the operation. Parameters are used to define how input data is serialized into a HTTP request."
131
- "additionalParameters", "A single :ref:`parameter-schema` object", "Validation and serialization rules for any parameter supplied to the operation that was not explicitly defined."
132
-
133
- additionalParameters
134
- ~~~~~~~~~~~~~~~~~~~~
135
-
136
- When a webservice offers a large number of parameters that all are set in the same location (for example the query
137
- string or a JSON document), defining each parameter individually can require a lot of time and repetition. Furthermore,
138
- some web services allow for completely arbitrary parameters to be supplied for an operation. The
139
- ``additionalParameters`` attribute can be used to solve both of these issues.
140
-
141
- As an example, we can define a Twitter API operation quite easily using ``additionalParameters``. The
142
- GetMentions operation accepts a large number of query string parameters. Defining each of these parameters
143
- is ideal because it provide much more introspection for the client and opens the possibility to use the description with
144
- other tools (e.g. a documentation generator). However, you can very quickly provide a "catch-all" serialization rule
145
- that will place any custom parameters supplied to an operation the generated request's query string parameters.
146
-
147
- .. class:: overflow-height-250px
148
-
149
- .. code-block:: json
150
-
151
- {
152
- "name": "Twitter",
153
- "apiVersion": "1.1",
154
- "baseUrl": "https://api.twitter.com/1.1",
155
- "operations": {
156
- "GetMentions": {
157
- "httpMethod": "GET",
158
- "uri": "statuses/mentions_timeline.json",
159
- "responseClass": "GetMentionsOutput",
160
- "additionalParameters": {
161
- "location": "query"
162
- }
163
- }
164
- },
165
- "models": {
166
- "GetMentionsOutput": {
167
- "type": "object",
168
- "additionalProperties": {
169
- "location": "json"
170
- }
171
- }
172
- }
173
- }
174
-
175
- responseClass
176
- ~~~~~~~~~~~~~
177
-
178
- The ``responseClass`` attribute is used to define the return value of an operation (what is returned by calling the
179
- ``getResult()`` method of a command object). The value set in the responseClass attribute can be one of "primitive"
180
- (meaning the result with be primitive type like a string), a class name meaning the result will be an instance of a
181
- specific user-land class, or a model name meaning the result will be a ``Guzzle\Service\Resource\Model`` object that
182
- uses a :ref:`model schema <model-schema>` to define how the HTTP response is parsed.
183
-
184
- .. note::
185
-
186
- Using a class name with a ``responseClass`` will only work if it is supported by the ``class`` that is instantiated
187
- for the operation. Keep this in mind when specifying a custom ``class`` attribute that points to a custom
188
- ``Guzzle\Service\Command\CommandInterface`` class. The default ``class``,
189
- ``Guzzle\Service\Command\OperationCommand``, does support setting custom ``class`` attributes.
190
-
191
- You can specify the name of a class to return a more customized result from the operation (for example, a domain model
192
- object). When using the name of a PHP class, the class must implement ``Guzzle\Service\Command\ResponseClassInterface``.
193
- Here's a very simple example of implementing a custom responseClass object.
194
-
195
- .. code-block:: json
196
-
197
- {
198
- "operations": {
199
- "test": {
200
- "responseClass": "MyApplication\\User"
201
- }
202
- }
203
- }
204
-
205
- .. code-block:: php
206
-
207
- namespace MyApplication;
208
-
209
- use Guzzle\Service\Command\ResponseClassInterface;
210
- use Guzzle\Service\Command\OperationCommand;
211
-
212
- class User implements ResponseClassInterface
213
- {
214
- protected $name;
215
-
216
- public static function fromCommand(OperationCommand $command)
217
- {
218
- $response = $command->getResponse();
219
- $xml = $command->xml();
220
-
221
- return new self((string) $xml->name);
222
- }
223
-
224
- public function __construct($name)
225
- {
226
- $this->name = $name;
227
- }
228
- }
229
-
230
- errorResponses
231
- ~~~~~~~~~~~~~~
232
-
233
- ``errorResponses`` is an array containing objects that define the errors that could occur while executing the
234
- operation. Each item of the array is an object that can contain a 'code' (HTTP response status code of the error),
235
- 'phrase' (reason phrase or description of the error), and 'class' (an exception class that will be raised when this
236
- error is encountered).
237
-
238
- ErrorResponsePlugin
239
- ^^^^^^^^^^^^^^^^^^^
240
-
241
- Error responses are by default only used for documentation. If you don't need very complex exception logic for your web
242
- service errors, then you can use the ``Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin`` to automatically throw defined
243
- exceptions when one of the ``errorResponse`` rules are matched. The error response plugin will listen for the
244
- ``request.complete`` event of a request created by a command object. Every response (including a successful response) is
245
- checked against the list of error responses for an exact match using the following order of checks:
246
-
247
- 1. Does the errorResponse have a defined ``class``?
248
- 2. Is the errorResponse ``code`` equal to the status code of the response?
249
- 3. Is the errorResponse ``phrase`` equal to the reason phrase of the response?
250
- 4. Throw the exception stored in the ``class`` attribute of the errorResponse.
251
-
252
- The ``class`` attribute must point to a class that implements
253
- ``Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface``. This interface requires that an error response class
254
- implements ``public static function fromCommand(CommandInterface $command, Response $response)``. This method must
255
- return an object that extends from ``\Exception``. After an exception is returned, it is thrown by the plugin.
256
-
257
- .. _parameter-schema:
258
-
259
- Parameter schema
260
- ----------------
261
-
262
- Parameters in both operations and models are represented using the
263
- `JSON schema <http://tools.ietf.org/id/draft-zyp-json-schema-04.html>`_ syntax.
264
-
265
- .. csv-table::
266
- :header: "Property Name", "Value", "Description"
267
- :widths: 20, 15, 65
268
-
269
- "name", "string", "Unique name of the parameter"
270
- "type", "string|array", "Type of variable (string, number, integer, boolean, object, array, numeric, null, any). Types are using for validation and determining the structure of a parameter. You can use a union type by providing an array of simple types. If one of the union types matches the provided value, then the value is valid."
271
- "instanceOf", "string", "When the type is an object, you can specify the class that the object must implement"
272
- "required", "boolean", "Whether or not the parameter is required"
273
- "default", "mixed", "Default value to use if no value is supplied"
274
- "static", "boolean", "Set to true to specify that the parameter value cannot be changed from the default setting"
275
- "description", "string", "Documentation of the parameter"
276
- "location", "string", "The location of a request used to apply a parameter. Custom locations can be registered with a command, but the defaults are uri, query, statusCode, reasonPhrase, header, body, json, xml, postField, postFile, responseBody"
277
- "sentAs", "string", "Specifies how the data being modeled is sent over the wire. For example, you may wish to include certain headers in a response model that have a normalized casing of FooBar, but the actual header is x-foo-bar. In this case, sentAs would be set to x-foo-bar."
278
- "filters", "array", "Array of functions to to run a parameter value through."
279
-
280
- filters
281
- ~~~~~~~
282
-
283
- Each value in the array must be a string containing the full class path to a static method or an array of complex
284
- filter information. You can specify static methods of classes using the full namespace class name followed by
285
- "::" (e.g. ``FooBar::baz()``). Some filters require arguments in order to properly filter a value. For complex filters,
286
- use an object containing a ``method`` attribute pointing to a function, and an ``args`` attribute containing an
287
- array of positional arguments to pass to the function. Arguments can contain keywords that are replaced when filtering
288
- a value: ``@value`` is replaced with the value being filtered, and ``@api`` is replaced with the actual Parameter
289
- object.
290
-
291
- .. code-block:: json
292
-
293
- {
294
- "filters": [
295
- "strtolower",
296
- {
297
- "method": "MyClass::convertString",
298
- "args": [ "test", "@value", "@api" ]
299
- }
300
- ]
301
- }
302
-
303
- The above example will filter a parameter using ``strtolower``. It will then call the ``convertString`` static method
304
- of ``MyClass``, passing in "test", the actual value of the parameter, and a ``Guzzle\Service\Description\Parameter``
305
- object.
306
-
307
- Operation parameter location attributes
308
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309
-
310
- The location field of top-level parameters control how a parameter is serialized when generating a request.
311
-
312
- uri location
313
- ^^^^^^^^^^^^
314
-
315
- Parameters are injected into the ``uri`` attribute of the operation using
316
- `URI-template expansion <http://tools.ietf.org/html/rfc6570>`_.
317
-
318
- .. code-block:: json
319
-
320
- {
321
- "operations": {
322
- "uriTest": {
323
- "uri": "/test/{testValue}",
324
- "parameters": {
325
- "testValue": {
326
- "location": "uri"
327
- }
328
- }
329
- }
330
- }
331
- }
332
-
333
- query location
334
- ^^^^^^^^^^^^^^
335
-
336
- Parameters are injected into the query string of a request. Query values can be nested, which would result in a PHP
337
- style nested query string. The name of a parameter is the default name of the query string parameter added to the
338
- request. You can override this behavior by specifying the ``sentAs`` attribute on the parameter.
339
-
340
- .. code-block:: json
341
-
342
- {
343
- "operations": {
344
- "queryTest": {
345
- "parameters": {
346
- "testValue": {
347
- "location": "query",
348
- "sentAs": "test_value"
349
- }
350
- }
351
- }
352
- }
353
- }
354
-
355
- header location
356
- ^^^^^^^^^^^^^^^
357
-
358
- Parameters are injected as headers on an HTTP request. The name of the parameter is used as the name of the header by
359
- default. You can change the name of the header created by the parameter using the ``sentAs`` attribute.
360
-
361
- Headers that are of type ``object`` will be added as multiple headers to a request using the key of the input array as
362
- the header key. Setting a ``sentAs`` attribute along with a type ``object`` will use the value of ``sentAs`` as a
363
- prefix for each header key.
364
-
365
- body location
366
- ^^^^^^^^^^^^^
367
-
368
- Parameters are injected as the body of a request. The input of these parameters may be anything that can be cast to a
369
- string or a ``Guzzle\Http\EntityBodyInterface`` object.
370
-
371
- postField location
372
- ^^^^^^^^^^^^^^^^^^
373
-
374
- Parameters are inserted as POST fields in a request. Nested values may be supplied and will be represented using
375
- PHP style nested query strings. The POST field name is the same as the parameter name by default. You can use the
376
- ``sentAs`` parameter to override the POST field name.
377
-
378
- postFile location
379
- ^^^^^^^^^^^^^^^^^
380
-
381
- Parameters are added as POST files. A postFile value may be a string pointing to a local filename or a
382
- ``Guzzle\Http\Message\PostFileInterface`` object. The name of the POST file will be the name of the parameter by
383
- default. You can use a custom POST file name by using the ``sentAs`` attribute.
384
-
385
- Supports "string" and "array" types.
386
-
387
- json location
388
- ^^^^^^^^^^^^^
389
-
390
- Parameters are added to the body of a request as top level keys of a JSON document. Nested values may be specified,
391
- with any number of nested ``Guzzle\Common\ToArrayInterface`` objects. When JSON parameters are specified, the
392
- ``Content-Type`` of the request will change to ``application/json`` if a ``Content-Type`` has not already been specified
393
- on the request.
394
-
395
- xml location
396
- ^^^^^^^^^^^^
397
-
398
- Parameters are added to the body of a request as top level nodes of an XML document. Nested values may be specified,
399
- with any number of nested ``Guzzle\Common\ToArrayInterface`` objects. When XML parameters are specified, the
400
- ``Content-Type`` of the request will change to ``application/xml`` if a ``Content-Type`` has not already been specified
401
- on the request.
402
-
403
- responseBody location
404
- ^^^^^^^^^^^^^^^^^^^^^
405
-
406
- Specifies the EntityBody of a response. This can be used to download the response body to a file or a custom Guzzle
407
- EntityBody object.
408
-
409
- No location
410
- ^^^^^^^^^^^
411
-
412
- If a parameter has no location attribute, then the parameter is simply used as a data value.
413
-
414
- Other locations
415
- ^^^^^^^^^^^^^^^
416
-
417
- Custom locations can be registered as new locations or override default locations if needed.
418
-
419
- .. _model-schema:
420
-
421
- Model Schema
422
- ------------
423
-
424
- Models are used in service descriptions to provide generic JSON schema definitions that can be extended from or used in
425
- ``$ref`` attributes. Models can also be referenced in a ``responseClass`` attribute to provide valuable output to an
426
- operation. Models are JSON schema documents and use the exact syntax and attributes used in parameters.
427
-
428
- Response Models
429
- ~~~~~~~~~~~~~~~
430
-
431
- Response models describe how a response is parsed into a ``Guzzle\Service\Resource\Model`` object. Response models are
432
- always modeled as JSON schema objects. When an HTTP response is parsed using a response model, the rules specified on
433
- each property of a response model will translate 1:1 as keys in a PHP associative array. When a ``sentAs`` attribute is
434
- found in response model parameters, the value retrieved from the HTTP response is retrieved using the ``sentAs``
435
- parameter but stored in the response model using the name of the parameter.
436
-
437
- The location field of top-level parameters in a response model tell response parsers how data is retrieved from a
438
- response.
439
-
440
- statusCode location
441
- ^^^^^^^^^^^^^^^^^^^
442
-
443
- Retrieves the status code of the response.
444
-
445
- reasonPhrase location
446
- ^^^^^^^^^^^^^^^^^^^^^
447
-
448
- Retrieves the reason phrase of the response.
449
-
450
- header location
451
- ^^^^^^^^^^^^^^^
452
-
453
- Retrieves a header from the HTTP response.
454
-
455
- body location
456
- ^^^^^^^^^^^^^
457
-
458
- Retrieves the body of an HTTP response.
459
-
460
- json location
461
- ^^^^^^^^^^^^^
462
-
463
- Retrieves a top-level parameter from a JSON document contained in an HTTP response.
464
-
465
- You can use ``additionalProperties`` if the JSON document is wrapped in an outer array. This allows you to parse the
466
- contents of each item in the array using the parsing rules defined in the ``additionalProperties`` schema.
467
-
468
- xml location
469
- ^^^^^^^^^^^^
470
-
471
- Retrieves a top-level node value from an XML document contained in an HTTP response.
472
-
473
- Other locations
474
- ^^^^^^^^^^^^^^^
475
-
476
- Custom locations can be registered as new locations or override default locations if needed.
477
-
478
- Example service description
479
- ---------------------------
480
-
481
- Let's say you're interacting with a web service called 'Foo' that allows for the following routes and methods::
482
-
483
- GET/POST /users
484
- GET/DELETE /users/:id
485
-
486
- The following JSON service description implements this simple web service:
487
-
488
- .. class:: overflow-height-500px
489
-
490
- .. code-block:: json
491
-
492
- {
493
- "name": "Foo",
494
- "apiVersion": "2012-10-14",
495
- "baseUrl": "http://api.foo.com",
496
- "description": "Foo is an API that allows you to Baz Bar",
497
- "operations": {
498
- "GetUsers": {
499
- "httpMethod": "GET",
500
- "uri": "/users",
501
- "summary": "Gets a list of users",
502
- "responseClass": "GetUsersOutput"
503
- },
504
- "CreateUser": {
505
- "httpMethod": "POST",
506
- "uri": "/users",
507
- "summary": "Creates a new user",
508
- "responseClass": "CreateUserOutput",
509
- "parameters": {
510
- "name": {
511
- "location": "json",
512
- "type": "string"
513
- },
514
- "age": {
515
- "location": "json",
516
- "type": "integer"
517
- }
518
- }
519
- },
520
- "GetUser": {
521
- "httpMethod": "GET",
522
- "uri": "/users/{id}",
523
- "summary": "Retrieves a single user",
524
- "responseClass": "GetUserOutput",
525
- "parameters": {
526
- "id": {
527
- "location": "uri",
528
- "description": "User to retrieve by ID",
529
- "required": true
530
- }
531
- }
532
- },
533
- "DeleteUser": {
534
- "httpMethod": "DELETE",
535
- "uri": "/users/{id}",
536
- "summary": "Deletes a user",
537
- "responseClass": "DeleteUserOutput",
538
- "parameters": {
539
- "id": {
540
- "location": "uri",
541
- "description": "User to delete by ID",
542
- "required": true
543
- }
544
- }
545
- }
546
- },
547
- "models": {
548
- "GetUsersOutput": {
549
- "type": "array",
550
- "items": {
551
- "type": "object",
552
- "properties": {
553
- "name": {
554
- "location": "json",
555
- "type": "string"
556
- },
557
- "age": {
558
- "location": "json",
559
- "type": "integer"
560
- }
561
- }
562
- }
563
- },
564
- "CreateUserOutput": {
565
- "type": "object",
566
- "properties": {
567
- "id": {
568
- "location": "json",
569
- "type": "string"
570
- },
571
- "location": {
572
- "location": "header",
573
- "sentAs": "Location",
574
- "type": "string"
575
- }
576
- }
577
- },
578
- "GetUserOutput": {
579
- "type": "object",
580
- "properties": {
581
- "name": {
582
- "location": "json",
583
- "type": "string"
584
- },
585
- "age": {
586
- "location": "json",
587
- "type": "integer"
588
- }
589
- }
590
- },
591
- "DeleteUserOutput": {
592
- "type": "object",
593
- "properties": {
594
- "status": {
595
- "location": "statusCode",
596
- "type": "integer"
597
- }
598
- }
599
- }
600
- }
601
- }
602
-
603
- If you attach this service description to a client, you would completely configure the client to interact with the
604
- Foo web service and provide valuable response models for each operation.
605
-
606
- .. code-block:: php
607
-
608
- use Guzzle\Service\Description\ServiceDescription;
609
-
610
- $description = ServiceDescription::factory('/path/to/client.json');
611
- $client->setDescription($description);
612
-
613
- $command = $client->getCommand('DeleteUser', array('id' => 123));
614
- $responseModel = $client->execute($command);
615
- echo $responseModel['status'];
616
-
617
- .. note::
618
-
619
- You can add the service description to your client's factory method or constructor.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/webservice-client/using-the-service-builder.rst DELETED
@@ -1,316 +0,0 @@
1
- =======================
2
- Using a service builder
3
- =======================
4
-
5
- The best way to instantiate Guzzle web service clients is to let Guzzle handle building the clients for you using a
6
- ServiceBuilder. A ServiceBuilder is responsible for creating concrete client objects based on configuration settings
7
- and helps to manage credentials for different environments.
8
-
9
- You don't have to use a service builder, but they help to decouple your application from concrete classes and help to
10
- share configuration data across multiple clients. Consider the following example. Here we are creating two clients that
11
- require the same API public key and secret key. The clients are created using their ``factory()`` methods.
12
-
13
- .. code-block:: php
14
-
15
- use MyService\FooClient;
16
- use MyService\BarClient;
17
-
18
- $foo = FooClient::factory(array(
19
- 'key' => 'abc',
20
- 'secret' => '123',
21
- 'custom' => 'and above all'
22
- ));
23
-
24
- $bar = BarClient::factory(array(
25
- 'key' => 'abc',
26
- 'secret' => '123',
27
- 'custom' => 'listen to me'
28
- ));
29
-
30
- The redundant specification of the API keys can be removed using a service builder.
31
-
32
- .. code-block:: php
33
-
34
- use Guzzle\Service\Builder\ServiceBuilder;
35
-
36
- $builder = ServiceBuilder::factory(array(
37
- 'services' => array(
38
- 'abstract_client' => array(
39
- 'params' => array(
40
- 'key' => 'abc',
41
- 'secret' => '123'
42
- )
43
- ),
44
- 'foo' => array(
45
- 'extends' => 'abstract_client',
46
- 'class' => 'MyService\FooClient',
47
- 'params' => array(
48
- 'custom' => 'and above all'
49
- )
50
- ),
51
- 'bar' => array(
52
- 'extends' => 'abstract_client',
53
- 'class' => 'MyService\FooClient',
54
- 'params' => array(
55
- 'custom' => 'listen to me'
56
- )
57
- )
58
- )
59
- ));
60
-
61
- $foo = $builder->get('foo');
62
- $bar = $builder->get('bar');
63
-
64
- You can make managing your API keys even easier by saving the service builder configuration in a JSON format in a
65
- .json file.
66
-
67
- Creating a service builder
68
- --------------------------
69
-
70
- A ServiceBuilder can source information from an array, an PHP include file that returns an array, or a JSON file.
71
-
72
- .. code-block:: php
73
-
74
- use Guzzle\Service\Builder\ServiceBuilder;
75
-
76
- // Source service definitions from a JSON file
77
- $builder = ServiceBuilder::factory('services.json');
78
-
79
- Sourcing data from an array
80
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
-
82
- Data can be source from a PHP array. The array must contain an associative ``services`` array that maps the name of a
83
- client to the configuration information used by the service builder to create the client. Clients are given names
84
- which are used to identify how a client is retrieved from a service builder. This can be useful for using multiple
85
- accounts for the same service or creating development clients vs. production clients.
86
-
87
- .. code-block:: php
88
-
89
- $services = array(
90
- 'includes' => array(
91
- '/path/to/other/services.json',
92
- '/path/to/other/php_services.php'
93
- ),
94
- 'services' => array(
95
- 'abstract.foo' => array(
96
- 'params' => array(
97
- 'username' => 'foo',
98
- 'password' => 'bar'
99
- )
100
- ),
101
- 'bar' => array(
102
- 'extends' => 'abstract.foo',
103
- 'class' => 'MyClientClass',
104
- 'params' => array(
105
- 'other' => 'abc'
106
- )
107
- )
108
- )
109
- );
110
-
111
- A service builder configuration array contains two top-level array keys:
112
-
113
- +------------+---------------------------------------------------------------------------------------------------------+
114
- | Key | Description |
115
- +============+=========================================================================================================+
116
- | includes | Array of paths to JSON or PHP include files to include in the configuration. |
117
- +------------+---------------------------------------------------------------------------------------------------------+
118
- | services | Associative array of defined services that can be created by the service builder. Each service can |
119
- | | contain the following keys: |
120
- | | |
121
- | | +------------+----------------------------------------------------------------------------------------+ |
122
- | | | Key | Description | |
123
- | | +============+========================================================================================+ |
124
- | | | class | The concrete class to instantiate that implements the | |
125
- | | | | ``Guzzle\Common\FromConfigInterface``. | |
126
- | | +------------+----------------------------------------------------------------------------------------+ |
127
- | | | extends | The name of a previously defined service to extend from | |
128
- | | +------------+----------------------------------------------------------------------------------------+ |
129
- | | | params | Associative array of parameters to pass to the factory method of the service it is | |
130
- | | | | instantiated | |
131
- | | +------------+----------------------------------------------------------------------------------------+ |
132
- | | | alias | An alias that can be used in addition to the array key for retrieving a client from | |
133
- | | | | the service builder. | |
134
- | | +------------+----------------------------------------------------------------------------------------+ |
135
- +------------+---------------------------------------------------------------------------------------------------------+
136
-
137
- The first client defined, ``abstract.foo``, is used as a placeholder of shared configuration values. Any service
138
- extending abstract.foo will inherit its params. As an example, this can be useful when clients share the same username
139
- and password.
140
-
141
- The next client, ``bar``, extends from ``abstract.foo`` using the ``extends`` attribute referencing the client from
142
- which to extend. Additional parameters can be merged into the original service definition when extending a parent
143
- service.
144
-
145
- .. important::
146
-
147
- Each client that you intend to instantiate must specify a ``class`` attribute that references the full class name
148
- of the client being created. The class referenced in the ``class`` parameter must implement a static ``factory()``
149
- method that accepts an array or ``Guzzle\Common\Collection`` object and returns an instantiated object.
150
-
151
- Sourcing from a PHP include
152
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
-
154
- You can create service builder configurations using a PHP include file. This can be useful if you wish to take
155
- advantage of an opcode cache like APC to speed up the process of loading and processing the configuration. The PHP
156
- include file is the same format as an array, but you simply create a PHP script that returns an array and save the
157
- file with the .php file extension.
158
-
159
- .. code-block:: php
160
-
161
- <?php return array('services' => '...');
162
- // Saved as config.php
163
-
164
- This configuration file can then be used with a service builder.
165
-
166
- .. code-block:: php
167
-
168
- $builder = ServiceBuilder::factory('/path/to/config.php');
169
-
170
- Sourcing from a JSON document
171
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172
-
173
- You can use JSON documents to serialize your service descriptions. The JSON format uses the exact same structure as
174
- the PHP array syntax, but it's just serialized using JSON.
175
-
176
- .. code-block:: javascript
177
-
178
- {
179
- "includes": ["/path/to/other/services.json", "/path/to/other/php_services.php"],
180
- "services": {
181
- "abstract.foo": {
182
- "params": {
183
- "username": "foo",
184
- "password": "bar"
185
- }
186
- },
187
- "bar": {
188
- "extends": "abstract.foo",
189
- "class": "MyClientClass",
190
- "params": {
191
- "other": "abc"
192
- }
193
- }
194
- }
195
- }
196
-
197
- Referencing other clients in parameters
198
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199
-
200
- If one of your clients depends on another client as one of its parameters, you can reference that client by name by
201
- enclosing the client's reference key in ``{}``.
202
-
203
- .. code-block:: javascript
204
-
205
- {
206
- "services": {
207
- "token": {
208
- "class": "My\Token\TokenFactory",
209
- "params": {
210
- "access_key": "xyz"
211
- }
212
- },
213
- "client": {
214
- "class": "My\Client",
215
- "params": {
216
- "token_client": "{token}",
217
- "version": "1.0"
218
- }
219
- }
220
- }
221
- }
222
-
223
- When ``client`` is constructed by the service builder, the service builder will first create the ``token`` service
224
- and then inject the token service into ``client``'s factory method in the ``token_client`` parameter.
225
-
226
- Retrieving clients from a service builder
227
- -----------------------------------------
228
-
229
- Clients are referenced using a customizable name you provide in your service definition. The ServiceBuilder is a sort
230
- of multiton object-- it will only instantiate a client once and return that client for subsequent retrievals. Clients
231
- are retrieved by name (the array key used in the configuration) or by the ``alias`` setting of a service.
232
-
233
- Here's an example of retrieving a client from your ServiceBuilder:
234
-
235
- .. code-block:: php
236
-
237
- $client = $builder->get('foo');
238
-
239
- // You can also use the ServiceBuilder object as an array
240
- $client = $builder['foo'];
241
-
242
- Creating throwaway clients
243
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
244
-
245
- You can get a "throwaway" client (a client that is not persisted by the ServiceBuilder) by passing ``true`` in the
246
- second argument of ``ServiceBuilder::get()``. This allows you to create a client that will not be returned by other
247
- parts of your code that use the service builder. Instead of passing ``true``, you can pass an array of configuration
248
- settings that will override the configuration settings specified in the service builder.
249
-
250
- .. code-block:: php
251
-
252
- // Get a throwaway client and overwrite the "custom" setting of the client
253
- $foo = $builder->get('foo', array(
254
- 'custom' => 'in this world there are rules'
255
- ));
256
-
257
- Getting raw configuration settings
258
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
259
-
260
- You can get the raw configuration settings provided to the service builder for a specific service using the
261
- ``getData($name)`` method of a service builder. This method will null if the service was not found in the service
262
- builder or an array of configuration settings if the service was found.
263
-
264
- .. code-block:: php
265
-
266
- $data = $builder->getData('foo');
267
- echo $data['key'] . "\n";
268
- echo $data['secret'] . "\n";
269
- echo $data['custom'] . "\n";
270
-
271
- Adding a plugin to all clients
272
- ------------------------------
273
-
274
- You can add a plugin to all clients created by a service builder using the ``addGlobalPlugin($plugin)`` method of a
275
- service builder and passing a ``Symfony\Component\EventDispatcher\EventSubscriberInterface`` object. The service builder
276
- will then attach each global plugin to every client as it is created. This allows you to, for example, add a LogPlugin
277
- to every request created by a service builder for easy debugging.
278
-
279
- .. code-block:: php
280
-
281
- use Guzzle\Plugin\Log\LogPlugin;
282
-
283
- // Add a debug log plugin to every client as it is created
284
- $builder->addGlobalPlugin(LogPlugin::getDebugPlugin());
285
-
286
- $foo = $builder->get('foo');
287
- $foo->get('/')->send();
288
- // Should output all of the data sent over the wire
289
-
290
- .. _service-builder-events:
291
-
292
- Events emitted from a service builder
293
- -------------------------------------
294
-
295
- A ``Guzzle\Service\Builder\ServiceBuilder`` object emits the following events:
296
-
297
- +-------------------------------+--------------------------------------------+-----------------------------------------+
298
- | Event name | Description | Event data |
299
- +===============================+============================================+=========================================+
300
- | service_builder.create_client | Called when a client is created | * client: The created client object |
301
- +-------------------------------+--------------------------------------------+-----------------------------------------+
302
-
303
- .. code-block:: php
304
-
305
- use Guzzle\Common\Event;
306
- use Guzzle\Service\Builder\ServiceBuilder;
307
-
308
- $builder = ServiceBuilder::factory('/path/to/config.json');
309
-
310
- // Add an event listener to print out each client client as it is created
311
- $builder->getEventDispatcher()->addListener('service_builder.create_client', function (Event $e) {
312
- echo 'Client created: ' . get_class($e['client']) . "\n";
313
- });
314
-
315
- $foo = $builder->get('foo');
316
- // Should output the class used for the "foo" client
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/docs/webservice-client/webservice-client.rst DELETED
@@ -1,659 +0,0 @@
1
- ======================
2
- The web service client
3
- ======================
4
-
5
- The ``Guzzle\Service`` namespace contains various abstractions that help to make it easier to interact with a web
6
- service API, including commands, service descriptions, and resource iterators.
7
-
8
- In this chapter, we'll build a simple `Twitter API client <https://dev.twitter.com/docs/api/1.1>`_.
9
-
10
- Creating a client
11
- =================
12
-
13
- A class that extends from ``Guzzle\Service\Client`` or implements ``Guzzle\Service\ClientInterface`` must implement a
14
- ``factory()`` method in order to be used with a :doc:`service builder <using-the-service-builder>`.
15
-
16
- Factory method
17
- --------------
18
-
19
- You can use the ``factory()`` method of a client directly if you do not need a service builder.
20
-
21
- .. code-block:: php
22
-
23
- use mtdowling\TwitterClient;
24
-
25
- // Create a client and pass an array of configuration data
26
- $twitter = TwitterClient::factory(array(
27
- 'consumer_key' => '****',
28
- 'consumer_secret' => '****',
29
- 'token' => '****',
30
- 'token_secret' => '****'
31
- ));
32
-
33
- .. note::
34
-
35
- If you'd like to follow along, here's how to get your Twitter API credentials:
36
-
37
- 1. Visit https://dev.twitter.com/apps
38
- 2. Click on an application that you've created
39
- 3. Click on the "OAuth tool" tab
40
- 4. Copy all of the settings under "OAuth Settings"
41
-
42
- Implementing a factory method
43
- -----------------------------
44
-
45
- Creating a client and its factory method is pretty simple. You just need to implement ``Guzzle\Service\ClientInterface``
46
- or extend from ``Guzzle\Service\Client``.
47
-
48
- .. code-block:: php
49
-
50
- namespace mtdowling;
51
-
52
- use Guzzle\Common\Collection;
53
- use Guzzle\Plugin\Oauth\OauthPlugin;
54
- use Guzzle\Service\Client;
55
- use Guzzle\Service\Description\ServiceDescription;
56
-
57
- /**
58
- * A simple Twitter API client
59
- */
60
- class TwitterClient extends Client
61
- {
62
- public static function factory($config = array())
63
- {
64
- // Provide a hash of default client configuration options
65
- $default = array('base_url' => 'https://api.twitter.com/1.1');
66
-
67
- // The following values are required when creating the client
68
- $required = array(
69
- 'base_url',
70
- 'consumer_key',
71
- 'consumer_secret',
72
- 'token',
73
- 'token_secret'
74
- );
75
-
76
- // Merge in default settings and validate the config
77
- $config = Collection::fromConfig($config, $default, $required);
78
-
79
- // Create a new Twitter client
80
- $client = new self($config->get('base_url'), $config);
81
-
82
- // Ensure that the OauthPlugin is attached to the client
83
- $client->addSubscriber(new OauthPlugin($config->toArray()));
84
-
85
- return $client;
86
- }
87
- }
88
-
89
- Service Builder
90
- ---------------
91
-
92
- A service builder is used to easily create web service clients, provides a simple configuration driven approach to
93
- creating clients, and allows you to share configuration settings across multiple clients. You can find out more about
94
- Guzzle's service builder in :doc:`using-the-service-builder`.
95
-
96
- .. code-block:: php
97
-
98
- use Guzzle\Service\Builder\ServiceBuilder;
99
-
100
- // Create a service builder and provide client configuration data
101
- $builder = ServiceBuilder::factory('/path/to/client_config.json');
102
-
103
- // Get the client from the service builder by name
104
- $twitter = $builder->get('twitter');
105
-
106
- The above example assumes you have JSON data similar to the following stored in "/path/to/client_config.json":
107
-
108
- .. code-block:: json
109
-
110
- {
111
- "services": {
112
- "twitter": {
113
- "class": "mtdowling\\TwitterClient",
114
- "params": {
115
- "consumer_key": "****",
116
- "consumer_secret": "****",
117
- "token": "****",
118
- "token_secret": "****"
119
- }
120
- }
121
- }
122
- }
123
-
124
- .. note::
125
-
126
- A service builder becomes much more valuable when using multiple web service clients in a single application or
127
- if you need to utilize the same client with varying configuration settings (e.g. multiple accounts).
128
-
129
- Commands
130
- ========
131
-
132
- Commands are a concept in Guzzle that helps to hide the underlying implementation of an API by providing an easy to use
133
- parameter driven object for each action of an API. A command is responsible for accepting an array of configuration
134
- parameters, serializing an HTTP request, and parsing an HTTP response. Following the
135
- `command pattern <http://en.wikipedia.org/wiki/Command_pattern>`_, commands in Guzzle offer a greater level of
136
- flexibility when implementing and utilizing a web service client.
137
-
138
- Executing commands
139
- ------------------
140
-
141
- You must explicitly execute a command after creating a command using the ``getCommand()`` method. A command has an
142
- ``execute()`` method that may be called, or you can use the ``execute()`` method of a client object and pass in the
143
- command object. Calling either of these execute methods will return the result value of the command. The result value is
144
- the result of parsing the HTTP response with the ``process()`` method.
145
-
146
- .. code-block:: php
147
-
148
- // Get a command from the client and pass an array of parameters
149
- $command = $twitter->getCommand('getMentions', array(
150
- 'count' => 5
151
- ));
152
-
153
- // Other parameters can be set on the command after it is created
154
- $command['trim_user'] = false;
155
-
156
- // Execute the command using the command object.
157
- // The result value contains an array of JSON data from the response
158
- $result = $command->execute();
159
-
160
- // You can retrieve the result of the command later too
161
- $result = $command->getResult().
162
-
163
- Command object also contains methods that allow you to inspect the HTTP request and response that was utilized with
164
- the command.
165
-
166
- .. code-block:: php
167
-
168
- $request = $command->getRequest();
169
- $response = $command->getResponse();
170
-
171
- .. note::
172
-
173
- The format and notation used to retrieve commands from a client can be customized by injecting a custom command
174
- factory, ``Guzzle\Service\Command\Factory\FactoryInterface``, on the client using ``$client->setCommandFactory()``.
175
-
176
- Executing with magic methods
177
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178
-
179
- When using method missing magic methods with a command, the command will be executed right away and the result of the
180
- command is returned.
181
-
182
- .. code-block:: php
183
-
184
- $jsonData = $twitter->getMentions(array(
185
- 'count' => 5,
186
- 'trim_user' => true
187
- ));
188
-
189
- Creating commands
190
- -----------------
191
-
192
- Commands are created using either the ``getCommand()`` method of a client or a magic missing method of a client. Using
193
- the ``getCommand()`` method allows you to create a command without executing it, allowing for customization of the
194
- command or the request serialized by the command.
195
-
196
- When a client attempts to create a command, it uses the client's ``Guzzle\Service\Command\Factory\FactoryInterface``.
197
- By default, Guzzle will utilize a command factory that first looks for a concrete class for a particular command
198
- (concrete commands) followed by a command defined by a service description (operation commands). We'll learn more about
199
- concrete commands and operation commands later in this chapter.
200
-
201
- .. code-block:: php
202
-
203
- // Get a command from the twitter client.
204
- $command = $twitter->getCommand('getMentions');
205
- $result = $command->execute();
206
-
207
- Unless you've skipped ahead, running the above code will throw an exception.
208
-
209
- PHP Fatal error: Uncaught exception 'Guzzle\Common\Exception\InvalidArgumentException' with message
210
- 'Command was not found matching getMentions'
211
-
212
- This exception was thrown because the "getMentions" command has not yet been implemented. Let's implement one now.
213
-
214
- Concrete commands
215
- ~~~~~~~~~~~~~~~~~
216
-
217
- Commands can be created in one of two ways: create a concrete command class that extends
218
- ``Guzzle\Service\Command\AbstractCommand`` or
219
- :doc:`create an OperationCommand based on a service description <guzzle-service-descriptions>`. The recommended
220
- approach is to use a service description to define your web service, but you can use concrete commands when custom
221
- logic must be implemented for marshaling or unmarshaling a HTTP message.
222
-
223
- Commands are the method in which you abstract away the underlying format of the requests that need to be sent to take
224
- action on a web service. Commands in Guzzle are meant to be built by executing a series of setter methods on a command
225
- object. Commands are only validated right before they are executed. A ``Guzzle\Service\Client`` object is responsible
226
- for executing commands. Commands created for your web service must implement
227
- ``Guzzle\Service\Command\CommandInterface``, but it's easier to extend the ``Guzzle\Service\Command\AbstractCommand``
228
- class, implement the ``build()`` method, and optionally implement the ``process()`` method.
229
-
230
- Serializing requests
231
- ^^^^^^^^^^^^^^^^^^^^
232
-
233
- The ``build()`` method of a command is responsible for using the arguments of the command to build and serialize a
234
- HTTP request and set the request on the ``$request`` property of the command object. This step is usually taken care of
235
- for you when using a service description driven command that uses the default
236
- ``Guzzle\Service\Command\OperationCommand``. You may wish to implement the process method yourself when you aren't
237
- using a service description or need to implement more complex request serialization.
238
-
239
- .. important::::
240
-
241
- When implementing a custom ``build()`` method, be sure to set the class property of ``$this->request`` to an
242
- instantiated and ready to send request.
243
-
244
- The following example shows how to implement the ``getMentions``
245
- `Twitter API <https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline>`_ method using a concrete command.
246
-
247
- .. code-block:: php
248
-
249
- namespace mtdowling\Twitter\Command;
250
-
251
- use Guzzle\Service\Command\AbstractCommand;
252
-
253
- class GetMentions extends AbstractCommand
254
- {
255
- protected function build()
256
- {
257
- // Create the request property of the command
258
- $this->request = $this->client->get('statuses/mentions_timeline.json');
259
-
260
- // Grab the query object of the request because we will use it for
261
- // serializing command parameters on the request
262
- $query = $this->request->getQuery();
263
-
264
- if ($this['count']) {
265
- $query->set('count', $this['count']);
266
- }
267
-
268
- if ($this['since_id']) {
269
- $query->set('since_id', $this['since_id']);
270
- }
271
-
272
- if ($this['max_id']) {
273
- $query->set('max_id', $this['max_id']);
274
- }
275
-
276
- if ($this['trim_user'] !== null) {
277
- $query->set('trim_user', $this['trim_user'] ? 'true' : 'false');
278
- }
279
-
280
- if ($this['contributor_details'] !== null) {
281
- $query->set('contributor_details', $this['contributor_details'] ? 'true' : 'false');
282
- }
283
-
284
- if ($this['include_entities'] !== null) {
285
- $query->set('include_entities', $this['include_entities'] ? 'true' : 'false');
286
- }
287
- }
288
- }
289
-
290
- By default, a client will attempt to find concrete command classes under the ``Command`` namespace of a client. First
291
- the client will attempt to find an exact match for the name of the command to the name of the command class. If an
292
- exact match is not found, the client will calculate a class name using inflection. This is calculated based on the
293
- folder hierarchy of a command and converting the CamelCased named commands into snake_case. Here are some examples on
294
- how the command names are calculated:
295
-
296
- #. ``Foo\Command\JarJar`` **->** jar_jar
297
- #. ``Foo\Command\Test`` **->** test
298
- #. ``Foo\Command\People\GetCurrentPerson`` **->** people.get_current_person
299
-
300
- Notice how any sub-namespace beneath ``Command`` is converted from ``\`` to ``.`` (a period). CamelCasing is converted
301
- to lowercased snake_casing (e.g. JarJar == jar_jar).
302
-
303
- Parsing responses
304
- ^^^^^^^^^^^^^^^^^
305
-
306
- The ``process()`` method of a command is responsible for converting an HTTP response into something more useful. For
307
- example, a service description operation that has specified a model object in the ``responseClass`` attribute of the
308
- operation will set a ``Guzzle\Service\Resource\Model`` object as the result of the command. This behavior can be
309
- completely modified as needed-- even if you are using operations and responseClass models. Simply implement a custom
310
- ``process()`` method that sets the ``$this->result`` class property to whatever you choose. You can reuse parts of the
311
- default Guzzle response parsing functionality or get inspiration from existing code by using
312
- ``Guzzle\Service\Command\OperationResponseParser`` and ``Guzzle\Service\Command\DefaultResponseParser`` classes.
313
-
314
- If you do not implement a custom ``process()`` method and are not using a service description, then Guzzle will attempt
315
- to guess how a response should be processed based on the Content-Type header of the response. Because the Twitter API
316
- sets a ``Content-Type: application/json`` header on this response, we do not need to implement any custom response
317
- parsing.
318
-
319
- Operation commands
320
- ~~~~~~~~~~~~~~~~~~
321
-
322
- Operation commands are commands in which the serialization of an HTTP request and the parsing of an HTTP response are
323
- driven by a Guzzle service description. Because request serialization, validation, and response parsing are
324
- described using a DSL, creating operation commands is a much faster process than writing concrete commands.
325
-
326
- Creating operation commands for our Twitter client can remove a great deal of redundancy from the previous concrete
327
- command, and allows for a deeper runtime introspection of the API. Here's an example service description we can use to
328
- create the Twitter API client:
329
-
330
- .. code-block:: json
331
-
332
- {
333
- "name": "Twitter",
334
- "apiVersion": "1.1",
335
- "baseUrl": "https://api.twitter.com/1.1",
336
- "description": "Twitter REST API client",
337
- "operations": {
338
- "GetMentions": {
339
- "httpMethod": "GET",
340
- "uri": "statuses/mentions_timeline.json",
341
- "summary": "Returns the 20 most recent mentions for the authenticating user.",
342
- "responseClass": "GetMentionsOutput",
343
- "parameters": {
344
- "count": {
345
- "description": "Specifies the number of tweets to try and retrieve",
346
- "type": "integer",
347
- "location": "query"
348
- },
349
- "since_id": {
350
- "description": "Returns results with an ID greater than the specified ID",
351
- "type": "integer",
352
- "location": "query"
353
- },
354
- "max_id": {
355
- "description": "Returns results with an ID less than or equal to the specified ID.",
356
- "type": "integer",
357
- "location": "query"
358
- },
359
- "trim_user": {
360
- "description": "Limits the amount of data returned for each user",
361
- "type": "boolean",
362
- "location": "query"
363
- },
364
- "contributor_details": {
365
- "description": "Adds more data to contributor elements",
366
- "type": "boolean",
367
- "location": "query"
368
- },
369
- "include_entities": {
370
- "description": "The entities node will be disincluded when set to false.",
371
- "type": "boolean",
372
- "location": "query"
373
- }
374
- }
375
- }
376
- },
377
- "models": {
378
- "GetMentionsOutput": {
379
- "type": "object",
380
- "additionalProperties": {
381
- "location": "json"
382
- }
383
- }
384
- }
385
- }
386
-
387
- If you're lazy, you can define the API in a less descriptive manner using ``additionalParameters``.
388
- ``additionalParameters`` define the serialization and validation rules of parameters that are not explicitly defined
389
- in a service description.
390
-
391
- .. code-block:: json
392
-
393
- {
394
- "name": "Twitter",
395
- "apiVersion": "1.1",
396
- "baseUrl": "https://api.twitter.com/1.1",
397
- "description": "Twitter REST API client",
398
- "operations": {
399
- "GetMentions": {
400
- "httpMethod": "GET",
401
- "uri": "statuses/mentions_timeline.json",
402
- "summary": "Returns the 20 most recent mentions for the authenticating user.",
403
- "responseClass": "GetMentionsOutput",
404
- "additionalParameters": {
405
- "location": "query"
406
- }
407
- }
408
- },
409
- "models": {
410
- "GetMentionsOutput": {
411
- "type": "object",
412
- "additionalProperties": {
413
- "location": "json"
414
- }
415
- }
416
- }
417
- }
418
-
419
- You should attach the service description to the client at the end of the client's factory method:
420
-
421
- .. code-block:: php
422
-
423
- // ...
424
- class TwitterClient extends Client
425
- {
426
- public static function factory($config = array())
427
- {
428
- // ... same code as before ...
429
-
430
- // Set the service description
431
- $client->setDescription(ServiceDescription::factory('path/to/twitter.json'));
432
-
433
- return $client;
434
- }
435
- }
436
-
437
- The client can now use operations defined in the service description instead of requiring you to create concrete
438
- command classes. Feel free to delete the concrete command class we created earlier.
439
-
440
- .. code-block:: php
441
-
442
- $jsonData = $twitter->getMentions(array(
443
- 'count' => 5,
444
- 'trim_user' => true
445
- ));
446
-
447
- Executing commands in parallel
448
- ------------------------------
449
-
450
- Much like HTTP requests, Guzzle allows you to send multiple commands in parallel. You can send commands in parallel by
451
- passing an array of command objects to a client's ``execute()`` method. The client will serialize each request and
452
- send them all in parallel. If an error is encountered during the transfer, then a
453
- ``Guzzle\Service\Exception\CommandTransferException`` is thrown, which allows you to retrieve a list of commands that
454
- succeeded and a list of commands that failed.
455
-
456
- .. code-block:: php
457
-
458
- use Guzzle\Service\Exception\CommandTransferException;
459
-
460
- $commands = array();
461
- $commands[] = $twitter->getCommand('getMentions');
462
- $commands[] = $twitter->getCommand('otherCommandName');
463
- // etc...
464
-
465
- try {
466
- $result = $client->execute($commands);
467
- foreach ($result as $command) {
468
- echo $command->getName() . ': ' . $command->getResponse()->getStatusCode() . "\n";
469
- }
470
- } catch (CommandTransferException $e) {
471
- // Get an array of the commands that succeeded
472
- foreach ($e->getSuccessfulCommands() as $command) {
473
- echo $command->getName() . " succeeded\n";
474
- }
475
- // Get an array of the commands that failed
476
- foreach ($e->getFailedCommands() as $command) {
477
- echo $command->getName() . " failed\n";
478
- }
479
- }
480
-
481
- .. note::
482
-
483
- All commands executed from a client using an array must originate from the same client.
484
-
485
- Special command options
486
- -----------------------
487
-
488
- Guzzle exposes several options that help to control how commands are validated, serialized, and parsed.
489
- Command options can be specified when creating a command or in the ``command.params`` parameter in the
490
- ``Guzzle\Service\Client``.
491
-
492
- =========================== ============================================================================================
493
- command.request_options Option used to add :ref:`Request options <request-options>` to the request created by a
494
- command
495
- command.hidden_params An array of the names of parameters ignored by the ``additionalParameters`` parameter schema
496
- command.disable_validation Set to true to disable JSON schema validation of the command's input parameters
497
- command.response_processing Determines how the default response parser will parse the command. One of "raw" no parsing,
498
- "model" (the default method used to parse commands using response models defined in service
499
- descriptions)
500
- command.headers (deprecated) Option used to specify custom headers. Use ``command.request_options`` instead
501
- command.on_complete (deprecated) Option used to add an onComplete method to a command. Use
502
- ``command.after_send`` event instead
503
- command.response_body (deprecated) Option used to change the entity body used to store a response.
504
- Use ``command.request_options`` instead
505
- =========================== ============================================================================================
506
-
507
- Advanced client configuration
508
- =============================
509
-
510
- Default command parameters
511
- --------------------------
512
-
513
- When creating a client object, you can specify default command parameters to pass into all commands. Any key value pair
514
- present in the ``command.params`` settings of a client will be added as default parameters to any command created
515
- by the client.
516
-
517
- .. code-block:: php
518
-
519
- $client = new Guzzle\Service\Client(array(
520
- 'command.params' => array(
521
- 'default_1' => 'foo',
522
- 'another' => 'bar'
523
- )
524
- ));
525
-
526
- Magic methods
527
- -------------
528
-
529
- Client objects will, by default, attempt to create and execute commands when a missing method is invoked on a client.
530
- This powerful concept applies to both concrete commands and operation commands powered by a service description. This
531
- makes it appear to the end user that you have defined actual methods on a client object, when in fact, the methods are
532
- invoked using PHP's magic ``__call`` method.
533
-
534
- The ``__call`` method uses the ``getCommand()`` method of a client, which uses the client's internal
535
- ``Guzzle\Service\Command\Factory\FactoryInterface`` object. The default command factory allows you to instantiate
536
- operations defined in a client's service description. The method in which a client determines which command to
537
- execute is defined as follows:
538
-
539
- 1. The client will first try to find a literal match for an operation in the service description.
540
- 2. If the literal match is not found, the client will try to uppercase the first character of the operation and find
541
- the match again.
542
- 3. If a match is still not found, the command factory will inflect the method name from CamelCase to snake_case and
543
- attempt to find a matching command.
544
- 4. If a command still does not match, an exception is thrown.
545
-
546
- .. code-block:: php
547
-
548
- // Use the magic method
549
- $result = $twitter->getMentions();
550
-
551
- // This is exactly the same as:
552
- $result = $twitter->getCommand('getMentions')->execute();
553
-
554
- You can disable magic methods on a client by passing ``false`` to the ``enableMagicMethod()`` method.
555
-
556
- Custom command factory
557
- ----------------------
558
-
559
- A client by default uses the ``Guzzle\Service\Command\Factory\CompositeFactory`` which allows multiple command
560
- factories to attempt to create a command by a certain name. The default CompositeFactory uses a ``ConcreteClassFactory``
561
- and a ``ServiceDescriptionFactory`` if a service description is specified on a client. You can specify a custom
562
- command factory if your client requires custom command creation logic using the ``setCommandFactory()`` method of
563
- a client.
564
-
565
- Custom resource Iterator factory
566
- --------------------------------
567
-
568
- Resource iterators can be retrieved from a client using the ``getIterator($name)`` method of a client. This method uses
569
- a client's internal ``Guzzle\Service\Resource\ResourceIteratorFactoryInterface`` object. A client by default uses a
570
- ``Guzzle\Service\Resource\ResourceIteratorClassFactory`` to attempt to find concrete classes that implement resource
571
- iterators. The default factory will first look for matching iterators in the ``Iterator`` subdirectory of the client
572
- followed by the ``Model`` subdirectory of a client. Use the ``setResourceIteratorFactory()`` method of a client to
573
- specify a custom resource iterator factory.
574
-
575
- Plugins and events
576
- ==================
577
-
578
- ``Guzzle\Service\Client`` exposes various events that allow you to hook in custom logic. A client object owns a
579
- ``Symfony\Component\EventDispatcher\EventDispatcher`` object that can be accessed by calling
580
- ``$client->getEventDispatcher()``. You can use the event dispatcher to add listeners (a simple callback function) or
581
- event subscribers (classes that listen to specific events of a dispatcher).
582
-
583
- .. _service-client-events:
584
-
585
- Events emitted from a Service Client
586
- ------------------------------------
587
-
588
- A ``Guzzle\Service\Client`` object emits the following events:
589
-
590
- +------------------------------+--------------------------------------------+------------------------------------------+
591
- | Event name | Description | Event data |
592
- +==============================+============================================+==========================================+
593
- | client.command.create | The client created a command object | * client: Client object |
594
- | | | * command: Command object |
595
- +------------------------------+--------------------------------------------+------------------------------------------+
596
- | command.before_prepare | Before a command is validated and built. | * command: Command being prepared |
597
- | | This is also before a request is created. | |
598
- +------------------------------+--------------------------------------------+------------------------------------------+
599
- | command.after_prepare | After a command instantiates and | * command: Command that was prepared |
600
- | | configures its request object. | |
601
- +------------------------------+--------------------------------------------+------------------------------------------+
602
- | command.before_send | The client is about to execute a prepared | * command: Command to execute |
603
- | | command | |
604
- +------------------------------+--------------------------------------------+------------------------------------------+
605
- | command.after_send | The client successfully completed | * command: The command that was executed |
606
- | | executing a command | |
607
- +------------------------------+--------------------------------------------+------------------------------------------+
608
- | command.parse_response | Called when ``responseType`` is ``class`` | * command: The command with a response |
609
- | | and the response is about to be parsed. | about to be parsed. |
610
- +------------------------------+--------------------------------------------+------------------------------------------+
611
-
612
- .. code-block:: php
613
-
614
- use Guzzle\Common\Event;
615
- use Guzzle\Service\Client;
616
-
617
- $client = new Client();
618
-
619
- // create an event listener that operates on request objects
620
- $client->getEventDispatcher()->addListener('command.after_prepare', function (Event $event) {
621
- $command = $event['command'];
622
- $request = $command->getRequest();
623
-
624
- // do something with request
625
- });
626
-
627
- .. code-block:: php
628
-
629
- use Guzzle\Common\Event;
630
- use Guzzle\Common\Client;
631
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
632
-
633
- class EventSubscriber implements EventSubscriberInterface
634
- {
635
- public static function getSubscribedEvents()
636
- {
637
- return array(
638
- 'client.command.create' => 'onCommandCreate',
639
- 'command.parse_response' => 'onParseResponse'
640
- );
641
- }
642
-
643
- public function onCommandCreate(Event $event)
644
- {
645
- $client = $event['client'];
646
- $command = $event['command'];
647
- // operate on client and command
648
- }
649
-
650
- public function onParseResponse(Event $event)
651
- {
652
- $command = $event['command'];
653
- // operate on the command
654
- }
655
- }
656
-
657
- $client = new Client();
658
-
659
- $client->addSubscriber(new EventSubscriber());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phar-stub.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- Phar::mapPhar('guzzle.phar');
4
-
5
- require_once 'phar://guzzle.phar/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
6
-
7
- $classLoader = new Symfony\Component\ClassLoader\UniversalClassLoader();
8
- $classLoader->registerNamespaces(array(
9
- 'Guzzle' => 'phar://guzzle.phar/src',
10
- 'Symfony\\Component\\EventDispatcher' => 'phar://guzzle.phar/vendor/symfony/event-dispatcher',
11
- 'Doctrine' => 'phar://guzzle.phar/vendor/doctrine/common/lib',
12
- 'Monolog' => 'phar://guzzle.phar/vendor/monolog/monolog/src'
13
- ));
14
- $classLoader->register();
15
-
16
- __HALT_COMPILER();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/build.properties.dist DELETED
@@ -1,16 +0,0 @@
1
- # you may need to update this if you're working on a fork.
2
- guzzle.remote=git@github.com:guzzle/guzzle.git
3
-
4
- # github credentials -- only used by GitHub API calls to create subtree repos
5
- github.basicauth=username:password
6
- # for the subtree split and testing
7
- github.org=guzzle
8
-
9
- # your git path
10
- cmd.git=git
11
-
12
- # your composer command
13
- cmd.composer=composer
14
-
15
- # test server start
16
- cmd.testserver=node
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/imports/dependencies.xml DELETED
@@ -1,33 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project basedir="../../" default="install-dependencies">
3
-
4
- <property name="cmd.composer" value="" />
5
- <property name="cmd.git" value="" />
6
- <property name="cmd.testserver" value="" />
7
-
8
- <!--
9
- Our custom tasks
10
- -->
11
- <taskdef name="composerlint" classname="phing.tasks.ComposerLintTask" />
12
- <taskdef name="guzzlesubsplit" classname="phing.tasks.GuzzleSubSplitTask" />
13
- <taskdef name="guzzlepear" classname="phing.tasks.GuzzlePearPharPackageTask" />
14
-
15
- <target name="find-git">
16
- <if>
17
- <contains string="${cmd.git}" substring="git" />
18
- <then>
19
- <echo>using git at ${cmd.git}</echo>
20
- </then>
21
- <else>
22
- <exec command="which git" outputProperty="cmd.git" />
23
- <echo>found git at ${cmd.git}</echo>
24
- </else>
25
- </if>
26
- </target>
27
-
28
- <target name="clean-dependencies">
29
- <delete dir="${project.basedir}/vendor"/>
30
- <delete file="${project.basedir}/composer.lock" />
31
- </target>
32
-
33
- </project>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/imports/deploy.xml DELETED
@@ -1,142 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project basedir="../../" default="deploy">
3
-
4
- <property name="git.status" value=""/>
5
- <property name="git.currentbranch" value=""/>
6
- <target name="check-git-branch-status">
7
- <exec command="git status -s -b" outputProperty="git.currentbranch" />
8
- <if>
9
- <equals arg1="${git.currentbranch}" arg2="## ${head}" trim="true"/>
10
- <then>
11
- <echo>On branch ${head}</echo>
12
- </then>
13
- <else>
14
- <fail message="-Dhead=${head} arg did not match ${git.currentbranch}"/>
15
- </else>
16
- </if>
17
- <exec command="git status -s" outputProperty="git.status" />
18
- <if>
19
- <equals arg1="${git.status}" arg2="" trim="true"/>
20
- <then>
21
- <echo>working directory clean</echo>
22
- </then>
23
- <else>
24
- <echo>${git.status}</echo>
25
- <fail message="Working directory isn't clean." />
26
- </else>
27
- </if>
28
- </target>
29
-
30
- <property name="version.changelog" value=""/>
31
- <property name="version.version" value=""/>
32
- <target name="check-changelog-version">
33
- <exec executable="fgrep" outputProperty="version.changelog">
34
- <arg value="${new.version} ("/>
35
- <arg value="${project.basedir}/CHANGELOG.md"/>
36
- </exec>
37
- <if>
38
- <equals arg1="${version.changelog}" arg2="" trim="true"/>
39
- <then>
40
- <fail message="${new.version} not mentioned in CHANGELOG"/>
41
- </then>
42
- </if>
43
-
44
- <exec executable="fgrep" outputProperty="version.version">
45
- <arg value="const VERSION = '${new.version}'"/>
46
- <arg value="${project.basedir}/src/Guzzle/Common/Version.php"/>
47
- </exec>
48
- <if>
49
- <equals arg1="${version.version}" arg2="" trim="true"/>
50
- <then>
51
- <fail message="${new.version} not mentioned in Guzzle\Common\Version"/>
52
- </then>
53
- </if>
54
-
55
- <echo>ChangeLog Match: ${version.changelog}</echo>
56
- <echo>Guzzle\Common\Version Match: ${version.version}</echo>
57
- </target>
58
-
59
- <target name="help" description="HELP AND REMINDERS about what you can do with this project">
60
- <echo>releasing: phing -Dnew.version=3.0.x -Dhead=master release</echo>
61
- <echo>--</echo>
62
- <exec command="phing -l" passthru="true"/>
63
- </target>
64
-
65
- <target name="release" depends="check-changelog-version,check-git-branch-status"
66
- description="tag, subtree split, package, deploy: Use: phing -Dnew.version=[TAG] -Dhead=[BRANCH] release">
67
- <if>
68
- <isset property="new.version" />
69
- <then>
70
- <if>
71
- <contains string="${new.version}" substring="v" casesensitive="false" />
72
- <then>
73
- <fail message="Please specify version as [0-9].[0-9].[0-9]. (I'll add v for you.)"/>
74
- </then>
75
- <else>
76
-
77
- <echo>BEGINNING RELEASE FOR ${new.version}</echo>
78
-
79
- <!-- checkout the specified branch -->
80
- <!-- <gitcheckout repository="${repo.dir}" branchname="${head}" gitPath="${cmd.git}" /> -->
81
- <!-- Ensure that the tag exists -->
82
- <!-- push the tag up so subsplit will get it -->
83
- <!--gitpush repository="${repo.dir}" tags="true" gitPath="${cmd.git}" /-->
84
-
85
- <!-- now do the subsplits -->
86
- <guzzlesubsplit
87
- repository="${repo.dir}"
88
- remote="${guzzle.remote}"
89
- heads="${head}"
90
- tags="v${new.version}"
91
- base="src"
92
- subIndicatorFile="composer.json"
93
- gitPath="${cmd.git}" />
94
-
95
- <!-- Copy .md files into the PEAR package -->
96
- <copy file="${repo.dir}/LICENSE" tofile=".subsplit/src/Guzzle/LICENSE.md" />
97
- <copy file="${repo.dir}/README.md" tofile=".subsplit/src/Guzzle/README.md" />
98
- <copy file="${repo.dir}/CHANGELOG.md" tofile=".subsplit/src/Guzzle/CHANGELOG.md" />
99
-
100
- <!-- and now the pear packages -->
101
- <guzzlepear
102
- version="${new.version}"
103
- makephar="true"
104
- />
105
- </else>
106
-
107
- </if>
108
- </then>
109
-
110
- <else>
111
- <echo>Tip: to create a new release, do: phing -Dnew.version=[TAG] -Dhead=[BRANCH] release</echo>
112
- </else>
113
-
114
- </if>
115
- </target>
116
-
117
- <target name="pear-channel">
118
- <guzzlepear version="${new.version}" deploy="true" makephar="true" />
119
- </target>
120
-
121
- <target name="package-phar" description="Create a phar with an autoloader">
122
- <pharpackage
123
- destfile="${dir.output}/guzzle.phar"
124
- basedir="${project.basedir}/.subsplit"
125
- stub="phar-stub.php"
126
- signature="md5">
127
- <fileset dir="${project.basedir}/.subsplit">
128
- <include name="src/**/*.php" />
129
- <include name="src/**/*.pem" />
130
- <include name="src/**/*.md5" />
131
- <include name="vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" />
132
- <include name="vendor/symfony/event-dispatcher/**/*.php" />
133
- <include name="vendor/doctrine/common/lib/Doctrine/Common/Cache/*.php" />
134
- <include name="vendor/monolog/monolog/src/**/*.php" />
135
- </fileset>
136
- <metadata>
137
- <element name="author" value="Michael Dowling" />
138
- </metadata>
139
- </pharpackage>
140
- </target>
141
-
142
- </project>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/tasks/ComposerLintTask.php DELETED
@@ -1,152 +0,0 @@
1
- <?php
2
- /**
3
- * Phing task for composer validation.
4
- *
5
- * @copyright 2012 Clay Loveless <clay@php.net>
6
- * @license http://claylo.mit-license.org/2012/ MIT License
7
- */
8
-
9
- require_once 'phing/Task.php';
10
-
11
- class ComposerLintTask extends Task
12
- {
13
- protected $dir = null;
14
- protected $file = null;
15
- protected $passthru = false;
16
- protected $composer = null;
17
-
18
- /**
19
- * The setter for the dir
20
- *
21
- * @param string $str Directory to crawl recursively for composer files
22
- */
23
- public function setDir($str)
24
- {
25
- $this->dir = $str;
26
- }
27
-
28
- /**
29
- * The setter for the file
30
- *
31
- * @param string $str Individual file to validate
32
- */
33
- public function setFile($str)
34
- {
35
- $this->file = $str;
36
- }
37
-
38
- /**
39
- * Whether to use PHP's passthru() function instead of exec()
40
- *
41
- * @param boolean $passthru If passthru shall be used
42
- */
43
- public function setPassthru($passthru)
44
- {
45
- $this->passthru = (bool) $passthru;
46
- }
47
-
48
- /**
49
- * Composer to execute. If unset, will attempt composer.phar in project
50
- * basedir, and if that fails, will attempt global composer
51
- * installation.
52
- *
53
- * @param string $str Individual file to validate
54
- */
55
- public function setComposer($str)
56
- {
57
- $this->file = $str;
58
- }
59
-
60
- /**
61
- * The init method: do init steps
62
- */
63
- public function init()
64
- {
65
- // nothing needed here
66
- }
67
-
68
- /**
69
- * The main entry point
70
- */
71
- public function main()
72
- {
73
- if ($this->composer === null) {
74
- $this->findComposer();
75
- }
76
-
77
- $files = array();
78
- if (!empty($this->file) && file_exists($this->file)) {
79
- $files[] = $this->file;
80
- }
81
-
82
- if (!empty($this->dir)) {
83
- $found = $this->findFiles();
84
- foreach ($found as $file) {
85
- $files[] = $this->dir . DIRECTORY_SEPARATOR . $file;
86
- }
87
- }
88
-
89
- foreach ($files as $file) {
90
-
91
- $cmd = $this->composer . ' validate ' . $file;
92
- $cmd = escapeshellcmd($cmd);
93
-
94
- if ($this->passthru) {
95
- $retval = null;
96
- passthru($cmd, $retval);
97
- if ($retval == 1) {
98
- throw new BuildException('invalid composer.json');
99
- }
100
- } else {
101
- $out = array();
102
- $retval = null;
103
- exec($cmd, $out, $retval);
104
- if ($retval == 1) {
105
- $err = join("\n", $out);
106
- throw new BuildException($err);
107
- } else {
108
- $this->log($out[0]);
109
- }
110
- }
111
-
112
- }
113
-
114
- }
115
-
116
- /**
117
- * Find the composer.json files using Phing's directory scanner
118
- *
119
- * @return array
120
- */
121
- protected function findFiles()
122
- {
123
- $ds = new DirectoryScanner();
124
- $ds->setBasedir($this->dir);
125
- $ds->setIncludes(array('**/composer.json'));
126
- $ds->scan();
127
- return $ds->getIncludedFiles();
128
- }
129
-
130
- /**
131
- * Find composer installation
132
- *
133
- */
134
- protected function findComposer()
135
- {
136
- $basedir = $this->project->getBasedir();
137
- $php = $this->project->getProperty('php.interpreter');
138
-
139
- if (file_exists($basedir . '/composer.phar')) {
140
- $this->composer = "$php $basedir/composer.phar";
141
- } else {
142
- $out = array();
143
- exec('which composer', $out);
144
- if (empty($out)) {
145
- throw new BuildException(
146
- 'Could not determine composer location.'
147
- );
148
- }
149
- $this->composer = $out[0];
150
- }
151
- }
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/tasks/GuzzlePearPharPackageTask.php DELETED
@@ -1,338 +0,0 @@
1
- <?php
2
- /**
3
- * This file is part of Guzzle's build process.
4
- *
5
- * @copyright 2012 Clay Loveless <clay@php.net>
6
- * @license http://claylo.mit-license.org/2012/ MIT License
7
- */
8
-
9
- require_once 'phing/Task.php';
10
- require_once 'PEAR/PackageFileManager2.php';
11
- require_once 'PEAR/PackageFileManager/File.php';
12
- require_once 'PEAR/Packager.php';
13
-
14
- class GuzzlePearPharPackageTask extends Task
15
- {
16
- private $version;
17
- private $deploy = true;
18
- private $makephar = true;
19
-
20
- private $subpackages = array();
21
-
22
- public function setVersion($str)
23
- {
24
- $this->version = $str;
25
- }
26
-
27
- public function getVersion()
28
- {
29
- return $this->version;
30
- }
31
-
32
- public function setDeploy($deploy)
33
- {
34
- $this->deploy = (bool) $deploy;
35
- }
36
-
37
- public function getDeploy()
38
- {
39
- return $this->deploy;
40
- }
41
-
42
- public function setMakephar($makephar)
43
- {
44
- $this->makephar = (bool) $makephar;
45
- }
46
-
47
- public function getMakephar()
48
- {
49
- return $this->makephar;
50
- }
51
-
52
- private $basedir;
53
- private $guzzleinfo;
54
- private $changelog_release_date;
55
- private $changelog_notes = '-';
56
-
57
- public function main()
58
- {
59
- $this->basedir = $this->getProject()->getBasedir();
60
-
61
- if (!is_dir((string) $this->basedir.'/.subsplit')) {
62
- throw new BuildException('PEAR packaging requires .subsplit directory');
63
- }
64
-
65
- // main composer file
66
- $composer_file = file_get_contents((string) $this->basedir.'/.subsplit/composer.json');
67
- $this->guzzleinfo = json_decode($composer_file, true);
68
-
69
- // make sure we have a target
70
- $pearwork = (string) $this->basedir . '/build/pearwork';
71
- if (!is_dir($pearwork)) {
72
- mkdir($pearwork, 0777, true);
73
- }
74
- $pearlogs = (string) $this->basedir . '/build/artifacts/logs';
75
- if (!is_dir($pearlogs)) {
76
- mkdir($pearlogs, 0777, true);
77
- }
78
-
79
- $version = $this->getVersion();
80
- $this->grabChangelog();
81
- if ($version[0] == '2') {
82
- $this->log('building single PEAR package');
83
- $this->buildSinglePackage();
84
- } else {
85
- // $this->log("building PEAR subpackages");
86
- // $this->createSubPackages();
87
- // $this->log("building PEAR bundle package");
88
- $this->buildSinglePackage();
89
- }
90
-
91
- if ($this->getMakephar()) {
92
- $this->log("building PHAR");
93
- $this->getProject()->executeTarget('package-phar');
94
- }
95
-
96
- if ($this->getDeploy()) {
97
- $this->doDeployment();
98
- }
99
- }
100
-
101
- public function doDeployment()
102
- {
103
- $basedir = (string) $this->basedir;
104
- $this->log('beginning PEAR/PHAR deployment');
105
-
106
- chdir($basedir . '/build/pearwork');
107
- if (!is_dir('./channel')) {
108
- mkdir('./channel');
109
- }
110
-
111
- // Pull the PEAR channel down locally
112
- passthru('aws s3 sync s3://pear.guzzlephp.org ./channel');
113
-
114
- // add PEAR packages
115
- foreach (scandir('./') as $file) {
116
- if (substr($file, -4) == '.tgz') {
117
- passthru('pirum add ./channel ' . $file);
118
- }
119
- }
120
-
121
- // if we have a new phar, add it
122
- if ($this->getMakephar() && file_exists($basedir . '/build/artifacts/guzzle.phar')) {
123
- rename($basedir . '/build/artifacts/guzzle.phar', './channel/guzzle.phar');
124
- }
125
-
126
- // Sync up with the S3 bucket
127
- chdir($basedir . '/build/pearwork/channel');
128
- passthru('aws s3 sync . s3://pear.guzzlephp.org');
129
- }
130
-
131
- public function buildSinglePackage()
132
- {
133
- $v = $this->getVersion();
134
- $apiversion = $v[0] . '.0.0';
135
-
136
- $opts = array(
137
- 'packagedirectory' => (string) $this->basedir . '/.subsplit/src/',
138
- 'filelistgenerator' => 'file',
139
- 'ignore' => array('*composer.json'),
140
- 'baseinstalldir' => '/',
141
- 'packagefile' => 'package.xml'
142
- //'outputdirectory' => (string) $this->basedir . '/build/pearwork/'
143
- );
144
- $pfm = new PEAR_PackageFileManager2();
145
- $pfm->setOptions($opts);
146
- $pfm->addRole('md', 'doc');
147
- $pfm->addRole('pem', 'php');
148
- $pfm->setPackage('Guzzle');
149
- $pfm->setSummary("Object-oriented PHP HTTP Client for PHP 5.3+");
150
- $pfm->setDescription($this->guzzleinfo['description']);
151
- $pfm->setPackageType('php');
152
- $pfm->setChannel('guzzlephp.org/pear');
153
- $pfm->setAPIVersion($apiversion);
154
- $pfm->setReleaseVersion($this->getVersion());
155
- $pfm->setAPIStability('stable');
156
- $pfm->setReleaseStability('stable');
157
- $pfm->setNotes($this->changelog_notes);
158
- $pfm->setPackageType('php');
159
- $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE');
160
- $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes');
161
- $pfm->setDate($this->changelog_release_date);
162
- $pfm->generateContents();
163
-
164
- $phpdep = $this->guzzleinfo['require']['php'];
165
- $phpdep = str_replace('>=', '', $phpdep);
166
- $pfm->setPhpDep($phpdep);
167
- $pfm->addExtensionDep('required', 'curl');
168
- $pfm->setPearinstallerDep('1.4.6');
169
- $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0');
170
- if (!empty($this->subpackages)) {
171
- foreach ($this->subpackages as $package) {
172
- $pkg = dirname($package);
173
- $pkg = str_replace('/', '_', $pkg);
174
- $pfm->addConflictingPackageDepWithChannel($pkg, 'guzzlephp.org/pear', false, $apiversion);
175
- }
176
- }
177
-
178
- ob_start();
179
- $startdir = getcwd();
180
- chdir((string) $this->basedir . '/build/pearwork');
181
-
182
- echo "DEBUGGING GENERATED PACKAGE FILE\n";
183
- $result = $pfm->debugPackageFile();
184
- if ($result) {
185
- $out = $pfm->writePackageFile();
186
- echo "\n\n\nWRITE PACKAGE FILE RESULT:\n";
187
- var_dump($out);
188
- // load up package file and build package
189
- $packager = new PEAR_Packager();
190
- echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n";
191
- $dest_package = $packager->package($opts['packagedirectory'].'package.xml');
192
- var_dump($dest_package);
193
- } else {
194
- echo "\n\n\nDEBUGGING RESULT:\n";
195
- var_dump($result);
196
- }
197
- echo "removing package.xml";
198
- unlink($opts['packagedirectory'].'package.xml');
199
- $log = ob_get_clean();
200
- file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package.log', $log);
201
- chdir($startdir);
202
- }
203
-
204
- public function createSubPackages()
205
- {
206
- $this->findComponents();
207
-
208
- foreach ($this->subpackages as $package) {
209
- $baseinstalldir = dirname($package);
210
- $dir = (string) $this->basedir.'/.subsplit/src/' . $baseinstalldir;
211
- $composer_file = file_get_contents((string) $this->basedir.'/.subsplit/src/'. $package);
212
- $package_info = json_decode($composer_file, true);
213
- $this->log('building ' . $package_info['target-dir'] . ' subpackage');
214
- $this->buildSubPackage($dir, $baseinstalldir, $package_info);
215
- }
216
- }
217
-
218
- public function buildSubPackage($dir, $baseinstalldir, $info)
219
- {
220
- $package = str_replace('/', '_', $baseinstalldir);
221
- $opts = array(
222
- 'packagedirectory' => $dir,
223
- 'filelistgenerator' => 'file',
224
- 'ignore' => array('*composer.json', '*package.xml'),
225
- 'baseinstalldir' => '/' . $info['target-dir'],
226
- 'packagefile' => 'package.xml'
227
- );
228
- $pfm = new PEAR_PackageFileManager2();
229
- $pfm->setOptions($opts);
230
- $pfm->setPackage($package);
231
- $pfm->setSummary($info['description']);
232
- $pfm->setDescription($info['description']);
233
- $pfm->setPackageType('php');
234
- $pfm->setChannel('guzzlephp.org/pear');
235
- $pfm->setAPIVersion('3.0.0');
236
- $pfm->setReleaseVersion($this->getVersion());
237
- $pfm->setAPIStability('stable');
238
- $pfm->setReleaseStability('stable');
239
- $pfm->setNotes($this->changelog_notes);
240
- $pfm->setPackageType('php');
241
- $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE');
242
- $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes');
243
- $pfm->setDate($this->changelog_release_date);
244
- $pfm->generateContents();
245
-
246
- $phpdep = $this->guzzleinfo['require']['php'];
247
- $phpdep = str_replace('>=', '', $phpdep);
248
- $pfm->setPhpDep($phpdep);
249
- $pfm->setPearinstallerDep('1.4.6');
250
-
251
- foreach ($info['require'] as $type => $version) {
252
- if ($type == 'php') {
253
- continue;
254
- }
255
- if ($type == 'symfony/event-dispatcher') {
256
- $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0');
257
- }
258
- if ($type == 'ext-curl') {
259
- $pfm->addExtensionDep('required', 'curl');
260
- }
261
- if (substr($type, 0, 6) == 'guzzle') {
262
- $gdep = str_replace('/', ' ', $type);
263
- $gdep = ucwords($gdep);
264
- $gdep = str_replace(' ', '_', $gdep);
265
- $pfm->addPackageDepWithChannel('required', $gdep, 'guzzlephp.org/pear', $this->getVersion());
266
- }
267
- }
268
-
269
- // can't have main Guzzle package AND sub-packages
270
- $pfm->addConflictingPackageDepWithChannel('Guzzle', 'guzzlephp.org/pear', false, $apiversion);
271
-
272
- ob_start();
273
- $startdir = getcwd();
274
- chdir((string) $this->basedir . '/build/pearwork');
275
-
276
- echo "DEBUGGING GENERATED PACKAGE FILE\n";
277
- $result = $pfm->debugPackageFile();
278
- if ($result) {
279
- $out = $pfm->writePackageFile();
280
- echo "\n\n\nWRITE PACKAGE FILE RESULT:\n";
281
- var_dump($out);
282
- // load up package file and build package
283
- $packager = new PEAR_Packager();
284
- echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n";
285
- $dest_package = $packager->package($opts['packagedirectory'].'/package.xml');
286
- var_dump($dest_package);
287
- } else {
288
- echo "\n\n\nDEBUGGING RESULT:\n";
289
- var_dump($result);
290
- }
291
- echo "removing package.xml";
292
- unlink($opts['packagedirectory'].'/package.xml');
293
- $log = ob_get_clean();
294
- file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package_'.$package.'.log', $log);
295
- chdir($startdir);
296
- }
297
-
298
- public function findComponents()
299
- {
300
- $ds = new DirectoryScanner();
301
- $ds->setBasedir((string) $this->basedir.'/.subsplit/src');
302
- $ds->setIncludes(array('**/composer.json'));
303
- $ds->scan();
304
- $files = $ds->getIncludedFiles();
305
- $this->subpackages = $files;
306
- }
307
-
308
- public function grabChangelog()
309
- {
310
- $cl = file((string) $this->basedir.'/.subsplit/CHANGELOG.md');
311
- $notes = '';
312
- $in_version = false;
313
- $release_date = null;
314
-
315
- foreach ($cl as $line) {
316
- $line = trim($line);
317
- if (preg_match('/^\* '.$this->getVersion().' \(([0-9\-]+)\)$/', $line, $matches)) {
318
- $release_date = $matches[1];
319
- $in_version = true;
320
- continue;
321
- }
322
- if ($in_version && empty($line) && empty($notes)) {
323
- continue;
324
- }
325
- if ($in_version && ! empty($line)) {
326
- $notes .= $line."\n";
327
- }
328
- if ($in_version && empty($line) && !empty($notes)) {
329
- $in_version = false;
330
- }
331
- }
332
- $this->changelog_release_date = $release_date;
333
-
334
- if (! empty($notes)) {
335
- $this->changelog_notes = $notes;
336
- }
337
- }
338
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phing/tasks/GuzzleSubSplitTask.php DELETED
@@ -1,385 +0,0 @@
1
- <?php
2
- /**
3
- * Phing wrapper around git subsplit.
4
- *
5
- * @see https://github.com/dflydev/git-subsplit
6
- * @copyright 2012 Clay Loveless <clay@php.net>
7
- * @license http://claylo.mit-license.org/2012/ MIT License
8
- */
9
-
10
- require_once 'phing/tasks/ext/git/GitBaseTask.php';
11
-
12
- // base - base of tree to split out
13
- // subIndicatorFile - composer.json, package.xml?
14
- class GuzzleSubSplitTask extends GitBaseTask
15
- {
16
- /**
17
- * What git repository to pull from and publish to
18
- */
19
- protected $remote = null;
20
-
21
- /**
22
- * Publish for comma-separated heads instead of all heads
23
- */
24
- protected $heads = null;
25
-
26
- /**
27
- * Publish for comma-separated tags instead of all tags
28
- */
29
- protected $tags = null;
30
-
31
- /**
32
- * Base of the tree RELATIVE TO .subsplit working dir
33
- */
34
- protected $base = null;
35
-
36
- /**
37
- * The presence of this file will indicate that the directory it resides
38
- * in is at the top level of a split.
39
- */
40
- protected $subIndicatorFile = 'composer.json';
41
-
42
- /**
43
- * Do everything except actually send the update.
44
- */
45
- protected $dryRun = null;
46
-
47
- /**
48
- * Do not sync any heads.
49
- */
50
- protected $noHeads = false;
51
-
52
- /**
53
- * Do not sync any tags.
54
- */
55
- protected $noTags = false;
56
-
57
- /**
58
- * The splits we found in the heads
59
- */
60
- protected $splits;
61
-
62
- public function setRemote($str)
63
- {
64
- $this->remote = $str;
65
- }
66
-
67
- public function getRemote()
68
- {
69
- return $this->remote;
70
- }
71
-
72
- public function setHeads($str)
73
- {
74
- $this->heads = explode(',', $str);
75
- }
76
-
77
- public function getHeads()
78
- {
79
- return $this->heads;
80
- }
81
-
82
- public function setTags($str)
83
- {
84
- $this->tags = explode(',', $str);
85
- }
86
-
87
- public function getTags()
88
- {
89
- return $this->tags;
90
- }
91
-
92
- public function setBase($str)
93
- {
94
- $this->base = $str;
95
- }
96
-
97
- public function getBase()
98
- {
99
- return $this->base;
100
- }
101
-
102
- public function setSubIndicatorFile($str)
103
- {
104
- $this->subIndicatorFile = $str;
105
- }
106
-
107
- public function getSubIndicatorFile()
108
- {
109
- return $this->subIndicatorFile;
110
- }
111
-
112
- public function setDryRun($bool)
113
- {
114
- $this->dryRun = (bool) $bool;
115
- }
116
-
117
- public function getDryRun()
118
- {
119
- return $this->dryRun;
120
- }
121
-
122
- public function setNoHeads($bool)
123
- {
124
- $this->noHeads = (bool) $bool;
125
- }
126
-
127
- public function getNoHeads()
128
- {
129
- return $this->noHeads;
130
- }
131
-
132
- public function setNoTags($bool)
133
- {
134
- $this->noTags = (bool) $bool;
135
- }
136
-
137
- public function getNoTags()
138
- {
139
- return $this->noTags;
140
- }
141
-
142
- /**
143
- * GitClient from VersionControl_Git
144
- */
145
- protected $client = null;
146
-
147
- /**
148
- * The main entry point
149
- */
150
- public function main()
151
- {
152
- $repo = $this->getRepository();
153
- if (empty($repo)) {
154
- throw new BuildException('"repository" is a required parameter');
155
- }
156
-
157
- $remote = $this->getRemote();
158
- if (empty($remote)) {
159
- throw new BuildException('"remote" is a required parameter');
160
- }
161
-
162
- chdir($repo);
163
- $this->client = $this->getGitClient(false, $repo);
164
-
165
- // initalized yet?
166
- if (!is_dir('.subsplit')) {
167
- $this->subsplitInit();
168
- } else {
169
- // update
170
- $this->subsplitUpdate();
171
- }
172
-
173
- // find all splits based on heads requested
174
- $this->findSplits();
175
-
176
- // check that GitHub has the repos
177
- $this->verifyRepos();
178
-
179
- // execute the subsplits
180
- $this->publish();
181
- }
182
-
183
- public function publish()
184
- {
185
- $this->log('DRY RUN ONLY FOR NOW');
186
- $base = $this->getBase();
187
- $base = rtrim($base, '/') . '/';
188
- $org = $this->getOwningTarget()->getProject()->getProperty('github.org');
189
-
190
- $splits = array();
191
-
192
- $heads = $this->getHeads();
193
- foreach ($heads as $head) {
194
- foreach ($this->splits[$head] as $component => $meta) {
195
- $splits[] = $base . $component . ':git@github.com:'. $org.'/'.$meta['repo'];
196
- }
197
-
198
- $cmd = 'git subsplit publish ';
199
- $cmd .= escapeshellarg(implode(' ', $splits));
200
-
201
- if ($this->getNoHeads()) {
202
- $cmd .= ' --no-heads';
203
- } else {
204
- $cmd .= ' --heads='.$head;
205
- }
206
-
207
- if ($this->getNoTags()) {
208
- $cmd .= ' --no-tags';
209
- } else {
210
- if ($this->getTags()) {
211
- $cmd .= ' --tags=' . escapeshellarg(implode(' ', $this->getTags()));
212
- }
213
- }
214
-
215
- passthru($cmd);
216
- }
217
- }
218
-
219
- /**
220
- * Runs `git subsplit update`
221
- */
222
- public function subsplitUpdate()
223
- {
224
- $repo = $this->getRepository();
225
- $this->log('git-subsplit update...');
226
- $cmd = $this->client->getCommand('subsplit');
227
- $cmd->addArgument('update');
228
- try {
229
- $cmd->execute();
230
- } catch (Exception $e) {
231
- throw new BuildException('git subsplit update failed'. $e);
232
- }
233
- chdir($repo . '/.subsplit');
234
- passthru('php ../composer.phar update --dev');
235
- chdir($repo);
236
- }
237
-
238
- /**
239
- * Runs `git subsplit init` based on the remote repository.
240
- */
241
- public function subsplitInit()
242
- {
243
- $remote = $this->getRemote();
244
- $cmd = $this->client->getCommand('subsplit');
245
- $this->log('running git-subsplit init ' . $remote);
246
-
247
- $cmd->setArguments(array(
248
- 'init',
249
- $remote
250
- ));
251
-
252
- try {
253
- $output = $cmd->execute();
254
- } catch (Exception $e) {
255
- throw new BuildException('git subsplit init failed'. $e);
256
- }
257
- $this->log(trim($output), Project::MSG_INFO);
258
- $repo = $this->getRepository();
259
- chdir($repo . '/.subsplit');
260
- passthru('php ../composer.phar install --dev');
261
- chdir($repo);
262
- }
263
-
264
- /**
265
- * Find the composer.json files using Phing's directory scanner
266
- *
267
- * @return array
268
- */
269
- protected function findSplits()
270
- {
271
- $this->log("checking heads for subsplits");
272
- $repo = $this->getRepository();
273
- $base = $this->getBase();
274
-
275
- $splits = array();
276
- $heads = $this->getHeads();
277
-
278
- if (!empty($base)) {
279
- $base = '/' . ltrim($base, '/');
280
- } else {
281
- $base = '/';
282
- }
283
-
284
- chdir($repo . '/.subsplit');
285
- foreach ($heads as $head) {
286
- $splits[$head] = array();
287
-
288
- // check each head requested *BEFORE* the actual subtree split command gets it
289
- passthru("git checkout '$head'");
290
- $ds = new DirectoryScanner();
291
- $ds->setBasedir($repo . '/.subsplit' . $base);
292
- $ds->setIncludes(array('**/'.$this->subIndicatorFile));
293
- $ds->scan();
294
- $files = $ds->getIncludedFiles();
295
-
296
- // Process the files we found
297
- foreach ($files as $file) {
298
- $pkg = file_get_contents($repo . '/.subsplit' . $base .'/'. $file);
299
- $pkg_json = json_decode($pkg, true);
300
- $name = $pkg_json['name'];
301
- $component = str_replace('/composer.json', '', $file);
302
- // keep this for split cmd
303
- $tmpreponame = explode('/', $name);
304
- $reponame = $tmpreponame[1];
305
- $splits[$head][$component]['repo'] = $reponame;
306
- $nscomponent = str_replace('/', '\\', $component);
307
- $splits[$head][$component]['desc'] = "[READ ONLY] Subtree split of $nscomponent: " . $pkg_json['description'];
308
- }
309
- }
310
-
311
- // go back to how we found it
312
- passthru("git checkout master");
313
- chdir($repo);
314
- $this->splits = $splits;
315
- }
316
-
317
- /**
318
- * Based on list of repositories we determined we *should* have, talk
319
- * to GitHub and make sure they're all there.
320
- *
321
- */
322
- protected function verifyRepos()
323
- {
324
- $this->log('verifying GitHub target repos');
325
- $github_org = $this->getOwningTarget()->getProject()->getProperty('github.org');
326
- $github_creds = $this->getOwningTarget()->getProject()->getProperty('github.basicauth');
327
-
328
- if ($github_creds == 'username:password') {
329
- $this->log('Skipping GitHub repo checks. Update github.basicauth in build.properties to verify repos.', 1);
330
- return;
331
- }
332
-
333
- $ch = curl_init('https://api.github.com/orgs/'.$github_org.'/repos?type=all');
334
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
335
- curl_setopt($ch, CURLOPT_USERPWD, $github_creds);
336
- // change this when we know we can use our bundled CA bundle!
337
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
338
- $result = curl_exec($ch);
339
- curl_close($ch);
340
- $repos = json_decode($result, true);
341
- $existing_repos = array();
342
-
343
- // parse out the repos we found on GitHub
344
- foreach ($repos as $repo) {
345
- $tmpreponame = explode('/', $repo['full_name']);
346
- $reponame = $tmpreponame[1];
347
- $existing_repos[$reponame] = $repo['description'];
348
- }
349
-
350
- $heads = $this->getHeads();
351
- foreach ($heads as $head) {
352
- foreach ($this->splits[$head] as $component => $meta) {
353
-
354
- $reponame = $meta['repo'];
355
-
356
- if (!isset($existing_repos[$reponame])) {
357
- $this->log("Creating missing repo $reponame");
358
- $payload = array(
359
- 'name' => $reponame,
360
- 'description' => $meta['desc'],
361
- 'homepage' => 'http://www.guzzlephp.org/',
362
- 'private' => true,
363
- 'has_issues' => false,
364
- 'has_wiki' => false,
365
- 'has_downloads' => true,
366
- 'auto_init' => false
367
- );
368
- $ch = curl_init('https://api.github.com/orgs/'.$github_org.'/repos');
369
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
370
- curl_setopt($ch, CURLOPT_USERPWD, $github_creds);
371
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
372
- curl_setopt($ch, CURLOPT_POST, 1);
373
- curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
374
- // change this when we know we can use our bundled CA bundle!
375
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
376
- $result = curl_exec($ch);
377
- echo "Response code: ".curl_getinfo($ch, CURLINFO_HTTP_CODE)."\n";
378
- curl_close($ch);
379
- } else {
380
- $this->log("Repo $reponame exists", 2);
381
- }
382
- }
383
- }
384
- }
385
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/phpunit.xml.dist DELETED
@@ -1,48 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <phpunit bootstrap="./tests/bootstrap.php"
3
- colors="true"
4
- processIsolation="false"
5
- stopOnFailure="false"
6
- syntaxCheck="false"
7
- convertErrorsToExceptions="true"
8
- convertNoticesToExceptions="true"
9
- convertWarningsToExceptions="true"
10
- testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader">
11
-
12
- <testsuites>
13
- <testsuite>
14
- <directory>./tests/Guzzle/Tests</directory>
15
- </testsuite>
16
- </testsuites>
17
-
18
- <logging>
19
- <log type="junit" target="build/artifacts/logs/junit.xml" logIncompleteSkipped="false" />
20
- </logging>
21
-
22
- <filter>
23
- <whitelist>
24
- <directory suffix=".php">./src/Guzzle</directory>
25
- <exclude>
26
- <directory suffix="Interface.php">./src/Guzzle</directory>
27
- <file>./src/Guzzle/Common/Exception/GuzzleException.php</file>
28
- <file>./src/Guzzle/Http/Exception/HttpException.php</file>
29
- <file>./src/Guzzle/Http/Exception/ServerErrorResponseException.php</file>
30
- <file>./src/Guzzle/Http/Exception/ClientErrorResponseException.php</file>
31
- <file>./src/Guzzle/Http/Exception/TooManyRedirectsException.php</file>
32
- <file>./src/Guzzle/Http/Exception/CouldNotRewindStreamException.php</file>
33
- <file>./src/Guzzle/Common/Exception/BadMethodCallException.php</file>
34
- <file>./src/Guzzle/Common/Exception/InvalidArgumentException.php</file>
35
- <file>./src/Guzzle/Common/Exception/RuntimeException.php</file>
36
- <file>./src/Guzzle/Common/Exception/UnexpectedValueException.php</file>
37
- <file>./src/Guzzle/Service/Exception/ClientNotFoundException.php</file>
38
- <file>./src/Guzzle/Service/Exception/CommandException.php</file>
39
- <file>./src/Guzzle/Service/Exception/DescriptionBuilderException.php</file>
40
- <file>./src/Guzzle/Service/Exception/ServiceBuilderException.php</file>
41
- <file>./src/Guzzle/Service/Exception/ServiceNotFoundException.php</file>
42
- <file>./src/Guzzle/Service/Exception/ValidationException.php</file>
43
- <file>./src/Guzzle/Service/Exception/JsonException.php</file>
44
- </exclude>
45
- </whitelist>
46
- </filter>
47
-
48
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/AbstractBatchDecorator.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * Abstract decorator used when decorating a BatchInterface
7
- */
8
- abstract class AbstractBatchDecorator implements BatchInterface
9
- {
10
- /** @var BatchInterface Decorated batch object */
11
- protected $decoratedBatch;
12
-
13
- /**
14
- * @param BatchInterface $decoratedBatch BatchInterface that is being decorated
15
- */
16
- public function __construct(BatchInterface $decoratedBatch)
17
- {
18
- $this->decoratedBatch = $decoratedBatch;
19
- }
20
-
21
- /**
22
- * Allow decorators to implement custom methods
23
- *
24
- * @param string $method Missing method name
25
- * @param array $args Method arguments
26
- *
27
- * @return mixed
28
- * @codeCoverageIgnore
29
- */
30
- public function __call($method, array $args)
31
- {
32
- return call_user_func_array(array($this->decoratedBatch, $method), $args);
33
- }
34
-
35
- public function add($item)
36
- {
37
- $this->decoratedBatch->add($item);
38
-
39
- return $this;
40
- }
41
-
42
- public function flush()
43
- {
44
- return $this->decoratedBatch->flush();
45
- }
46
-
47
- public function isEmpty()
48
- {
49
- return $this->decoratedBatch->isEmpty();
50
- }
51
-
52
- /**
53
- * Trace the decorators associated with the batch
54
- *
55
- * @return array
56
- */
57
- public function getDecorators()
58
- {
59
- $found = array($this);
60
- if (method_exists($this->decoratedBatch, 'getDecorators')) {
61
- $found = array_merge($found, $this->decoratedBatch->getDecorators());
62
- }
63
-
64
- return $found;
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/Batch.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Batch\Exception\BatchTransferException;
6
-
7
- /**
8
- * Default batch implementation used to convert queued items into smaller chunks of batches using a
9
- * {@see BatchDivisorIterface} and transfers each batch using a {@see BatchTransferInterface}.
10
- *
11
- * Any exception encountered during a flush operation will throw a {@see BatchTransferException} object containing the
12
- * batch that failed. After an exception is encountered, you can flush the batch again to attempt to finish transferring
13
- * any previously created batches or queued items.
14
- */
15
- class Batch implements BatchInterface
16
- {
17
- /** @var \SplQueue Queue of items in the queue */
18
- protected $queue;
19
-
20
- /** @var array Divided batches to be transferred */
21
- protected $dividedBatches;
22
-
23
- /** @var BatchTransferInterface */
24
- protected $transferStrategy;
25
-
26
- /** @var BatchDivisorInterface */
27
- protected $divisionStrategy;
28
-
29
- /**
30
- * @param BatchTransferInterface $transferStrategy Strategy used to transfer items
31
- * @param BatchDivisorInterface $divisionStrategy Divisor used to create batches
32
- */
33
- public function __construct(BatchTransferInterface $transferStrategy, BatchDivisorInterface $divisionStrategy)
34
- {
35
- $this->transferStrategy = $transferStrategy;
36
- $this->divisionStrategy = $divisionStrategy;
37
- $this->queue = new \SplQueue();
38
- $this->queue->setIteratorMode(\SplQueue::IT_MODE_DELETE);
39
- $this->dividedBatches = array();
40
- }
41
-
42
- public function add($item)
43
- {
44
- $this->queue->enqueue($item);
45
-
46
- return $this;
47
- }
48
-
49
- public function flush()
50
- {
51
- $this->createBatches();
52
-
53
- $items = array();
54
- foreach ($this->dividedBatches as $batchIndex => $dividedBatch) {
55
- while ($dividedBatch->valid()) {
56
- $batch = $dividedBatch->current();
57
- $dividedBatch->next();
58
- try {
59
- $this->transferStrategy->transfer($batch);
60
- $items = array_merge($items, $batch);
61
- } catch (\Exception $e) {
62
- throw new BatchTransferException($batch, $items, $e, $this->transferStrategy, $this->divisionStrategy);
63
- }
64
- }
65
- // Keep the divided batch down to a minimum in case of a later exception
66
- unset($this->dividedBatches[$batchIndex]);
67
- }
68
-
69
- return $items;
70
- }
71
-
72
- public function isEmpty()
73
- {
74
- return count($this->queue) == 0 && count($this->dividedBatches) == 0;
75
- }
76
-
77
- /**
78
- * Create batches for any queued items
79
- */
80
- protected function createBatches()
81
- {
82
- if (count($this->queue)) {
83
- if ($batches = $this->divisionStrategy->createBatches($this->queue)) {
84
- // Convert arrays into iterators
85
- if (is_array($batches)) {
86
- $batches = new \ArrayIterator($batches);
87
- }
88
- $this->dividedBatches[] = $batches;
89
- }
90
- }
91
- }
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchBuilder.php DELETED
@@ -1,199 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
- use Guzzle\Common\Exception\RuntimeException;
7
-
8
- /**
9
- * Builder used to create custom batch objects
10
- */
11
- class BatchBuilder
12
- {
13
- /** @var bool Whether or not the batch should automatically flush*/
14
- protected $autoFlush = false;
15
-
16
- /** @var bool Whether or not to maintain a batch history */
17
- protected $history = false;
18
-
19
- /** @var bool Whether or not to buffer exceptions encountered in transfer */
20
- protected $exceptionBuffering = false;
21
-
22
- /** @var mixed Callable to invoke each time a flush completes */
23
- protected $afterFlush;
24
-
25
- /** @var BatchTransferInterface Object used to transfer items in the queue */
26
- protected $transferStrategy;
27
-
28
- /** @var BatchDivisorInterface Object used to divide the queue into batches */
29
- protected $divisorStrategy;
30
-
31
- /** @var array of Mapped transfer strategies by handle name */
32
- protected static $mapping = array(
33
- 'request' => 'Guzzle\Batch\BatchRequestTransfer',
34
- 'command' => 'Guzzle\Batch\BatchCommandTransfer'
35
- );
36
-
37
- /**
38
- * Create a new instance of the BatchBuilder
39
- *
40
- * @return BatchBuilder
41
- */
42
- public static function factory()
43
- {
44
- return new self();
45
- }
46
-
47
- /**
48
- * Automatically flush the batch when the size of the queue reaches a certain threshold. Adds {@see FlushingBatch}.
49
- *
50
- * @param $threshold Number of items to allow in the queue before a flush
51
- *
52
- * @return BatchBuilder
53
- */
54
- public function autoFlushAt($threshold)
55
- {
56
- $this->autoFlush = $threshold;
57
-
58
- return $this;
59
- }
60
-
61
- /**
62
- * Maintain a history of all items that have been transferred using the batch. Adds {@see HistoryBatch}.
63
- *
64
- * @return BatchBuilder
65
- */
66
- public function keepHistory()
67
- {
68
- $this->history = true;
69
-
70
- return $this;
71
- }
72
-
73
- /**
74
- * Buffer exceptions thrown during transfer so that you can transfer as much as possible, and after a transfer
75
- * completes, inspect each exception that was thrown. Enables the {@see ExceptionBufferingBatch} decorator.
76
- *
77
- * @return BatchBuilder
78
- */
79
- public function bufferExceptions()
80
- {
81
- $this->exceptionBuffering = true;
82
-
83
- return $this;
84
- }
85
-
86
- /**
87
- * Notify a callable each time a batch flush completes. Enables the {@see NotifyingBatch} decorator.
88
- *
89
- * @param mixed $callable Callable function to notify
90
- *
91
- * @return BatchBuilder
92
- * @throws InvalidArgumentException if the argument is not callable
93
- */
94
- public function notify($callable)
95
- {
96
- $this->afterFlush = $callable;
97
-
98
- return $this;
99
- }
100
-
101
- /**
102
- * Configures the batch to transfer batches of requests. Associates a {@see \Guzzle\Http\BatchRequestTransfer}
103
- * object as both the transfer and divisor strategy.
104
- *
105
- * @param int $batchSize Batch size for each batch of requests
106
- *
107
- * @return BatchBuilder
108
- */
109
- public function transferRequests($batchSize = 50)
110
- {
111
- $className = self::$mapping['request'];
112
- $this->transferStrategy = new $className($batchSize);
113
- $this->divisorStrategy = $this->transferStrategy;
114
-
115
- return $this;
116
- }
117
-
118
- /**
119
- * Configures the batch to transfer batches commands. Associates as
120
- * {@see \Guzzle\Service\Command\BatchCommandTransfer} as both the transfer and divisor strategy.
121
- *
122
- * @param int $batchSize Batch size for each batch of commands
123
- *
124
- * @return BatchBuilder
125
- */
126
- public function transferCommands($batchSize = 50)
127
- {
128
- $className = self::$mapping['command'];
129
- $this->transferStrategy = new $className($batchSize);
130
- $this->divisorStrategy = $this->transferStrategy;
131
-
132
- return $this;
133
- }
134
-
135
- /**
136
- * Specify the strategy used to divide the queue into an array of batches
137
- *
138
- * @param BatchDivisorInterface $divisorStrategy Strategy used to divide a batch queue into batches
139
- *
140
- * @return BatchBuilder
141
- */
142
- public function createBatchesWith(BatchDivisorInterface $divisorStrategy)
143
- {
144
- $this->divisorStrategy = $divisorStrategy;
145
-
146
- return $this;
147
- }
148
-
149
- /**
150
- * Specify the strategy used to transport the items when flush is called
151
- *
152
- * @param BatchTransferInterface $transferStrategy How items are transferred
153
- *
154
- * @return BatchBuilder
155
- */
156
- public function transferWith(BatchTransferInterface $transferStrategy)
157
- {
158
- $this->transferStrategy = $transferStrategy;
159
-
160
- return $this;
161
- }
162
-
163
- /**
164
- * Create and return the instantiated batch
165
- *
166
- * @return BatchInterface
167
- * @throws RuntimeException if no transfer strategy has been specified
168
- */
169
- public function build()
170
- {
171
- if (!$this->transferStrategy) {
172
- throw new RuntimeException('No transfer strategy has been specified');
173
- }
174
-
175
- if (!$this->divisorStrategy) {
176
- throw new RuntimeException('No divisor strategy has been specified');
177
- }
178
-
179
- $batch = new Batch($this->transferStrategy, $this->divisorStrategy);
180
-
181
- if ($this->exceptionBuffering) {
182
- $batch = new ExceptionBufferingBatch($batch);
183
- }
184
-
185
- if ($this->afterFlush) {
186
- $batch = new NotifyingBatch($batch, $this->afterFlush);
187
- }
188
-
189
- if ($this->autoFlush) {
190
- $batch = new FlushingBatch($batch, $this->autoFlush);
191
- }
192
-
193
- if ($this->history) {
194
- $batch = new HistoryBatch($batch);
195
- }
196
-
197
- return $batch;
198
- }
199
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureDivisor.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
-
7
- /**
8
- * Divides batches using a callable
9
- */
10
- class BatchClosureDivisor implements BatchDivisorInterface
11
- {
12
- /** @var callable Method used to divide the batches */
13
- protected $callable;
14
-
15
- /** @var mixed $context Context passed to the callable */
16
- protected $context;
17
-
18
- /**
19
- * @param callable $callable Method used to divide the batches. The method must accept an \SplQueue and return an
20
- * array of arrays containing the divided items.
21
- * @param mixed $context Optional context to pass to the batch divisor
22
- *
23
- * @throws InvalidArgumentException if the callable is not callable
24
- */
25
- public function __construct($callable, $context = null)
26
- {
27
- if (!is_callable($callable)) {
28
- throw new InvalidArgumentException('Must pass a callable');
29
- }
30
-
31
- $this->callable = $callable;
32
- $this->context = $context;
33
- }
34
-
35
- public function createBatches(\SplQueue $queue)
36
- {
37
- return call_user_func($this->callable, $queue, $this->context);
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchClosureTransfer.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
-
7
- /**
8
- * Batch transfer strategy where transfer logic can be defined via a Closure.
9
- * This class is to be used with {@see Guzzle\Batch\BatchInterface}
10
- */
11
- class BatchClosureTransfer implements BatchTransferInterface
12
- {
13
- /** @var callable A closure that performs the transfer */
14
- protected $callable;
15
-
16
- /** @var mixed $context Context passed to the callable */
17
- protected $context;
18
-
19
- /**
20
- * @param mixed $callable Callable that performs the transfer. This function should accept two arguments:
21
- * (array $batch, mixed $context).
22
- * @param mixed $context Optional context to pass to the batch divisor
23
- *
24
- * @throws InvalidArgumentException
25
- */
26
- public function __construct($callable, $context = null)
27
- {
28
- if (!is_callable($callable)) {
29
- throw new InvalidArgumentException('Argument must be callable');
30
- }
31
-
32
- $this->callable = $callable;
33
- $this->context = $context;
34
- }
35
-
36
- public function transfer(array $batch)
37
- {
38
- return empty($batch) ? null : call_user_func($this->callable, $batch, $this->context);
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchCommandTransfer.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Batch\BatchTransferInterface;
6
- use Guzzle\Batch\BatchDivisorInterface;
7
- use Guzzle\Common\Exception\InvalidArgumentException;
8
- use Guzzle\Service\Command\CommandInterface;
9
- use Guzzle\Service\Exception\InconsistentClientTransferException;
10
-
11
- /**
12
- * Efficiently transfers multiple commands in parallel per client
13
- * This class is to be used with {@see Guzzle\Batch\BatchInterface}
14
- */
15
- class BatchCommandTransfer implements BatchTransferInterface, BatchDivisorInterface
16
- {
17
- /** @var int Size of each command batch */
18
- protected $batchSize;
19
-
20
- /**
21
- * @param int $batchSize Size of each batch
22
- */
23
- public function __construct($batchSize = 50)
24
- {
25
- $this->batchSize = $batchSize;
26
- }
27
-
28
- /**
29
- * Creates batches by grouping commands by their associated client
30
- * {@inheritdoc}
31
- */
32
- public function createBatches(\SplQueue $queue)
33
- {
34
- $groups = new \SplObjectStorage();
35
- foreach ($queue as $item) {
36
- if (!$item instanceof CommandInterface) {
37
- throw new InvalidArgumentException('All items must implement Guzzle\Service\Command\CommandInterface');
38
- }
39
- $client = $item->getClient();
40
- if (!$groups->contains($client)) {
41
- $groups->attach($client, new \ArrayObject(array($item)));
42
- } else {
43
- $groups[$client]->append($item);
44
- }
45
- }
46
-
47
- $batches = array();
48
- foreach ($groups as $batch) {
49
- $batches = array_merge($batches, array_chunk($groups[$batch]->getArrayCopy(), $this->batchSize));
50
- }
51
-
52
- return $batches;
53
- }
54
-
55
- public function transfer(array $batch)
56
- {
57
- if (empty($batch)) {
58
- return;
59
- }
60
-
61
- // Get the client of the first found command
62
- $client = reset($batch)->getClient();
63
-
64
- // Keep a list of all commands with invalid clients
65
- $invalid = array_filter($batch, function ($command) use ($client) {
66
- return $command->getClient() !== $client;
67
- });
68
-
69
- if (!empty($invalid)) {
70
- throw new InconsistentClientTransferException($invalid);
71
- }
72
-
73
- $client->execute($batch);
74
- }
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchDivisorInterface.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * Interface used for dividing a queue of items into an array of batches
7
- */
8
- interface BatchDivisorInterface
9
- {
10
- /**
11
- * Divide a queue of items into an array batches
12
- *
13
- * @param \SplQueue $queue Queue of items to divide into batches. Items are removed as they are iterated.
14
- *
15
- * @return array|\Traversable Returns an array or Traversable object that contains arrays of items to transfer
16
- */
17
- public function createBatches(\SplQueue $queue);
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchInterface.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * Interface for efficiently transferring items in a queue using batches
7
- */
8
- interface BatchInterface
9
- {
10
- /**
11
- * Add an item to the queue
12
- *
13
- * @param mixed $item Item to add
14
- *
15
- * @return self
16
- */
17
- public function add($item);
18
-
19
- /**
20
- * Flush the batch and transfer the items
21
- *
22
- * @return array Returns an array flushed items
23
- */
24
- public function flush();
25
-
26
- /**
27
- * Check if the batch is empty and has further items to transfer
28
- *
29
- * @return bool
30
- */
31
- public function isEmpty();
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchRequestTransfer.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Batch\BatchTransferInterface;
6
- use Guzzle\Batch\BatchDivisorInterface;
7
- use Guzzle\Common\Exception\InvalidArgumentException;
8
- use Guzzle\Http\Message\RequestInterface;
9
-
10
- /**
11
- * Batch transfer strategy used to efficiently transfer a batch of requests.
12
- * This class is to be used with {@see Guzzle\Batch\BatchInterface}
13
- */
14
- class BatchRequestTransfer implements BatchTransferInterface, BatchDivisorInterface
15
- {
16
- /** @var int Size of each command batch */
17
- protected $batchSize;
18
-
19
- /**
20
- * Constructor used to specify how large each batch should be
21
- *
22
- * @param int $batchSize Size of each batch
23
- */
24
- public function __construct($batchSize = 50)
25
- {
26
- $this->batchSize = $batchSize;
27
- }
28
-
29
- /**
30
- * Creates batches of requests by grouping requests by their associated curl multi object.
31
- * {@inheritdoc}
32
- */
33
- public function createBatches(\SplQueue $queue)
34
- {
35
- // Create batches by client objects
36
- $groups = new \SplObjectStorage();
37
- foreach ($queue as $item) {
38
- if (!$item instanceof RequestInterface) {
39
- throw new InvalidArgumentException('All items must implement Guzzle\Http\Message\RequestInterface');
40
- }
41
- $client = $item->getClient();
42
- if (!$groups->contains($client)) {
43
- $groups->attach($client, array($item));
44
- } else {
45
- $current = $groups[$client];
46
- $current[] = $item;
47
- $groups[$client] = $current;
48
- }
49
- }
50
-
51
- $batches = array();
52
- foreach ($groups as $batch) {
53
- $batches = array_merge($batches, array_chunk($groups[$batch], $this->batchSize));
54
- }
55
-
56
- return $batches;
57
- }
58
-
59
- public function transfer(array $batch)
60
- {
61
- if ($batch) {
62
- reset($batch)->getClient()->send($batch);
63
- }
64
- }
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchSizeDivisor.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * Divides batches into smaller batches under a certain size
7
- */
8
- class BatchSizeDivisor implements BatchDivisorInterface
9
- {
10
- /** @var int Size of each batch */
11
- protected $size;
12
-
13
- /** @param int $size Size of each batch */
14
- public function __construct($size)
15
- {
16
- $this->size = $size;
17
- }
18
-
19
- /**
20
- * Set the size of each batch
21
- *
22
- * @param int $size Size of each batch
23
- *
24
- * @return BatchSizeDivisor
25
- */
26
- public function setSize($size)
27
- {
28
- $this->size = $size;
29
-
30
- return $this;
31
- }
32
-
33
- /**
34
- * Get the size of each batch
35
- *
36
- * @return int
37
- */
38
- public function getSize()
39
- {
40
- return $this->size;
41
- }
42
-
43
- public function createBatches(\SplQueue $queue)
44
- {
45
- return array_chunk(iterator_to_array($queue, false), $this->size);
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/BatchTransferInterface.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * Interface used for transferring batches of items
7
- */
8
- interface BatchTransferInterface
9
- {
10
- /**
11
- * Transfer an array of items
12
- *
13
- * @param array $batch Array of items to transfer
14
- */
15
- public function transfer(array $batch);
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/Exception/BatchTransferException.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch\Exception;
4
-
5
- use Guzzle\Common\Exception\GuzzleException;
6
- use Guzzle\Batch\BatchTransferInterface as TransferStrategy;
7
- use Guzzle\Batch\BatchDivisorInterface as DivisorStrategy;
8
-
9
- /**
10
- * Exception thrown during a batch transfer
11
- */
12
- class BatchTransferException extends \Exception implements GuzzleException
13
- {
14
- /** @var array The batch being sent when the exception occurred */
15
- protected $batch;
16
-
17
- /** @var TransferStrategy The transfer strategy in use when the exception occurred */
18
- protected $transferStrategy;
19
-
20
- /** @var DivisorStrategy The divisor strategy in use when the exception occurred */
21
- protected $divisorStrategy;
22
-
23
- /** @var array Items transferred at the point in which the exception was encountered */
24
- protected $transferredItems;
25
-
26
- /**
27
- * @param array $batch The batch being sent when the exception occurred
28
- * @param array $transferredItems Items transferred at the point in which the exception was encountered
29
- * @param \Exception $exception Exception encountered
30
- * @param TransferStrategy $transferStrategy The transfer strategy in use when the exception occurred
31
- * @param DivisorStrategy $divisorStrategy The divisor strategy in use when the exception occurred
32
- */
33
- public function __construct(
34
- array $batch,
35
- array $transferredItems,
36
- \Exception $exception,
37
- TransferStrategy $transferStrategy = null,
38
- DivisorStrategy $divisorStrategy = null
39
- ) {
40
- $this->batch = $batch;
41
- $this->transferredItems = $transferredItems;
42
- $this->transferStrategy = $transferStrategy;
43
- $this->divisorStrategy = $divisorStrategy;
44
- parent::__construct(
45
- 'Exception encountered while transferring batch: ' . $exception->getMessage(),
46
- $exception->getCode(),
47
- $exception
48
- );
49
- }
50
-
51
- /**
52
- * Get the batch that we being sent when the exception occurred
53
- *
54
- * @return array
55
- */
56
- public function getBatch()
57
- {
58
- return $this->batch;
59
- }
60
-
61
- /**
62
- * Get the items transferred at the point in which the exception was encountered
63
- *
64
- * @return array
65
- */
66
- public function getTransferredItems()
67
- {
68
- return $this->transferredItems;
69
- }
70
-
71
- /**
72
- * Get the transfer strategy
73
- *
74
- * @return TransferStrategy
75
- */
76
- public function getTransferStrategy()
77
- {
78
- return $this->transferStrategy;
79
- }
80
-
81
- /**
82
- * Get the divisor strategy
83
- *
84
- * @return DivisorStrategy
85
- */
86
- public function getDivisorStrategy()
87
- {
88
- return $this->divisorStrategy;
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/ExceptionBufferingBatch.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Batch\Exception\BatchTransferException;
6
-
7
- /**
8
- * BatchInterface decorator used to buffer exceptions encountered during a transfer. The exceptions can then later be
9
- * processed after a batch flush has completed.
10
- */
11
- class ExceptionBufferingBatch extends AbstractBatchDecorator
12
- {
13
- /** @var array Array of BatchTransferException exceptions */
14
- protected $exceptions = array();
15
-
16
- public function flush()
17
- {
18
- $items = array();
19
-
20
- while (!$this->decoratedBatch->isEmpty()) {
21
- try {
22
- $transferredItems = $this->decoratedBatch->flush();
23
- } catch (BatchTransferException $e) {
24
- $this->exceptions[] = $e;
25
- $transferredItems = $e->getTransferredItems();
26
- }
27
- $items = array_merge($items, $transferredItems);
28
- }
29
-
30
- return $items;
31
- }
32
-
33
- /**
34
- * Get the buffered exceptions
35
- *
36
- * @return array Array of BatchTransferException objects
37
- */
38
- public function getExceptions()
39
- {
40
- return $this->exceptions;
41
- }
42
-
43
- /**
44
- * Clear the buffered exceptions
45
- */
46
- public function clearExceptions()
47
- {
48
- $this->exceptions = array();
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/FlushingBatch.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * BatchInterface decorator used to add automatic flushing of the queue when the size of the queue reaches a threshold.
7
- */
8
- class FlushingBatch extends AbstractBatchDecorator
9
- {
10
- /** @var int The threshold for which to automatically flush */
11
- protected $threshold;
12
-
13
- /** @var int Current number of items known to be in the queue */
14
- protected $currentTotal = 0;
15
-
16
- /**
17
- * @param BatchInterface $decoratedBatch BatchInterface that is being decorated
18
- * @param int $threshold Flush when the number in queue matches the threshold
19
- */
20
- public function __construct(BatchInterface $decoratedBatch, $threshold)
21
- {
22
- $this->threshold = $threshold;
23
- parent::__construct($decoratedBatch);
24
- }
25
-
26
- /**
27
- * Set the auto-flush threshold
28
- *
29
- * @param int $threshold The auto-flush threshold
30
- *
31
- * @return FlushingBatch
32
- */
33
- public function setThreshold($threshold)
34
- {
35
- $this->threshold = $threshold;
36
-
37
- return $this;
38
- }
39
-
40
- /**
41
- * Get the auto-flush threshold
42
- *
43
- * @return int
44
- */
45
- public function getThreshold()
46
- {
47
- return $this->threshold;
48
- }
49
-
50
- public function add($item)
51
- {
52
- $this->decoratedBatch->add($item);
53
- if (++$this->currentTotal >= $this->threshold) {
54
- $this->currentTotal = 0;
55
- $this->decoratedBatch->flush();
56
- }
57
-
58
- return $this;
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/HistoryBatch.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- /**
6
- * BatchInterface decorator used to keep a history of items that were added to the batch. You must clear the history
7
- * manually to remove items from the history.
8
- */
9
- class HistoryBatch extends AbstractBatchDecorator
10
- {
11
- /** @var array Items in the history */
12
- protected $history = array();
13
-
14
- public function add($item)
15
- {
16
- $this->history[] = $item;
17
- $this->decoratedBatch->add($item);
18
-
19
- return $this;
20
- }
21
-
22
- /**
23
- * Get the batch history
24
- *
25
- * @return array
26
- */
27
- public function getHistory()
28
- {
29
- return $this->history;
30
- }
31
-
32
- /**
33
- * Clear the batch history
34
- */
35
- public function clearHistory()
36
- {
37
- $this->history = array();
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/NotifyingBatch.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Batch;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
-
7
- /**
8
- * BatchInterface decorator used to call a method each time flush is called
9
- */
10
- class NotifyingBatch extends AbstractBatchDecorator
11
- {
12
- /** @var mixed Callable to call */
13
- protected $callable;
14
-
15
- /**
16
- * @param BatchInterface $decoratedBatch Batch object to decorate
17
- * @param mixed $callable Callable to call
18
- *
19
- * @throws InvalidArgumentException
20
- */
21
- public function __construct(BatchInterface $decoratedBatch, $callable)
22
- {
23
- if (!is_callable($callable)) {
24
- throw new InvalidArgumentException('The passed argument is not callable');
25
- }
26
-
27
- $this->callable = $callable;
28
- parent::__construct($decoratedBatch);
29
- }
30
-
31
- public function flush()
32
- {
33
- $items = $this->decoratedBatch->flush();
34
- call_user_func($this->callable, $items);
35
-
36
- return $items;
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Batch/composer.json DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "name": "guzzle/batch",
3
- "description": "Guzzle batch component for batching requests, commands, or custom transfers",
4
- "homepage": "http://guzzlephp.org/",
5
- "keywords": ["batch", "HTTP", "REST", "guzzle"],
6
- "license": "MIT",
7
- "authors": [
8
- {
9
- "name": "Michael Dowling",
10
- "email": "mtdowling@gmail.com",
11
- "homepage": "https://github.com/mtdowling"
12
- }
13
- ],
14
- "require": {
15
- "php": ">=5.3.2",
16
- "guzzle/common": "self.version"
17
- },
18
- "autoload": {
19
- "psr-0": { "Guzzle\\Batch": "" }
20
- },
21
- "suggest": {
22
- "guzzle/http": "self.version",
23
- "guzzle/service": "self.version"
24
- },
25
- "target-dir": "Guzzle/Batch",
26
- "extra": {
27
- "branch-alias": {
28
- "dev-master": "3.7-dev"
29
- }
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- /**
6
- * Abstract cache adapter
7
- */
8
- abstract class AbstractCacheAdapter implements CacheAdapterInterface
9
- {
10
- protected $cache;
11
-
12
- /**
13
- * Get the object owned by the adapter
14
- *
15
- * @return mixed
16
- */
17
- public function getCacheObject()
18
- {
19
- return $this->cache;
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- use Doctrine\Common\Cache\Cache;
6
- use Guzzle\Common\Version;
7
- use Guzzle\Common\Exception\InvalidArgumentException;
8
- use Guzzle\Common\Exception\RuntimeException;
9
- use Guzzle\Common\FromConfigInterface;
10
- use Zend\Cache\Storage\StorageInterface;
11
-
12
- /**
13
- * Generates cache adapters from any number of known cache implementations
14
- */
15
- class CacheAdapterFactory implements FromConfigInterface
16
- {
17
- /**
18
- * Create a Guzzle cache adapter based on an array of options
19
- *
20
- * @param mixed $cache Cache value
21
- *
22
- * @return CacheAdapterInterface
23
- * @throws InvalidArgumentException
24
- */
25
- public static function fromCache($cache)
26
- {
27
- if (!is_object($cache)) {
28
- throw new InvalidArgumentException('Cache must be one of the known cache objects');
29
- }
30
-
31
- if ($cache instanceof CacheAdapterInterface) {
32
- return $cache;
33
- } elseif ($cache instanceof Cache) {
34
- return new DoctrineCacheAdapter($cache);
35
- } elseif ($cache instanceof StorageInterface) {
36
- return new Zf2CacheAdapter($cache);
37
- } else {
38
- throw new InvalidArgumentException('Unknown cache type: ' . get_class($cache));
39
- }
40
- }
41
-
42
- /**
43
- * Create a Guzzle cache adapter based on an array of options
44
- *
45
- * @param array $config Array of configuration options
46
- *
47
- * @return CacheAdapterInterface
48
- * @throws InvalidArgumentException
49
- * @deprecated This will be removed in a future version
50
- * @codeCoverageIgnore
51
- */
52
- public static function factory($config = array())
53
- {
54
- Version::warn(__METHOD__ . ' is deprecated');
55
- if (!is_array($config)) {
56
- throw new InvalidArgumentException('$config must be an array');
57
- }
58
-
59
- if (!isset($config['cache.adapter']) && !isset($config['cache.provider'])) {
60
- $config['cache.adapter'] = 'Guzzle\Cache\NullCacheAdapter';
61
- $config['cache.provider'] = null;
62
- } else {
63
- // Validate that the options are valid
64
- foreach (array('cache.adapter', 'cache.provider') as $required) {
65
- if (!isset($config[$required])) {
66
- throw new InvalidArgumentException("{$required} is a required CacheAdapterFactory option");
67
- }
68
- if (is_string($config[$required])) {
69
- // Convert dot notation to namespaces
70
- $config[$required] = str_replace('.', '\\', $config[$required]);
71
- if (!class_exists($config[$required])) {
72
- throw new InvalidArgumentException("{$config[$required]} is not a valid class for {$required}");
73
- }
74
- }
75
- }
76
- // Instantiate the cache provider
77
- if (is_string($config['cache.provider'])) {
78
- $args = isset($config['cache.provider.args']) ? $config['cache.provider.args'] : null;
79
- $config['cache.provider'] = self::createObject($config['cache.provider'], $args);
80
- }
81
- }
82
-
83
- // Instantiate the cache adapter using the provider and options
84
- if (is_string($config['cache.adapter'])) {
85
- $args = isset($config['cache.adapter.args']) ? $config['cache.adapter.args'] : array();
86
- array_unshift($args, $config['cache.provider']);
87
- $config['cache.adapter'] = self::createObject($config['cache.adapter'], $args);
88
- }
89
-
90
- return $config['cache.adapter'];
91
- }
92
-
93
- /**
94
- * Create a class using an array of constructor arguments
95
- *
96
- * @param string $className Class name
97
- * @param array $args Arguments for the class constructor
98
- *
99
- * @return mixed
100
- * @throws RuntimeException
101
- * @deprecated
102
- * @codeCoverageIgnore
103
- */
104
- private static function createObject($className, array $args = null)
105
- {
106
- try {
107
- if (!$args) {
108
- return new $className;
109
- } else {
110
- $c = new \ReflectionClass($className);
111
- return $c->newInstanceArgs($args);
112
- }
113
- } catch (\Exception $e) {
114
- throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
115
- }
116
- }
117
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- /**
6
- * Interface for cache adapters.
7
- *
8
- * Cache adapters allow Guzzle to utilize various frameworks for caching HTTP responses.
9
- *
10
- * @link http://www.doctrine-project.org/ Inspired by Doctrine 2
11
- */
12
- interface CacheAdapterInterface
13
- {
14
- /**
15
- * Test if an entry exists in the cache.
16
- *
17
- * @param string $id cache id The cache id of the entry to check for.
18
- * @param array $options Array of cache adapter options
19
- *
20
- * @return bool Returns TRUE if a cache entry exists for the given cache id, FALSE otherwise.
21
- */
22
- public function contains($id, array $options = null);
23
-
24
- /**
25
- * Deletes a cache entry.
26
- *
27
- * @param string $id cache id
28
- * @param array $options Array of cache adapter options
29
- *
30
- * @return bool TRUE on success, FALSE on failure
31
- */
32
- public function delete($id, array $options = null);
33
-
34
- /**
35
- * Fetches an entry from the cache.
36
- *
37
- * @param string $id cache id The id of the cache entry to fetch.
38
- * @param array $options Array of cache adapter options
39
- *
40
- * @return string The cached data or FALSE, if no cache entry exists for the given id.
41
- */
42
- public function fetch($id, array $options = null);
43
-
44
- /**
45
- * Puts data into the cache.
46
- *
47
- * @param string $id The cache id
48
- * @param string $data The cache entry/data
49
- * @param int|bool $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry
50
- * @param array $options Array of cache adapter options
51
- *
52
- * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
53
- */
54
- public function save($id, $data, $lifeTime = false, array $options = null);
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/ClosureCacheAdapter.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- /**
6
- * Cache adapter that defers to closures for implementation
7
- */
8
- class ClosureCacheAdapter implements CacheAdapterInterface
9
- {
10
- /**
11
- * @var array Mapping of method names to callables
12
- */
13
- protected $callables;
14
-
15
- /**
16
- * The callables array is an array mapping the actions of the cache adapter to callables.
17
- * - contains: Callable that accepts an $id and $options argument
18
- * - delete: Callable that accepts an $id and $options argument
19
- * - fetch: Callable that accepts an $id and $options argument
20
- * - save: Callable that accepts an $id, $data, $lifeTime, and $options argument
21
- *
22
- * @param array $callables array of action names to callable
23
- *
24
- * @throws \InvalidArgumentException if the callable is not callable
25
- */
26
- public function __construct(array $callables)
27
- {
28
- // Validate each key to ensure it exists and is callable
29
- foreach (array('contains', 'delete', 'fetch', 'save') as $key) {
30
- if (!array_key_exists($key, $callables) || !is_callable($callables[$key])) {
31
- throw new \InvalidArgumentException("callables must contain a callable {$key} key");
32
- }
33
- }
34
-
35
- $this->callables = $callables;
36
- }
37
-
38
- public function contains($id, array $options = null)
39
- {
40
- return call_user_func($this->callables['contains'], $id, $options);
41
- }
42
-
43
- public function delete($id, array $options = null)
44
- {
45
- return call_user_func($this->callables['delete'], $id, $options);
46
- }
47
-
48
- public function fetch($id, array $options = null)
49
- {
50
- return call_user_func($this->callables['fetch'], $id, $options);
51
- }
52
-
53
- public function save($id, $data, $lifeTime = false, array $options = null)
54
- {
55
- return call_user_func($this->callables['save'], $id, $data, $lifeTime, $options);
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- use Doctrine\Common\Cache\Cache;
6
-
7
- /**
8
- * Doctrine 2 cache adapter
9
- *
10
- * @link http://www.doctrine-project.org/
11
- */
12
- class DoctrineCacheAdapter extends AbstractCacheAdapter
13
- {
14
- /**
15
- * @param Cache $cache Doctrine cache object
16
- */
17
- public function __construct(Cache $cache)
18
- {
19
- $this->cache = $cache;
20
- }
21
-
22
- public function contains($id, array $options = null)
23
- {
24
- return $this->cache->contains($id);
25
- }
26
-
27
- public function delete($id, array $options = null)
28
- {
29
- return $this->cache->delete($id);
30
- }
31
-
32
- public function fetch($id, array $options = null)
33
- {
34
- return $this->cache->fetch($id);
35
- }
36
-
37
- public function save($id, $data, $lifeTime = false, array $options = null)
38
- {
39
- return $this->cache->save($id, $data, $lifeTime);
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- /**
6
- * Null cache adapter
7
- */
8
- class NullCacheAdapter extends AbstractCacheAdapter
9
- {
10
- public function __construct() {}
11
-
12
- public function contains($id, array $options = null)
13
- {
14
- return false;
15
- }
16
-
17
- public function delete($id, array $options = null)
18
- {
19
- return true;
20
- }
21
-
22
- public function fetch($id, array $options = null)
23
- {
24
- return false;
25
- }
26
-
27
- public function save($id, $data, $lifeTime = false, array $options = null)
28
- {
29
- return true;
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf1CacheAdapter.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- use Guzzle\Common\Version;
6
-
7
- /**
8
- * Zend Framework 1 cache adapter
9
- *
10
- * @link http://framework.zend.com/manual/en/zend.cache.html
11
- * @deprecated
12
- * @codeCoverageIgnore
13
- */
14
- class Zf1CacheAdapter extends AbstractCacheAdapter
15
- {
16
- /**
17
- * @param \Zend_Cache_Backend $cache Cache object to wrap
18
- */
19
- public function __construct(\Zend_Cache_Backend $cache)
20
- {
21
- Version::warn(__CLASS__ . ' is deprecated. Upgrade to ZF2 or use PsrCacheAdapter');
22
- $this->cache = $cache;
23
- }
24
-
25
- public function contains($id, array $options = null)
26
- {
27
- return $this->cache->test($id);
28
- }
29
-
30
- public function delete($id, array $options = null)
31
- {
32
- return $this->cache->remove($id);
33
- }
34
-
35
- public function fetch($id, array $options = null)
36
- {
37
- return $this->cache->load($id);
38
- }
39
-
40
- public function save($id, $data, $lifeTime = false, array $options = null)
41
- {
42
- return $this->cache->save($data, $id, array(), $lifeTime);
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Cache;
4
-
5
- use Zend\Cache\Storage\StorageInterface;
6
-
7
- /**
8
- * Zend Framework 2 cache adapter
9
- *
10
- * @link http://packages.zendframework.com/docs/latest/manual/en/zend.cache.html
11
- */
12
- class Zf2CacheAdapter extends AbstractCacheAdapter
13
- {
14
- /**
15
- * @param StorageInterface $cache Zend Framework 2 cache adapter
16
- */
17
- public function __construct(StorageInterface $cache)
18
- {
19
- $this->cache = $cache;
20
- }
21
-
22
- public function contains($id, array $options = null)
23
- {
24
- return $this->cache->hasItem($id);
25
- }
26
-
27
- public function delete($id, array $options = null)
28
- {
29
- return $this->cache->removeItem($id);
30
- }
31
-
32
- public function fetch($id, array $options = null)
33
- {
34
- return $this->cache->getItem($id);
35
- }
36
-
37
- public function save($id, $data, $lifeTime = false, array $options = null)
38
- {
39
- return $this->cache->setItem($id, $data);
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Cache/composer.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "name": "guzzle/cache",
3
- "description": "Guzzle cache adapter component",
4
- "homepage": "http://guzzlephp.org/",
5
- "keywords": ["cache", "adapter", "zf", "doctrine", "guzzle"],
6
- "license": "MIT",
7
- "authors": [
8
- {
9
- "name": "Michael Dowling",
10
- "email": "mtdowling@gmail.com",
11
- "homepage": "https://github.com/mtdowling"
12
- }
13
- ],
14
- "require": {
15
- "php": ">=5.3.2",
16
- "guzzle/common": "self.version"
17
- },
18
- "autoload": {
19
- "psr-0": { "Guzzle\\Cache": "" }
20
- },
21
- "target-dir": "Guzzle/Cache",
22
- "extra": {
23
- "branch-alias": {
24
- "dev-master": "3.7-dev"
25
- }
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- use Symfony\Component\EventDispatcher\EventDispatcher;
6
- use Symfony\Component\EventDispatcher\EventDispatcherInterface;
7
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
8
-
9
- /**
10
- * Class that holds an event dispatcher
11
- */
12
- class AbstractHasDispatcher implements HasDispatcherInterface
13
- {
14
- /** @var EventDispatcherInterface */
15
- protected $eventDispatcher;
16
-
17
- public static function getAllEvents()
18
- {
19
- return array();
20
- }
21
-
22
- public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
23
- {
24
- $this->eventDispatcher = $eventDispatcher;
25
-
26
- return $this;
27
- }
28
-
29
- public function getEventDispatcher()
30
- {
31
- if (!$this->eventDispatcher) {
32
- $this->eventDispatcher = new EventDispatcher();
33
- }
34
-
35
- return $this->eventDispatcher;
36
- }
37
-
38
- public function dispatch($eventName, array $context = array())
39
- {
40
- return $this->getEventDispatcher()->dispatch($eventName, new Event($context));
41
- }
42
-
43
- public function addSubscriber(EventSubscriberInterface $subscriber)
44
- {
45
- $this->getEventDispatcher()->addSubscriber($subscriber);
46
-
47
- return $this;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Collection.php DELETED
@@ -1,403 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
- use Guzzle\Common\Exception\RuntimeException;
7
-
8
- /**
9
- * Key value pair collection object
10
- */
11
- class Collection implements \ArrayAccess, \IteratorAggregate, \Countable, ToArrayInterface
12
- {
13
- /** @var array Data associated with the object. */
14
- protected $data;
15
-
16
- /**
17
- * @param array $data Associative array of data to set
18
- */
19
- public function __construct(array $data = array())
20
- {
21
- $this->data = $data;
22
- }
23
-
24
- /**
25
- * Create a new collection from an array, validate the keys, and add default values where missing
26
- *
27
- * @param array $config Configuration values to apply.
28
- * @param array $defaults Default parameters
29
- * @param array $required Required parameter names
30
- *
31
- * @return self
32
- * @throws InvalidArgumentException if a parameter is missing
33
- */
34
- public static function fromConfig(array $config = array(), array $defaults = array(), array $required = array())
35
- {
36
- $data = $config + $defaults;
37
-
38
- if ($missing = array_diff($required, array_keys($data))) {
39
- throw new InvalidArgumentException('Config is missing the following keys: ' . implode(', ', $missing));
40
- }
41
-
42
- return new self($data);
43
- }
44
-
45
- public function count()
46
- {
47
- return count($this->data);
48
- }
49
-
50
- public function getIterator()
51
- {
52
- return new \ArrayIterator($this->data);
53
- }
54
-
55
- public function toArray()
56
- {
57
- return $this->data;
58
- }
59
-
60
- /**
61
- * Removes all key value pairs
62
- *
63
- * @return Collection
64
- */
65
- public function clear()
66
- {
67
- $this->data = array();
68
-
69
- return $this;
70
- }
71
-
72
- /**
73
- * Get all or a subset of matching key value pairs
74
- *
75
- * @param array $keys Pass an array of keys to retrieve only a subset of key value pairs
76
- *
77
- * @return array Returns an array of all matching key value pairs
78
- */
79
- public function getAll(array $keys = null)
80
- {
81
- return $keys ? array_intersect_key($this->data, array_flip($keys)) : $this->data;
82
- }
83
-
84
- /**
85
- * Get a specific key value.
86
- *
87
- * @param string $key Key to retrieve.
88
- *
89
- * @return mixed|null Value of the key or NULL
90
- */
91
- public function get($key)
92
- {
93
- return isset($this->data[$key]) ? $this->data[$key] : null;
94
- }
95
-
96
- /**
97
- * Set a key value pair
98
- *
99
- * @param string $key Key to set
100
- * @param mixed $value Value to set
101
- *
102
- * @return Collection Returns a reference to the object
103
- */
104
- public function set($key, $value)
105
- {
106
- $this->data[$key] = $value;
107
-
108
- return $this;
109
- }
110
-
111
- /**
112
- * Add a value to a key. If a key of the same name has already been added, the key value will be converted into an
113
- * array and the new value will be pushed to the end of the array.
114
- *
115
- * @param string $key Key to add
116
- * @param mixed $value Value to add to the key
117
- *
118
- * @return Collection Returns a reference to the object.
119
- */
120
- public function add($key, $value)
121
- {
122
- if (!array_key_exists($key, $this->data)) {
123
- $this->data[$key] = $value;
124
- } elseif (is_array($this->data[$key])) {
125
- $this->data[$key][] = $value;
126
- } else {
127
- $this->data[$key] = array($this->data[$key], $value);
128
- }
129
-
130
- return $this;
131
- }
132
-
133
- /**
134
- * Remove a specific key value pair
135
- *
136
- * @param string $key A key to remove
137
- *
138
- * @return Collection
139
- */
140
- public function remove($key)
141
- {
142
- unset($this->data[$key]);
143
-
144
- return $this;
145
- }
146
-
147
- /**
148
- * Get all keys in the collection
149
- *
150
- * @return array
151
- */
152
- public function getKeys()
153
- {
154
- return array_keys($this->data);
155
- }
156
-
157
- /**
158
- * Returns whether or not the specified key is present.
159
- *
160
- * @param string $key The key for which to check the existence.
161
- *
162
- * @return bool
163
- */
164
- public function hasKey($key)
165
- {
166
- return array_key_exists($key, $this->data);
167
- }
168
-
169
- /**
170
- * Case insensitive search the keys in the collection
171
- *
172
- * @param string $key Key to search for
173
- *
174
- * @return bool|string Returns false if not found, otherwise returns the key
175
- */
176
- public function keySearch($key)
177
- {
178
- foreach (array_keys($this->data) as $k) {
179
- if (!strcasecmp($k, $key)) {
180
- return $k;
181
- }
182
- }
183
-
184
- return false;
185
- }
186
-
187
- /**
188
- * Checks if any keys contains a certain value
189
- *
190
- * @param string $value Value to search for
191
- *
192
- * @return mixed Returns the key if the value was found FALSE if the value was not found.
193
- */
194
- public function hasValue($value)
195
- {
196
- return array_search($value, $this->data);
197
- }
198
-
199
- /**
200
- * Replace the data of the object with the value of an array
201
- *
202
- * @param array $data Associative array of data
203
- *
204
- * @return Collection Returns a reference to the object
205
- */
206
- public function replace(array $data)
207
- {
208
- $this->data = $data;
209
-
210
- return $this;
211
- }
212
-
213
- /**
214
- * Add and merge in a Collection or array of key value pair data.
215
- *
216
- * @param Collection|array $data Associative array of key value pair data
217
- *
218
- * @return Collection Returns a reference to the object.
219
- */
220
- public function merge($data)
221
- {
222
- foreach ($data as $key => $value) {
223
- $this->add($key, $value);
224
- }
225
-
226
- return $this;
227
- }
228
-
229
- /**
230
- * Over write key value pairs in this collection with all of the data from an array or collection.
231
- *
232
- * @param array|\Traversable $data Values to override over this config
233
- *
234
- * @return self
235
- */
236
- public function overwriteWith($data)
237
- {
238
- if (is_array($data)) {
239
- $this->data = $data + $this->data;
240
- } elseif ($data instanceof Collection) {
241
- $this->data = $data->toArray() + $this->data;
242
- } else {
243
- foreach ($data as $key => $value) {
244
- $this->data[$key] = $value;
245
- }
246
- }
247
-
248
- return $this;
249
- }
250
-
251
- /**
252
- * Returns a Collection containing all the elements of the collection after applying the callback function to each
253
- * one. The Closure should accept three parameters: (string) $key, (string) $value, (array) $context and return a
254
- * modified value
255
- *
256
- * @param \Closure $closure Closure to apply
257
- * @param array $context Context to pass to the closure
258
- * @param bool $static Set to TRUE to use the same class as the return rather than returning a Collection
259
- *
260
- * @return Collection
261
- */
262
- public function map(\Closure $closure, array $context = array(), $static = true)
263
- {
264
- $collection = $static ? new static() : new self();
265
- foreach ($this as $key => $value) {
266
- $collection->add($key, $closure($key, $value, $context));
267
- }
268
-
269
- return $collection;
270
- }
271
-
272
- /**
273
- * Iterates over each key value pair in the collection passing them to the Closure. If the Closure function returns
274
- * true, the current value from input is returned into the result Collection. The Closure must accept three
275
- * parameters: (string) $key, (string) $value and return Boolean TRUE or FALSE for each value.
276
- *
277
- * @param \Closure $closure Closure evaluation function
278
- * @param bool $static Set to TRUE to use the same class as the return rather than returning a Collection
279
- *
280
- * @return Collection
281
- */
282
- public function filter(\Closure $closure, $static = true)
283
- {
284
- $collection = ($static) ? new static() : new self();
285
- foreach ($this->data as $key => $value) {
286
- if ($closure($key, $value)) {
287
- $collection->add($key, $value);
288
- }
289
- }
290
-
291
- return $collection;
292
- }
293
-
294
- public function offsetExists($offset)
295
- {
296
- return isset($this->data[$offset]);
297
- }
298
-
299
- public function offsetGet($offset)
300
- {
301
- return isset($this->data[$offset]) ? $this->data[$offset] : null;
302
- }
303
-
304
- public function offsetSet($offset, $value)
305
- {
306
- $this->data[$offset] = $value;
307
- }
308
-
309
- public function offsetUnset($offset)
310
- {
311
- unset($this->data[$offset]);
312
- }
313
-
314
- /**
315
- * Set a value into a nested array key. Keys will be created as needed to set the value.
316
- *
317
- * @param string $path Path to set
318
- * @param mixed $value Value to set at the key
319
- *
320
- * @return self
321
- * @throws RuntimeException when trying to setPath using a nested path that travels through a scalar value
322
- */
323
- public function setPath($path, $value)
324
- {
325
- $current =& $this->data;
326
- $queue = explode('/', $path);
327
- while (null !== ($key = array_shift($queue))) {
328
- if (!is_array($current)) {
329
- throw new RuntimeException("Trying to setPath {$path}, but {$key} is set and is not an array");
330
- } elseif (!$queue) {
331
- $current[$key] = $value;
332
- } elseif (isset($current[$key])) {
333
- $current =& $current[$key];
334
- } else {
335
- $current[$key] = array();
336
- $current =& $current[$key];
337
- }
338
- }
339
-
340
- return $this;
341
- }
342
-
343
- /**
344
- * Gets a value from the collection using an array path (e.g. foo/baz/bar would retrieve bar from two nested arrays)
345
- * Allows for wildcard searches which recursively combine matches up to the level at which the wildcard occurs. This
346
- * can be useful for accepting any key of a sub-array and combining matching keys from each diverging path.
347
- *
348
- * @param string $path Path to traverse and retrieve a value from
349
- * @param string $separator Character used to add depth to the search
350
- * @param mixed $data Optional data to descend into (used when wildcards are encountered)
351
- *
352
- * @return mixed|null
353
- */
354
- public function getPath($path, $separator = '/', $data = null)
355
- {
356
- if ($data === null) {
357
- $data =& $this->data;
358
- }
359
-
360
- $path = is_array($path) ? $path : explode($separator, $path);
361
- while (null !== ($part = array_shift($path))) {
362
- if (!is_array($data)) {
363
- return null;
364
- } elseif (isset($data[$part])) {
365
- $data =& $data[$part];
366
- } elseif ($part != '*') {
367
- return null;
368
- } else {
369
- // Perform a wildcard search by diverging and merging paths
370
- $result = array();
371
- foreach ($data as $value) {
372
- if (!$path) {
373
- $result = array_merge_recursive($result, (array) $value);
374
- } elseif (null !== ($test = $this->getPath($path, $separator, $value))) {
375
- $result = array_merge_recursive($result, (array) $test);
376
- }
377
- }
378
- return $result;
379
- }
380
- }
381
-
382
- return $data;
383
- }
384
-
385
- /**
386
- * Inject configuration settings into an input string
387
- *
388
- * @param string $input Input to inject
389
- *
390
- * @return string
391
- * @deprecated
392
- */
393
- public function inject($input)
394
- {
395
- Version::warn(__METHOD__ . ' is deprecated');
396
- $replace = array();
397
- foreach ($this->data as $key => $val) {
398
- $replace['{' . $key . '}'] = $val;
399
- }
400
-
401
- return strtr($input, $replace);
402
- }
403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- use Symfony\Component\EventDispatcher\Event as SymfonyEvent;
6
-
7
- /**
8
- * Default event for Guzzle notifications
9
- */
10
- class Event extends SymfonyEvent implements ToArrayInterface, \ArrayAccess, \IteratorAggregate
11
- {
12
- /** @var array */
13
- private $context;
14
-
15
- /**
16
- * @param array $context Contextual information
17
- */
18
- public function __construct(array $context = array())
19
- {
20
- $this->context = $context;
21
- }
22
-
23
- public function getIterator()
24
- {
25
- return new \ArrayIterator($this->context);
26
- }
27
-
28
- public function offsetGet($offset)
29
- {
30
- return isset($this->context[$offset]) ? $this->context[$offset] : null;
31
- }
32
-
33
- public function offsetSet($offset, $value)
34
- {
35
- $this->context[$offset] = $value;
36
- }
37
-
38
- public function offsetExists($offset)
39
- {
40
- return isset($this->context[$offset]);
41
- }
42
-
43
- public function offsetUnset($offset)
44
- {
45
- unset($this->context[$offset]);
46
- }
47
-
48
- public function toArray()
49
- {
50
- return $this->context;
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- class BadMethodCallException extends \BadMethodCallException implements GuzzleException {}
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/ExceptionCollection.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- /**
6
- * Collection of exceptions
7
- */
8
- class ExceptionCollection extends \Exception implements GuzzleException, \IteratorAggregate, \Countable
9
- {
10
- /** @var array Array of Exceptions */
11
- protected $exceptions = array();
12
-
13
- /** @var string Succinct exception message not including sub-exceptions */
14
- private $shortMessage;
15
-
16
- public function __construct($message = '', $code = 0, \Exception $previous = null)
17
- {
18
- parent::__construct($message, $code, $previous);
19
- $this->shortMessage = $message;
20
- }
21
-
22
- /**
23
- * Set all of the exceptions
24
- *
25
- * @param array $exceptions Array of exceptions
26
- *
27
- * @return self
28
- */
29
- public function setExceptions(array $exceptions)
30
- {
31
- $this->exceptions = array();
32
- foreach ($exceptions as $exception) {
33
- $this->add($exception);
34
- }
35
-
36
- return $this;
37
- }
38
-
39
- /**
40
- * Add exceptions to the collection
41
- *
42
- * @param ExceptionCollection|\Exception $e Exception to add
43
- *
44
- * @return ExceptionCollection;
45
- */
46
- public function add($e)
47
- {
48
- $this->exceptions[] = $e;
49
- if ($this->message) {
50
- $this->message .= "\n";
51
- }
52
-
53
- $this->message .= $this->getExceptionMessage($e, 0);
54
-
55
- return $this;
56
- }
57
-
58
- /**
59
- * Get the total number of request exceptions
60
- *
61
- * @return int
62
- */
63
- public function count()
64
- {
65
- return count($this->exceptions);
66
- }
67
-
68
- /**
69
- * Allows array-like iteration over the request exceptions
70
- *
71
- * @return \ArrayIterator
72
- */
73
- public function getIterator()
74
- {
75
- return new \ArrayIterator($this->exceptions);
76
- }
77
-
78
- /**
79
- * Get the first exception in the collection
80
- *
81
- * @return \Exception
82
- */
83
- public function getFirst()
84
- {
85
- return $this->exceptions ? $this->exceptions[0] : null;
86
- }
87
-
88
- private function getExceptionMessage(\Exception $e, $depth = 0)
89
- {
90
- static $sp = ' ';
91
- $prefix = $depth ? str_repeat($sp, $depth) : '';
92
- $message = "{$prefix}(" . get_class($e) . ') ' . $e->getFile() . ' line ' . $e->getLine() . "\n";
93
-
94
- if ($e instanceof self) {
95
- if ($e->shortMessage) {
96
- $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->shortMessage) . "\n";
97
- }
98
- foreach ($e as $ee) {
99
- $message .= "\n" . $this->getExceptionMessage($ee, $depth + 1);
100
- }
101
- } else {
102
- $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->getMessage()) . "\n";
103
- $message .= "\n{$prefix}{$sp}" . str_replace("\n", "\n{$prefix}{$sp}", $e->getTraceAsString()) . "\n";
104
- }
105
-
106
- return str_replace(getcwd(), '.', $message);
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- /**
6
- * Guzzle exception
7
- */
8
- interface GuzzleException {}
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/InvalidArgumentException.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException {}
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/RuntimeException.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- class RuntimeException extends \RuntimeException implements GuzzleException {}
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/UnexpectedValueException.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common\Exception;
4
-
5
- class UnexpectedValueException extends \UnexpectedValueException implements GuzzleException {}
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/FromConfigInterface.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- /**
6
- * Interfaces that adds a factory method which is used to instantiate a class from an array of configuration options.
7
- */
8
- interface FromConfigInterface
9
- {
10
- /**
11
- * Static factory method used to turn an array or collection of configuration data into an instantiated object.
12
- *
13
- * @param array|Collection $config Configuration data
14
- *
15
- * @return FromConfigInterface
16
- */
17
- public static function factory($config = array());
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- use Symfony\Component\EventDispatcher\EventDispatcherInterface;
6
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7
-
8
- /**
9
- * Holds an event dispatcher
10
- */
11
- interface HasDispatcherInterface
12
- {
13
- /**
14
- * Get a list of all of the events emitted from the class
15
- *
16
- * @return array
17
- */
18
- public static function getAllEvents();
19
-
20
- /**
21
- * Set the EventDispatcher of the request
22
- *
23
- * @param EventDispatcherInterface $eventDispatcher
24
- *
25
- * @return self
26
- */
27
- public function setEventDispatcher(EventDispatcherInterface $eventDispatcher);
28
-
29
- /**
30
- * Get the EventDispatcher of the request
31
- *
32
- * @return EventDispatcherInterface
33
- */
34
- public function getEventDispatcher();
35
-
36
- /**
37
- * Helper to dispatch Guzzle events and set the event name on the event
38
- *
39
- * @param string $eventName Name of the event to dispatch
40
- * @param array $context Context of the event
41
- *
42
- * @return Event Returns the created event object
43
- */
44
- public function dispatch($eventName, array $context = array());
45
-
46
- /**
47
- * Add an event subscriber to the dispatcher
48
- *
49
- * @param EventSubscriberInterface $subscriber Event subscriber
50
- *
51
- * @return self
52
- */
53
- public function addSubscriber(EventSubscriberInterface $subscriber);
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/ToArrayInterface.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- /**
6
- * An object that can be represented as an array
7
- */
8
- interface ToArrayInterface
9
- {
10
- /**
11
- * Get the array representation of an object
12
- *
13
- * @return array
14
- */
15
- public function toArray();
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/Version.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Common;
4
-
5
- /**
6
- * Guzzle version information
7
- */
8
- class Version
9
- {
10
- const VERSION = '3.8.1';
11
-
12
- /**
13
- * @var bool Set this value to true to enable warnings for deprecated functionality use. This should be on in your
14
- * unit tests, but probably not in production.
15
- */
16
- public static $emitWarnings = false;
17
-
18
- /**
19
- * Emit a deprecation warning
20
- *
21
- * @param string $message Warning message
22
- */
23
- public static function warn($message)
24
- {
25
- if (self::$emitWarnings) {
26
- trigger_error('Deprecation warning: ' . $message, E_USER_DEPRECATED);
27
- }
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Common/composer.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "name": "guzzle/common",
3
- "homepage": "http://guzzlephp.org/",
4
- "description": "Common libraries used by Guzzle",
5
- "keywords": ["common", "event", "exception", "collection"],
6
- "license": "MIT",
7
- "require": {
8
- "php": ">=5.3.2",
9
- "symfony/event-dispatcher": ">=2.1"
10
- },
11
- "autoload": {
12
- "psr-0": { "Guzzle\\Common": "" }
13
- },
14
- "target-dir": "Guzzle/Common",
15
- "extra": {
16
- "branch-alias": {
17
- "dev-master": "3.7-dev"
18
- }
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php DELETED
@@ -1,221 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Stream\Stream;
6
-
7
- /**
8
- * Abstract decorator used to wrap entity bodies
9
- */
10
- class AbstractEntityBodyDecorator implements EntityBodyInterface
11
- {
12
- /** @var EntityBodyInterface Decorated entity body */
13
- protected $body;
14
-
15
- /**
16
- * @param EntityBodyInterface $body Entity body to decorate
17
- */
18
- public function __construct(EntityBodyInterface $body)
19
- {
20
- $this->body = $body;
21
- }
22
-
23
- public function __toString()
24
- {
25
- return (string) $this->body;
26
- }
27
-
28
- /**
29
- * Allow decorators to implement custom methods
30
- *
31
- * @param string $method Missing method name
32
- * @param array $args Method arguments
33
- *
34
- * @return mixed
35
- */
36
- public function __call($method, array $args)
37
- {
38
- return call_user_func_array(array($this->body, $method), $args);
39
- }
40
-
41
- public function close()
42
- {
43
- return $this->body->close();
44
- }
45
-
46
- public function setRewindFunction($callable)
47
- {
48
- $this->body->setRewindFunction($callable);
49
-
50
- return $this;
51
- }
52
-
53
- public function rewind()
54
- {
55
- return $this->body->rewind();
56
- }
57
-
58
- public function compress($filter = 'zlib.deflate')
59
- {
60
- return $this->body->compress($filter);
61
- }
62
-
63
- public function uncompress($filter = 'zlib.inflate')
64
- {
65
- return $this->body->uncompress($filter);
66
- }
67
-
68
- public function getContentLength()
69
- {
70
- return $this->getSize();
71
- }
72
-
73
- public function getContentType()
74
- {
75
- return $this->body->getContentType();
76
- }
77
-
78
- public function getContentMd5($rawOutput = false, $base64Encode = false)
79
- {
80
- $hash = Stream::getHash($this, 'md5', $rawOutput);
81
-
82
- return $hash && $base64Encode ? base64_encode($hash) : $hash;
83
- }
84
-
85
- public function getContentEncoding()
86
- {
87
- return $this->body->getContentEncoding();
88
- }
89
-
90
- public function getMetaData($key = null)
91
- {
92
- return $this->body->getMetaData($key);
93
- }
94
-
95
- public function getStream()
96
- {
97
- return $this->body->getStream();
98
- }
99
-
100
- public function setStream($stream, $size = 0)
101
- {
102
- $this->body->setStream($stream, $size);
103
-
104
- return $this;
105
- }
106
-
107
- public function detachStream()
108
- {
109
- $this->body->detachStream();
110
-
111
- return $this;
112
- }
113
-
114
- public function getWrapper()
115
- {
116
- return $this->body->getWrapper();
117
- }
118
-
119
- public function getWrapperData()
120
- {
121
- return $this->body->getWrapperData();
122
- }
123
-
124
- public function getStreamType()
125
- {
126
- return $this->body->getStreamType();
127
- }
128
-
129
- public function getUri()
130
- {
131
- return $this->body->getUri();
132
- }
133
-
134
- public function getSize()
135
- {
136
- return $this->body->getSize();
137
- }
138
-
139
- public function isReadable()
140
- {
141
- return $this->body->isReadable();
142
- }
143
-
144
- public function isRepeatable()
145
- {
146
- return $this->isSeekable() && $this->isReadable();
147
- }
148
-
149
- public function isWritable()
150
- {
151
- return $this->body->isWritable();
152
- }
153
-
154
- public function isConsumed()
155
- {
156
- return $this->body->isConsumed();
157
- }
158
-
159
- /**
160
- * Alias of isConsumed()
161
- * {@inheritdoc}
162
- */
163
- public function feof()
164
- {
165
- return $this->isConsumed();
166
- }
167
-
168
- public function isLocal()
169
- {
170
- return $this->body->isLocal();
171
- }
172
-
173
- public function isSeekable()
174
- {
175
- return $this->body->isSeekable();
176
- }
177
-
178
- public function setSize($size)
179
- {
180
- $this->body->setSize($size);
181
-
182
- return $this;
183
- }
184
-
185
- public function seek($offset, $whence = SEEK_SET)
186
- {
187
- return $this->body->seek($offset, $whence);
188
- }
189
-
190
- public function read($length)
191
- {
192
- return $this->body->read($length);
193
- }
194
-
195
- public function write($string)
196
- {
197
- return $this->body->write($string);
198
- }
199
-
200
- public function readLine($maxLength = null)
201
- {
202
- return $this->body->readLine($maxLength);
203
- }
204
-
205
- public function ftell()
206
- {
207
- return $this->body->ftell();
208
- }
209
-
210
- public function getCustomData($key)
211
- {
212
- return $this->body->getCustomData($key);
213
- }
214
-
215
- public function setCustomData($key, $value)
216
- {
217
- $this->body->setCustomData($key, $value);
218
-
219
- return $this;
220
- }
221
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php DELETED
@@ -1,229 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Exception\RuntimeException;
6
-
7
- /**
8
- * EntityBody decorator that can cache previously read bytes from a sequentially read tstream
9
- */
10
- class CachingEntityBody extends AbstractEntityBodyDecorator
11
- {
12
- /** @var EntityBody Remote stream used to actually pull data onto the buffer */
13
- protected $remoteStream;
14
-
15
- /** @var int The number of bytes to skip reading due to a write on the temporary buffer */
16
- protected $skipReadBytes = 0;
17
-
18
- /**
19
- * We will treat the buffer object as the body of the entity body
20
- * {@inheritdoc}
21
- */
22
- public function __construct(EntityBodyInterface $body)
23
- {
24
- $this->remoteStream = $body;
25
- $this->body = new EntityBody(fopen('php://temp', 'r+'));
26
- }
27
-
28
- /**
29
- * Will give the contents of the buffer followed by the exhausted remote stream.
30
- *
31
- * Warning: Loads the entire stream into memory
32
- *
33
- * @return string
34
- */
35
- public function __toString()
36
- {
37
- $pos = $this->ftell();
38
- $this->rewind();
39
-
40
- $str = '';
41
- while (!$this->isConsumed()) {
42
- $str .= $this->read(16384);
43
- }
44
-
45
- $this->seek($pos);
46
-
47
- return $str;
48
- }
49
-
50
- public function getSize()
51
- {
52
- return max($this->body->getSize(), $this->remoteStream->getSize());
53
- }
54
-
55
- /**
56
- * {@inheritdoc}
57
- * @throws RuntimeException When seeking with SEEK_END or when seeking past the total size of the buffer stream
58
- */
59
- public function seek($offset, $whence = SEEK_SET)
60
- {
61
- if ($whence == SEEK_SET) {
62
- $byte = $offset;
63
- } elseif ($whence == SEEK_CUR) {
64
- $byte = $offset + $this->ftell();
65
- } else {
66
- throw new RuntimeException(__CLASS__ . ' supports only SEEK_SET and SEEK_CUR seek operations');
67
- }
68
-
69
- // You cannot skip ahead past where you've read from the remote stream
70
- if ($byte > $this->body->getSize()) {
71
- throw new RuntimeException(
72
- "Cannot seek to byte {$byte} when the buffered stream only contains {$this->body->getSize()} bytes"
73
- );
74
- }
75
-
76
- return $this->body->seek($byte);
77
- }
78
-
79
- public function rewind()
80
- {
81
- return $this->seek(0);
82
- }
83
-
84
- /**
85
- * Does not support custom rewind functions
86
- *
87
- * @throws RuntimeException
88
- */
89
- public function setRewindFunction($callable)
90
- {
91
- throw new RuntimeException(__CLASS__ . ' does not support custom stream rewind functions');
92
- }
93
-
94
- public function read($length)
95
- {
96
- // Perform a regular read on any previously read data from the buffer
97
- $data = $this->body->read($length);
98
- $remaining = $length - strlen($data);
99
-
100
- // More data was requested so read from the remote stream
101
- if ($remaining) {
102
- // If data was written to the buffer in a position that would have been filled from the remote stream,
103
- // then we must skip bytes on the remote stream to emulate overwriting bytes from that position. This
104
- // mimics the behavior of other PHP stream wrappers.
105
- $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes);
106
-
107
- if ($this->skipReadBytes) {
108
- $len = strlen($remoteData);
109
- $remoteData = substr($remoteData, $this->skipReadBytes);
110
- $this->skipReadBytes = max(0, $this->skipReadBytes - $len);
111
- }
112
-
113
- $data .= $remoteData;
114
- $this->body->write($remoteData);
115
- }
116
-
117
- return $data;
118
- }
119
-
120
- public function write($string)
121
- {
122
- // When appending to the end of the currently read stream, you'll want to skip bytes from being read from
123
- // the remote stream to emulate other stream wrappers. Basically replacing bytes of data of a fixed length.
124
- $overflow = (strlen($string) + $this->ftell()) - $this->remoteStream->ftell();
125
- if ($overflow > 0) {
126
- $this->skipReadBytes += $overflow;
127
- }
128
-
129
- return $this->body->write($string);
130
- }
131
-
132
- /**
133
- * {@inheritdoc}
134
- * @link http://php.net/manual/en/function.fgets.php
135
- */
136
- public function readLine($maxLength = null)
137
- {
138
- $buffer = '';
139
- $size = 0;
140
- while (!$this->isConsumed()) {
141
- $byte = $this->read(1);
142
- $buffer .= $byte;
143
- // Break when a new line is found or the max length - 1 is reached
144
- if ($byte == PHP_EOL || ++$size == $maxLength - 1) {
145
- break;
146
- }
147
- }
148
-
149
- return $buffer;
150
- }
151
-
152
- public function isConsumed()
153
- {
154
- return $this->body->isConsumed() && $this->remoteStream->isConsumed();
155
- }
156
-
157
- /**
158
- * Close both the remote stream and buffer stream
159
- */
160
- public function close()
161
- {
162
- return $this->remoteStream->close() && $this->body->close();
163
- }
164
-
165
- public function setStream($stream, $size = 0)
166
- {
167
- $this->remoteStream->setStream($stream, $size);
168
- }
169
-
170
- public function getContentType()
171
- {
172
- return $this->remoteStream->getContentType();
173
- }
174
-
175
- public function getContentEncoding()
176
- {
177
- return $this->remoteStream->getContentEncoding();
178
- }
179
-
180
- public function getMetaData($key = null)
181
- {
182
- return $this->remoteStream->getMetaData($key);
183
- }
184
-
185
- public function getStream()
186
- {
187
- return $this->remoteStream->getStream();
188
- }
189
-
190
- public function getWrapper()
191
- {
192
- return $this->remoteStream->getWrapper();
193
- }
194
-
195
- public function getWrapperData()
196
- {
197
- return $this->remoteStream->getWrapperData();
198
- }
199
-
200
- public function getStreamType()
201
- {
202
- return $this->remoteStream->getStreamType();
203
- }
204
-
205
- public function getUri()
206
- {
207
- return $this->remoteStream->getUri();
208
- }
209
-
210
- /**
211
- * Always retrieve custom data from the remote stream
212
- * {@inheritdoc}
213
- */
214
- public function getCustomData($key)
215
- {
216
- return $this->remoteStream->getCustomData($key);
217
- }
218
-
219
- /**
220
- * Always set custom data on the remote stream
221
- * {@inheritdoc}
222
- */
223
- public function setCustomData($key, $value)
224
- {
225
- $this->remoteStream->setCustomData($key, $value);
226
-
227
- return $this;
228
- }
229
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php DELETED
@@ -1,506 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Collection;
6
- use Guzzle\Common\AbstractHasDispatcher;
7
- use Guzzle\Common\Exception\ExceptionCollection;
8
- use Guzzle\Common\Exception\InvalidArgumentException;
9
- use Guzzle\Common\Exception\RuntimeException;
10
- use Guzzle\Common\Version;
11
- use Guzzle\Parser\ParserRegistry;
12
- use Guzzle\Parser\UriTemplate\UriTemplateInterface;
13
- use Guzzle\Http\Message\RequestInterface;
14
- use Guzzle\Http\Message\RequestFactory;
15
- use Guzzle\Http\Message\RequestFactoryInterface;
16
- use Guzzle\Http\Curl\CurlMultiInterface;
17
- use Guzzle\Http\Curl\CurlMultiProxy;
18
- use Guzzle\Http\Curl\CurlHandle;
19
- use Guzzle\Http\Curl\CurlVersion;
20
-
21
- /**
22
- * HTTP client
23
- */
24
- class Client extends AbstractHasDispatcher implements ClientInterface
25
- {
26
- /** @deprecated Use [request.options][params] */
27
- const REQUEST_PARAMS = 'request.params';
28
-
29
- const REQUEST_OPTIONS = 'request.options';
30
- const CURL_OPTIONS = 'curl.options';
31
- const SSL_CERT_AUTHORITY = 'ssl.certificate_authority';
32
- const DISABLE_REDIRECTS = RedirectPlugin::DISABLE;
33
-
34
- /** @var Collection Default HTTP headers to set on each request */
35
- protected $defaultHeaders;
36
-
37
- /** @var string The user agent string to set on each request */
38
- protected $userAgent;
39
-
40
- /** @var Collection Parameter object holding configuration data */
41
- private $config;
42
-
43
- /** @var Url Base URL of the client */
44
- private $baseUrl;
45
-
46
- /** @var CurlMultiInterface CurlMulti object used internally */
47
- private $curlMulti;
48
-
49
- /** @var UriTemplateInterface URI template owned by the client */
50
- private $uriTemplate;
51
-
52
- /** @var RequestFactoryInterface Request factory used by the client */
53
- protected $requestFactory;
54
-
55
- public static function getAllEvents()
56
- {
57
- return array(self::CREATE_REQUEST);
58
- }
59
-
60
- /**
61
- * @param string $baseUrl Base URL of the web service
62
- * @param array|Collection $config Configuration settings
63
- *
64
- * @throws RuntimeException if cURL is not installed
65
- */
66
- public function __construct($baseUrl = '', $config = null)
67
- {
68
- if (!extension_loaded('curl')) {
69
- // @codeCoverageIgnoreStart
70
- throw new RuntimeException('The PHP cURL extension must be installed to use Guzzle.');
71
- // @codeCoverageIgnoreEnd
72
- }
73
- $this->setConfig($config ?: new Collection());
74
- $this->initSsl();
75
- $this->setBaseUrl($baseUrl);
76
- $this->defaultHeaders = new Collection();
77
- $this->setRequestFactory(RequestFactory::getInstance());
78
- $this->userAgent = $this->getDefaultUserAgent();
79
- if (!$this->config[self::DISABLE_REDIRECTS]) {
80
- $this->addSubscriber(new RedirectPlugin());
81
- }
82
- }
83
-
84
- final public function setConfig($config)
85
- {
86
- if ($config instanceof Collection) {
87
- $this->config = $config;
88
- } elseif (is_array($config)) {
89
- $this->config = new Collection($config);
90
- } else {
91
- throw new InvalidArgumentException('Config must be an array or Collection');
92
- }
93
-
94
- return $this;
95
- }
96
-
97
- final public function getConfig($key = false)
98
- {
99
- return $key ? $this->config[$key] : $this->config;
100
- }
101
-
102
- /**
103
- * Set a default request option on the client that will be used as a default for each request
104
- *
105
- * @param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo)
106
- * @param mixed $value Value to set
107
- *
108
- * @return $this
109
- */
110
- public function setDefaultOption($keyOrPath, $value)
111
- {
112
- $keyOrPath = self::REQUEST_OPTIONS . '/' . $keyOrPath;
113
- $this->config->setPath($keyOrPath, $value);
114
-
115
- return $this;
116
- }
117
-
118
- /**
119
- * Retrieve a default request option from the client
120
- *
121
- * @param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo)
122
- *
123
- * @return mixed|null
124
- */
125
- public function getDefaultOption($keyOrPath)
126
- {
127
- $keyOrPath = self::REQUEST_OPTIONS . '/' . $keyOrPath;
128
-
129
- return $this->config->getPath($keyOrPath);
130
- }
131
-
132
- final public function setSslVerification($certificateAuthority = true, $verifyPeer = true, $verifyHost = 2)
133
- {
134
- $opts = $this->config[self::CURL_OPTIONS] ?: array();
135
-
136
- if ($certificateAuthority === true) {
137
- // use bundled CA bundle, set secure defaults
138
- $opts[CURLOPT_CAINFO] = __DIR__ . '/Resources/cacert.pem';
139
- $opts[CURLOPT_SSL_VERIFYPEER] = true;
140
- $opts[CURLOPT_SSL_VERIFYHOST] = 2;
141
- } elseif ($certificateAuthority === false) {
142
- unset($opts[CURLOPT_CAINFO]);
143
- $opts[CURLOPT_SSL_VERIFYPEER] = false;
144
- $opts[CURLOPT_SSL_VERIFYHOST] = 0;
145
- } elseif ($verifyPeer !== true && $verifyPeer !== false && $verifyPeer !== 1 && $verifyPeer !== 0) {
146
- throw new InvalidArgumentException('verifyPeer must be 1, 0 or boolean');
147
- } elseif ($verifyHost !== 0 && $verifyHost !== 1 && $verifyHost !== 2) {
148
- throw new InvalidArgumentException('verifyHost must be 0, 1 or 2');
149
- } else {
150
- $opts[CURLOPT_SSL_VERIFYPEER] = $verifyPeer;
151
- $opts[CURLOPT_SSL_VERIFYHOST] = $verifyHost;
152
- if (is_file($certificateAuthority)) {
153
- unset($opts[CURLOPT_CAPATH]);
154
- $opts[CURLOPT_CAINFO] = $certificateAuthority;
155
- } elseif (is_dir($certificateAuthority)) {
156
- unset($opts[CURLOPT_CAINFO]);
157
- $opts[CURLOPT_CAPATH] = $certificateAuthority;
158
- } else {
159
- throw new RuntimeException(
160
- 'Invalid option passed to ' . self::SSL_CERT_AUTHORITY . ': ' . $certificateAuthority
161
- );
162
- }
163
- }
164
-
165
- $this->config->set(self::CURL_OPTIONS, $opts);
166
-
167
- return $this;
168
- }
169
-
170
- public function createRequest($method = 'GET', $uri = null, $headers = null, $body = null, array $options = array())
171
- {
172
- if (!$uri) {
173
- $url = $this->getBaseUrl();
174
- } else {
175
- if (!is_array($uri)) {
176
- $templateVars = null;
177
- } else {
178
- list($uri, $templateVars) = $uri;
179
- }
180
- if (substr($uri, 0, 4) === 'http') {
181
- // Use absolute URLs as-is
182
- $url = $this->expandTemplate($uri, $templateVars);
183
- } else {
184
- $url = Url::factory($this->getBaseUrl())->combine($this->expandTemplate($uri, $templateVars));
185
- }
186
- }
187
-
188
- // If default headers are provided, then merge them under any explicitly provided headers for the request
189
- if (count($this->defaultHeaders)) {
190
- if (!$headers) {
191
- $headers = $this->defaultHeaders->toArray();
192
- } elseif (is_array($headers)) {
193
- $headers += $this->defaultHeaders->toArray();
194
- } elseif ($headers instanceof Collection) {
195
- $headers = $headers->toArray() + $this->defaultHeaders->toArray();
196
- }
197
- }
198
-
199
- return $this->prepareRequest($this->requestFactory->create($method, (string) $url, $headers, $body), $options);
200
- }
201
-
202
- public function getBaseUrl($expand = true)
203
- {
204
- return $expand ? $this->expandTemplate($this->baseUrl) : $this->baseUrl;
205
- }
206
-
207
- public function setBaseUrl($url)
208
- {
209
- $this->baseUrl = $url;
210
-
211
- return $this;
212
- }
213
-
214
- public function setUserAgent($userAgent, $includeDefault = false)
215
- {
216
- if ($includeDefault) {
217
- $userAgent .= ' ' . $this->getDefaultUserAgent();
218
- }
219
- $this->userAgent = $userAgent;
220
-
221
- return $this;
222
- }
223
-
224
- /**
225
- * Get the default User-Agent string to use with Guzzle
226
- *
227
- * @return string
228
- */
229
- public function getDefaultUserAgent()
230
- {
231
- return 'Guzzle/' . Version::VERSION
232
- . ' curl/' . CurlVersion::getInstance()->get('version')
233
- . ' PHP/' . PHP_VERSION;
234
- }
235
-
236
- public function get($uri = null, $headers = null, $options = array())
237
- {
238
- // BC compat: $options can be a string, resource, etc to specify where the response body is downloaded
239
- return is_array($options)
240
- ? $this->createRequest('GET', $uri, $headers, null, $options)
241
- : $this->createRequest('GET', $uri, $headers, $options);
242
- }
243
-
244
- public function head($uri = null, $headers = null, array $options = array())
245
- {
246
- return $this->createRequest('HEAD', $uri, $headers, null, $options);
247
- }
248
-
249
- public function delete($uri = null, $headers = null, $body = null, array $options = array())
250
- {
251
- return $this->createRequest('DELETE', $uri, $headers, $body, $options);
252
- }
253
-
254
- public function put($uri = null, $headers = null, $body = null, array $options = array())
255
- {
256
- return $this->createRequest('PUT', $uri, $headers, $body, $options);
257
- }
258
-
259
- public function patch($uri = null, $headers = null, $body = null, array $options = array())
260
- {
261
- return $this->createRequest('PATCH', $uri, $headers, $body, $options);
262
- }
263
-
264
- public function post($uri = null, $headers = null, $postBody = null, array $options = array())
265
- {
266
- return $this->createRequest('POST', $uri, $headers, $postBody, $options);
267
- }
268
-
269
- public function options($uri = null, array $options = array())
270
- {
271
- return $this->createRequest('OPTIONS', $uri, $options);
272
- }
273
-
274
- public function send($requests)
275
- {
276
- if (!($requests instanceof RequestInterface)) {
277
- return $this->sendMultiple($requests);
278
- }
279
-
280
- try {
281
- /** @var $requests RequestInterface */
282
- $this->getCurlMulti()->add($requests)->send();
283
- return $requests->getResponse();
284
- } catch (ExceptionCollection $e) {
285
- throw $e->getFirst();
286
- }
287
- }
288
-
289
- /**
290
- * Set a curl multi object to be used internally by the client for transferring requests.
291
- *
292
- * @param CurlMultiInterface $curlMulti Multi object
293
- *
294
- * @return self
295
- */
296
- public function setCurlMulti(CurlMultiInterface $curlMulti)
297
- {
298
- $this->curlMulti = $curlMulti;
299
-
300
- return $this;
301
- }
302
-
303
- /**
304
- * @return CurlMultiInterface|CurlMultiProxy
305
- */
306
- public function getCurlMulti()
307
- {
308
- if (!$this->curlMulti) {
309
- $this->curlMulti = new CurlMultiProxy();
310
- }
311
-
312
- return $this->curlMulti;
313
- }
314
-
315
- public function setRequestFactory(RequestFactoryInterface $factory)
316
- {
317
- $this->requestFactory = $factory;
318
-
319
- return $this;
320
- }
321
-
322
- /**
323
- * Set the URI template expander to use with the client
324
- *
325
- * @param UriTemplateInterface $uriTemplate URI template expander
326
- *
327
- * @return self
328
- */
329
- public function setUriTemplate(UriTemplateInterface $uriTemplate)
330
- {
331
- $this->uriTemplate = $uriTemplate;
332
-
333
- return $this;
334
- }
335
-
336
- /**
337
- * Copy the cacert.pem file from the phar if it is not in the temp folder and validate the MD5 checksum
338
- *
339
- * @param bool $md5Check Set to false to not perform the MD5 validation
340
- *
341
- * @return string Returns the path to the extracted cacert
342
- * @throws RuntimeException if the file cannot be copied or there is a MD5 mismatch
343
- */
344
- public function preparePharCacert($md5Check = true)
345
- {
346
- $from = __DIR__ . '/Resources/cacert.pem';
347
- $certFile = sys_get_temp_dir() . '/guzzle-cacert.pem';
348
- if (!file_exists($certFile) && !copy($from, $certFile)) {
349
- throw new RuntimeException("Could not copy {$from} to {$certFile}: " . var_export(error_get_last(), true));
350
- } elseif ($md5Check) {
351
- $actualMd5 = md5_file($certFile);
352
- $expectedMd5 = trim(file_get_contents("{$from}.md5"));
353
- if ($actualMd5 != $expectedMd5) {
354
- throw new RuntimeException("{$certFile} MD5 mismatch: expected {$expectedMd5} but got {$actualMd5}");
355
- }
356
- }
357
-
358
- return $certFile;
359
- }
360
-
361
- /**
362
- * Expand a URI template while merging client config settings into the template variables
363
- *
364
- * @param string $template Template to expand
365
- * @param array $variables Variables to inject
366
- *
367
- * @return string
368
- */
369
- protected function expandTemplate($template, array $variables = null)
370
- {
371
- $expansionVars = $this->getConfig()->toArray();
372
- if ($variables) {
373
- $expansionVars = $variables + $expansionVars;
374
- }
375
-
376
- return $this->getUriTemplate()->expand($template, $expansionVars);
377
- }
378
-
379
- /**
380
- * Get the URI template expander used by the client
381
- *
382
- * @return UriTemplateInterface
383
- */
384
- protected function getUriTemplate()
385
- {
386
- if (!$this->uriTemplate) {
387
- $this->uriTemplate = ParserRegistry::getInstance()->getParser('uri_template');
388
- }
389
-
390
- return $this->uriTemplate;
391
- }
392
-
393
- /**
394
- * Send multiple requests in parallel
395
- *
396
- * @param array $requests Array of RequestInterface objects
397
- *
398
- * @return array Returns an array of Response objects
399
- */
400
- protected function sendMultiple(array $requests)
401
- {
402
- $curlMulti = $this->getCurlMulti();
403
- foreach ($requests as $request) {
404
- $curlMulti->add($request);
405
- }
406
- $curlMulti->send();
407
-
408
- /** @var $request RequestInterface */
409
- $result = array();
410
- foreach ($requests as $request) {
411
- $result[] = $request->getResponse();
412
- }
413
-
414
- return $result;
415
- }
416
-
417
- /**
418
- * Prepare a request to be sent from the Client by adding client specific behaviors and properties to the request.
419
- *
420
- * @param RequestInterface $request Request to prepare for the client
421
- * @param array $options Options to apply to the request
422
- *
423
- * @return RequestInterface
424
- */
425
- protected function prepareRequest(RequestInterface $request, array $options = array())
426
- {
427
- $request->setClient($this)->setEventDispatcher(clone $this->getEventDispatcher());
428
-
429
- if ($curl = $this->config[self::CURL_OPTIONS]) {
430
- $request->getCurlOptions()->overwriteWith(CurlHandle::parseCurlConfig($curl));
431
- }
432
-
433
- if ($params = $this->config[self::REQUEST_PARAMS]) {
434
- Version::warn('request.params is deprecated. Use request.options to add default request options.');
435
- $request->getParams()->overwriteWith($params);
436
- }
437
-
438
- if ($this->userAgent && !$request->hasHeader('User-Agent')) {
439
- $request->setHeader('User-Agent', $this->userAgent);
440
- }
441
-
442
- if ($defaults = $this->config[self::REQUEST_OPTIONS]) {
443
- $this->requestFactory->applyOptions($request, $defaults, RequestFactoryInterface::OPTIONS_AS_DEFAULTS);
444
- }
445
-
446
- if ($options) {
447
- $this->requestFactory->applyOptions($request, $options);
448
- }
449
-
450
- $this->dispatch('client.create_request', array('client' => $this, 'request' => $request));
451
-
452
- return $request;
453
- }
454
-
455
- /**
456
- * Initializes SSL settings
457
- */
458
- protected function initSsl()
459
- {
460
- if ('system' == ($authority = $this->config[self::SSL_CERT_AUTHORITY])) {
461
- return;
462
- }
463
-
464
- if ($authority === null) {
465
- $authority = true;
466
- }
467
-
468
- if ($authority === true && substr(__FILE__, 0, 7) == 'phar://') {
469
- $authority = $this->preparePharCacert();
470
- $that = $this;
471
- $this->getEventDispatcher()->addListener('request.before_send', function ($event) use ($authority, $that) {
472
- if ($authority == $event['request']->getCurlOptions()->get(CURLOPT_CAINFO)) {
473
- $that->preparePharCacert(false);
474
- }
475
- });
476
- }
477
-
478
- $this->setSslVerification($authority);
479
- }
480
-
481
- /**
482
- * @deprecated
483
- */
484
- public function getDefaultHeaders()
485
- {
486
- Version::warn(__METHOD__ . ' is deprecated. Use the request.options array to retrieve default request options');
487
- return $this->defaultHeaders;
488
- }
489
-
490
- /**
491
- * @deprecated
492
- */
493
- public function setDefaultHeaders($headers)
494
- {
495
- Version::warn(__METHOD__ . ' is deprecated. Use the request.options array to specify default request options');
496
- if ($headers instanceof Collection) {
497
- $this->defaultHeaders = $headers;
498
- } elseif (is_array($headers)) {
499
- $this->defaultHeaders = new Collection($headers);
500
- } else {
501
- throw new InvalidArgumentException('Headers must be an array or Collection');
502
- }
503
-
504
- return $this;
505
- }
506
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php DELETED
@@ -1,223 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\HasDispatcherInterface;
6
- use Guzzle\Common\Collection;
7
- use Guzzle\Common\Exception\InvalidArgumentException;
8
- use Guzzle\Http\Message\EntityEnclosingRequestInterface;
9
- use Guzzle\Http\Message\RequestInterface;
10
-
11
- /**
12
- * Client interface for send HTTP requests
13
- */
14
- interface ClientInterface extends HasDispatcherInterface
15
- {
16
- const CREATE_REQUEST = 'client.create_request';
17
-
18
- /** @var string RFC 1123 HTTP-Date */
19
- const HTTP_DATE = 'D, d M Y H:i:s \G\M\T';
20
-
21
- /**
22
- * Set the configuration object to use with the client
23
- *
24
- * @param array|Collection $config Parameters that define how the client behaves
25
- *
26
- * @return self
27
- */
28
- public function setConfig($config);
29
-
30
- /**
31
- * Get a configuration setting or all of the configuration settings. The Collection result of this method can be
32
- * modified to change the configuration settings of a client.
33
- *
34
- * A client should honor the following special values:
35
- *
36
- * - request.options: Associative array of default RequestFactory options to apply to each request
37
- * - request.params: Associative array of request parameters (data values) to apply to each request
38
- * - curl.options: Associative array of cURL configuration settings to apply to each request
39
- * - ssl.certificate_authority: Path a CAINFO, CAPATH, true to use strict defaults, or false to disable verification
40
- * - redirect.disable: Set to true to disable redirects
41
- *
42
- * @param bool|string $key Configuration value to retrieve. Set to FALSE to retrieve all values of the client.
43
- * The object return can be modified, and modifications will affect the client's config.
44
- * @return mixed|Collection
45
- * @see \Guzzle\Http\Message\RequestFactoryInterface::applyOptions for a full list of request.options options
46
- */
47
- public function getConfig($key = false);
48
-
49
- /**
50
- * Create and return a new {@see RequestInterface} configured for the client.
51
- *
52
- * Use an absolute path to override the base path of the client, or a relative path to append to the base path of
53
- * the client. The URI can contain the query string as well. Use an array to provide a URI template and additional
54
- * variables to use in the URI template expansion.
55
- *
56
- * @param string $method HTTP method. Defaults to GET
57
- * @param string|array $uri Resource URI.
58
- * @param array|Collection $headers HTTP headers
59
- * @param string|resource|array|EntityBodyInterface $body Entity body of request (POST/PUT) or response (GET)
60
- * @param array $options Array of options to apply to the request
61
- *
62
- * @return RequestInterface
63
- * @throws InvalidArgumentException if a URI array is passed that does not contain exactly two elements: the URI
64
- * followed by template variables
65
- */
66
- public function createRequest(
67
- $method = RequestInterface::GET,
68
- $uri = null,
69
- $headers = null,
70
- $body = null,
71
- array $options = array()
72
- );
73
-
74
- /**
75
- * Create a GET request for the client
76
- *
77
- * @param string|array $uri Resource URI
78
- * @param array|Collection $headers HTTP headers
79
- * @param array $options Options to apply to the request. For BC compatibility, you can also pass a
80
- * string to tell Guzzle to download the body of the response to a particular
81
- * location. Use the 'body' option instead for forward compatibility.
82
- * @return RequestInterface
83
- * @see Guzzle\Http\ClientInterface::createRequest()
84
- */
85
- public function get($uri = null, $headers = null, $options = array());
86
-
87
- /**
88
- * Create a HEAD request for the client
89
- *
90
- * @param string|array $uri Resource URI
91
- * @param array|Collection $headers HTTP headers
92
- * @param array $options Options to apply to the request
93
- *
94
- * @return RequestInterface
95
- * @see Guzzle\Http\ClientInterface::createRequest()
96
- */
97
- public function head($uri = null, $headers = null, array $options = array());
98
-
99
- /**
100
- * Create a DELETE request for the client
101
- *
102
- * @param string|array $uri Resource URI
103
- * @param array|Collection $headers HTTP headers
104
- * @param string|resource|EntityBodyInterface $body Body to send in the request
105
- * @param array $options Options to apply to the request
106
- *
107
- * @return EntityEnclosingRequestInterface
108
- * @see Guzzle\Http\ClientInterface::createRequest()
109
- */
110
- public function delete($uri = null, $headers = null, $body = null, array $options = array());
111
-
112
- /**
113
- * Create a PUT request for the client
114
- *
115
- * @param string|array $uri Resource URI
116
- * @param array|Collection $headers HTTP headers
117
- * @param string|resource|EntityBodyInterface $body Body to send in the request
118
- * @param array $options Options to apply to the request
119
- *
120
- * @return EntityEnclosingRequestInterface
121
- * @see Guzzle\Http\ClientInterface::createRequest()
122
- */
123
- public function put($uri = null, $headers = null, $body = null, array $options = array());
124
-
125
- /**
126
- * Create a PATCH request for the client
127
- *
128
- * @param string|array $uri Resource URI
129
- * @param array|Collection $headers HTTP headers
130
- * @param string|resource|EntityBodyInterface $body Body to send in the request
131
- * @param array $options Options to apply to the request
132
- *
133
- * @return EntityEnclosingRequestInterface
134
- * @see Guzzle\Http\ClientInterface::createRequest()
135
- */
136
- public function patch($uri = null, $headers = null, $body = null, array $options = array());
137
-
138
- /**
139
- * Create a POST request for the client
140
- *
141
- * @param string|array $uri Resource URI
142
- * @param array|Collection $headers HTTP headers
143
- * @param array|Collection|string|EntityBodyInterface $postBody POST body. Can be a string, EntityBody, or
144
- * associative array of POST fields to send in the body of the
145
- * request. Prefix a value in the array with the @ symbol to
146
- * reference a file.
147
- * @param array $options Options to apply to the request
148
- *
149
- * @return EntityEnclosingRequestInterface
150
- * @see Guzzle\Http\ClientInterface::createRequest()
151
- */
152
- public function post($uri = null, $headers = null, $postBody = null, array $options = array());
153
-
154
- /**
155
- * Create an OPTIONS request for the client
156
- *
157
- * @param string|array $uri Resource URI
158
- * @param array $options Options to apply to the request
159
- *
160
- * @return RequestInterface
161
- * @see Guzzle\Http\ClientInterface::createRequest()
162
- */
163
- public function options($uri = null, array $options = array());
164
-
165
- /**
166
- * Sends a single request or an array of requests in parallel
167
- *
168
- * @param array|RequestInterface $requests One or more RequestInterface objects to send
169
- *
170
- * @return \Guzzle\Http\Message\Response|array Returns a single Response or an array of Response objects
171
- */
172
- public function send($requests);
173
-
174
- /**
175
- * Get the client's base URL as either an expanded or raw URI template
176
- *
177
- * @param bool $expand Set to FALSE to get the raw base URL without URI template expansion
178
- *
179
- * @return string|null
180
- */
181
- public function getBaseUrl($expand = true);
182
-
183
- /**
184
- * Set the base URL of the client
185
- *
186
- * @param string $url The base service endpoint URL of the webservice
187
- *
188
- * @return self
189
- */
190
- public function setBaseUrl($url);
191
-
192
- /**
193
- * Set the User-Agent header to be used on all requests from the client
194
- *
195
- * @param string $userAgent User agent string
196
- * @param bool $includeDefault Set to true to prepend the value to Guzzle's default user agent string
197
- *
198
- * @return self
199
- */
200
- public function setUserAgent($userAgent, $includeDefault = false);
201
-
202
- /**
203
- * Set SSL verification options.
204
- *
205
- * Setting $certificateAuthority to TRUE will result in the bundled cacert.pem being used to verify against the
206
- * remote host.
207
- *
208
- * Alternate certificates to verify against can be specified with the $certificateAuthority option set to the full
209
- * path to a certificate file, or the path to a directory containing certificates.
210
- *
211
- * Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and
212
- * disable host verification. Please don't do this unless you really know what you're doing, and why you're doing
213
- * it.
214
- *
215
- * @param string|bool $certificateAuthority bool, file path, or directory path
216
- * @param bool $verifyPeer FALSE to stop from verifying the peer's certificate.
217
- * @param int $verifyHost Set to 1 to check the existence of a common name in the SSL peer
218
- * certificate. 2 to check the existence of a common name and also verify
219
- * that it matches the hostname provided.
220
- * @return self
221
- */
222
- public function setSslVerification($certificateAuthority = true, $verifyPeer = true, $verifyHost = 2);
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlHandle.php DELETED
@@ -1,464 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
- use Guzzle\Common\Exception\RuntimeException;
7
- use Guzzle\Common\Collection;
8
- use Guzzle\Http\Message\EntityEnclosingRequest;
9
- use Guzzle\Http\Message\RequestInterface;
10
- use Guzzle\Parser\ParserRegistry;
11
- use Guzzle\Http\Url;
12
-
13
- /**
14
- * Immutable wrapper for a cURL handle
15
- */
16
- class CurlHandle
17
- {
18
- const BODY_AS_STRING = 'body_as_string';
19
- const PROGRESS = 'progress';
20
- const DEBUG = 'debug';
21
-
22
- /** @var Collection Curl options */
23
- protected $options;
24
-
25
- /** @var resource Curl resource handle */
26
- protected $handle;
27
-
28
- /** @var int CURLE_* error */
29
- protected $errorNo = CURLE_OK;
30
-
31
- /**
32
- * Factory method to create a new curl handle based on an HTTP request.
33
- *
34
- * There are some helpful options you can set to enable specific behavior:
35
- * - debug: Set to true to enable cURL debug functionality to track the actual headers sent over the wire.
36
- * - progress: Set to true to enable progress function callbacks.
37
- *
38
- * @param RequestInterface $request Request
39
- *
40
- * @return CurlHandle
41
- * @throws RuntimeException
42
- */
43
- public static function factory(RequestInterface $request)
44
- {
45
- $requestCurlOptions = $request->getCurlOptions();
46
- $mediator = new RequestMediator($request, $requestCurlOptions->get('emit_io'));
47
- $tempContentLength = null;
48
- $method = $request->getMethod();
49
- $bodyAsString = $requestCurlOptions->get(self::BODY_AS_STRING);
50
-
51
- // Prepare url
52
- $url = (string)$request->getUrl();
53
- if(($pos = strpos($url, '#')) !== false ){
54
- // strip fragment from url
55
- $url = substr($url, 0, $pos);
56
- }
57
-
58
- // Array of default cURL options.
59
- $curlOptions = array(
60
- CURLOPT_URL => $url,
61
- CURLOPT_CONNECTTIMEOUT => 150,
62
- CURLOPT_RETURNTRANSFER => false,
63
- CURLOPT_HEADER => false,
64
- CURLOPT_PORT => $request->getPort(),
65
- CURLOPT_HTTPHEADER => array(),
66
- CURLOPT_WRITEFUNCTION => array($mediator, 'writeResponseBody'),
67
- CURLOPT_HEADERFUNCTION => array($mediator, 'receiveResponseHeader'),
68
- CURLOPT_HTTP_VERSION => $request->getProtocolVersion() === '1.0'
69
- ? CURL_HTTP_VERSION_1_0 : CURL_HTTP_VERSION_1_1,
70
- // Verifies the authenticity of the peer's certificate
71
- CURLOPT_SSL_VERIFYPEER => 1,
72
- // Certificate must indicate that the server is the server to which you meant to connect
73
- CURLOPT_SSL_VERIFYHOST => 2
74
- );
75
-
76
- if (defined('CURLOPT_PROTOCOLS')) {
77
- // Allow only HTTP and HTTPS protocols
78
- $curlOptions[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
79
- }
80
-
81
- // Add CURLOPT_ENCODING if Accept-Encoding header is provided
82
- if ($acceptEncodingHeader = $request->getHeader('Accept-Encoding')) {
83
- $curlOptions[CURLOPT_ENCODING] = (string) $acceptEncodingHeader;
84
- // Let cURL set the Accept-Encoding header, prevents duplicate values
85
- $request->removeHeader('Accept-Encoding');
86
- }
87
-
88
- // Enable curl debug information if the 'debug' param was set
89
- if ($requestCurlOptions->get('debug')) {
90
- $curlOptions[CURLOPT_STDERR] = fopen('php://temp', 'r+');
91
- // @codeCoverageIgnoreStart
92
- if (false === $curlOptions[CURLOPT_STDERR]) {
93
- throw new RuntimeException('Unable to create a stream for CURLOPT_STDERR');
94
- }
95
- // @codeCoverageIgnoreEnd
96
- $curlOptions[CURLOPT_VERBOSE] = true;
97
- }
98
-
99
- // Specify settings according to the HTTP method
100
- if ($method == 'GET') {
101
- $curlOptions[CURLOPT_HTTPGET] = true;
102
- } elseif ($method == 'HEAD') {
103
- $curlOptions[CURLOPT_NOBODY] = true;
104
- // HEAD requests do not use a write function
105
- unset($curlOptions[CURLOPT_WRITEFUNCTION]);
106
- } elseif (!($request instanceof EntityEnclosingRequest)) {
107
- $curlOptions[CURLOPT_CUSTOMREQUEST] = $method;
108
- } else {
109
-
110
- $curlOptions[CURLOPT_CUSTOMREQUEST] = $method;
111
-
112
- // Handle sending raw bodies in a request
113
- if ($request->getBody()) {
114
- // You can send the body as a string using curl's CURLOPT_POSTFIELDS
115
- if ($bodyAsString) {
116
- $curlOptions[CURLOPT_POSTFIELDS] = (string) $request->getBody();
117
- // Allow curl to add the Content-Length for us to account for the times when
118
- // POST redirects are followed by GET requests
119
- if ($tempContentLength = $request->getHeader('Content-Length')) {
120
- $tempContentLength = (int) (string) $tempContentLength;
121
- }
122
- // Remove the curl generated Content-Type header if none was set manually
123
- if (!$request->hasHeader('Content-Type')) {
124
- $curlOptions[CURLOPT_HTTPHEADER][] = 'Content-Type:';
125
- }
126
- } else {
127
- $curlOptions[CURLOPT_UPLOAD] = true;
128
- // Let cURL handle setting the Content-Length header
129
- if ($tempContentLength = $request->getHeader('Content-Length')) {
130
- $tempContentLength = (int) (string) $tempContentLength;
131
- $curlOptions[CURLOPT_INFILESIZE] = $tempContentLength;
132
- }
133
- // Add a callback for curl to read data to send with the request only if a body was specified
134
- $curlOptions[CURLOPT_READFUNCTION] = array($mediator, 'readRequestBody');
135
- // Attempt to seek to the start of the stream
136
- $request->getBody()->seek(0);
137
- }
138
-
139
- } else {
140
-
141
- // Special handling for POST specific fields and files
142
- $postFields = false;
143
- if (count($request->getPostFiles())) {
144
- $postFields = $request->getPostFields()->useUrlEncoding(false)->urlEncode();
145
- foreach ($request->getPostFiles() as $key => $data) {
146
- $prefixKeys = count($data) > 1;
147
- foreach ($data as $index => $file) {
148
- // Allow multiple files in the same key
149
- $fieldKey = $prefixKeys ? "{$key}[{$index}]" : $key;
150
- $postFields[$fieldKey] = $file->getCurlValue();
151
- }
152
- }
153
- } elseif (count($request->getPostFields())) {
154
- $postFields = (string) $request->getPostFields()->useUrlEncoding(true);
155
- }
156
-
157
- if ($postFields !== false) {
158
- if ($method == 'POST') {
159
- unset($curlOptions[CURLOPT_CUSTOMREQUEST]);
160
- $curlOptions[CURLOPT_POST] = true;
161
- }
162
- $curlOptions[CURLOPT_POSTFIELDS] = $postFields;
163
- $request->removeHeader('Content-Length');
164
- }
165
- }
166
-
167
- // If the Expect header is not present, prevent curl from adding it
168
- if (!$request->hasHeader('Expect')) {
169
- $curlOptions[CURLOPT_HTTPHEADER][] = 'Expect:';
170
- }
171
- }
172
-
173
- // If a Content-Length header was specified but we want to allow curl to set one for us
174
- if (null !== $tempContentLength) {
175
- $request->removeHeader('Content-Length');
176
- }
177
-
178
- // Set custom cURL options
179
- foreach ($requestCurlOptions->toArray() as $key => $value) {
180
- if (is_numeric($key)) {
181
- $curlOptions[$key] = $value;
182
- }
183
- }
184
-
185
- // Do not set an Accept header by default
186
- if (!isset($curlOptions[CURLOPT_ENCODING])) {
187
- $curlOptions[CURLOPT_HTTPHEADER][] = 'Accept:';
188
- }
189
-
190
- // Add any custom headers to the request. Empty headers will cause curl to not send the header at all.
191
- foreach ($request->getHeaderLines() as $line) {
192
- $curlOptions[CURLOPT_HTTPHEADER][] = $line;
193
- }
194
-
195
- // Add the content-length header back if it was temporarily removed
196
- if ($tempContentLength) {
197
- $request->setHeader('Content-Length', $tempContentLength);
198
- }
199
-
200
- // Apply the options to a new cURL handle.
201
- $handle = curl_init();
202
-
203
- // Enable the progress function if the 'progress' param was set
204
- if ($requestCurlOptions->get('progress')) {
205
- // Wrap the function in a function that provides the curl handle to the mediator's progress function
206
- // Using this rather than injecting the handle into the mediator prevents a circular reference
207
- $curlOptions[CURLOPT_PROGRESSFUNCTION] = function () use ($mediator, $handle) {
208
- $args = func_get_args();
209
- $args[] = $handle;
210
-
211
- // PHP 5.5 pushed the handle onto the start of the args
212
- if (is_resource($args[0])) {
213
- array_shift($args);
214
- }
215
-
216
- call_user_func_array(array($mediator, 'progress'), $args);
217
- };
218
- $curlOptions[CURLOPT_NOPROGRESS] = false;
219
- }
220
-
221
- curl_setopt_array($handle, $curlOptions);
222
-
223
- return new static($handle, $curlOptions);
224
- }
225
-
226
- /**
227
- * Construct a new CurlHandle object that wraps a cURL handle
228
- *
229
- * @param resource $handle Configured cURL handle resource
230
- * @param Collection|array $options Curl options to use with the handle
231
- *
232
- * @throws InvalidArgumentException
233
- */
234
- public function __construct($handle, $options)
235
- {
236
- if (!is_resource($handle)) {
237
- throw new InvalidArgumentException('Invalid handle provided');
238
- }
239
- if (is_array($options)) {
240
- $this->options = new Collection($options);
241
- } elseif ($options instanceof Collection) {
242
- $this->options = $options;
243
- } else {
244
- throw new InvalidArgumentException('Expected array or Collection');
245
- }
246
- $this->handle = $handle;
247
- }
248
-
249
- /**
250
- * Destructor
251
- */
252
- public function __destruct()
253
- {
254
- $this->close();
255
- }
256
-
257
- /**
258
- * Close the curl handle
259
- */
260
- public function close()
261
- {
262
- if (is_resource($this->handle)) {
263
- curl_close($this->handle);
264
- }
265
- $this->handle = null;
266
- }
267
-
268
- /**
269
- * Check if the handle is available and still OK
270
- *
271
- * @return bool
272
- */
273
- public function isAvailable()
274
- {
275
- return is_resource($this->handle);
276
- }
277
-
278
- /**
279
- * Get the last error that occurred on the cURL handle
280
- *
281
- * @return string
282
- */
283
- public function getError()
284
- {
285
- return $this->isAvailable() ? curl_error($this->handle) : '';
286
- }
287
-
288
- /**
289
- * Get the last error number that occurred on the cURL handle
290
- *
291
- * @return int
292
- */
293
- public function getErrorNo()
294
- {
295
- if ($this->errorNo) {
296
- return $this->errorNo;
297
- }
298
-
299
- return $this->isAvailable() ? curl_errno($this->handle) : CURLE_OK;
300
- }
301
-
302
- /**
303
- * Set the curl error number
304
- *
305
- * @param int $error Error number to set
306
- *
307
- * @return CurlHandle
308
- */
309
- public function setErrorNo($error)
310
- {
311
- $this->errorNo = $error;
312
-
313
- return $this;
314
- }
315
-
316
- /**
317
- * Get cURL curl_getinfo data
318
- *
319
- * @param int $option Option to retrieve. Pass null to retrieve all data as an array.
320
- *
321
- * @return array|mixed
322
- */
323
- public function getInfo($option = null)
324
- {
325
- if (!is_resource($this->handle)) {
326
- return null;
327
- }
328
-
329
- if (null !== $option) {
330
- return curl_getinfo($this->handle, $option) ?: null;
331
- }
332
-
333
- return curl_getinfo($this->handle) ?: array();
334
- }
335
-
336
- /**
337
- * Get the stderr output
338
- *
339
- * @param bool $asResource Set to TRUE to get an fopen resource
340
- *
341
- * @return string|resource|null
342
- */
343
- public function getStderr($asResource = false)
344
- {
345
- $stderr = $this->getOptions()->get(CURLOPT_STDERR);
346
- if (!$stderr) {
347
- return null;
348
- }
349
-
350
- if ($asResource) {
351
- return $stderr;
352
- }
353
-
354
- fseek($stderr, 0);
355
- $e = stream_get_contents($stderr);
356
- fseek($stderr, 0, SEEK_END);
357
-
358
- return $e;
359
- }
360
-
361
- /**
362
- * Get the URL that this handle is connecting to
363
- *
364
- * @return Url
365
- */
366
- public function getUrl()
367
- {
368
- return Url::factory($this->options->get(CURLOPT_URL));
369
- }
370
-
371
- /**
372
- * Get the wrapped curl handle
373
- *
374
- * @return resource|null Returns the cURL handle or null if it was closed
375
- */
376
- public function getHandle()
377
- {
378
- return $this->isAvailable() ? $this->handle : null;
379
- }
380
-
381
- /**
382
- * Get the cURL setopt options of the handle. Changing values in the return object will have no effect on the curl
383
- * handle after it is created.
384
- *
385
- * @return Collection
386
- */
387
- public function getOptions()
388
- {
389
- return $this->options;
390
- }
391
-
392
- /**
393
- * Update a request based on the log messages of the CurlHandle
394
- *
395
- * @param RequestInterface $request Request to update
396
- */
397
- public function updateRequestFromTransfer(RequestInterface $request)
398
- {
399
- if (!$request->getResponse()) {
400
- return;
401
- }
402
-
403
- // Update the transfer stats of the response
404
- $request->getResponse()->setInfo($this->getInfo());
405
-
406
- if (!$log = $this->getStderr(true)) {
407
- return;
408
- }
409
-
410
- // Parse the cURL stderr output for outgoing requests
411
- $headers = '';
412
- fseek($log, 0);
413
- while (($line = fgets($log)) !== false) {
414
- if ($line && $line[0] == '>') {
415
- $headers = substr(trim($line), 2) . "\r\n";
416
- while (($line = fgets($log)) !== false) {
417
- if ($line[0] == '*' || $line[0] == '<') {
418
- break;
419
- } else {
420
- $headers .= trim($line) . "\r\n";
421
- }
422
- }
423
- }
424
- }
425
-
426
- // Add request headers to the request exactly as they were sent
427
- if ($headers) {
428
- $parsed = ParserRegistry::getInstance()->getParser('message')->parseRequest($headers);
429
- if (!empty($parsed['headers'])) {
430
- $request->setHeaders(array());
431
- foreach ($parsed['headers'] as $name => $value) {
432
- $request->setHeader($name, $value);
433
- }
434
- }
435
- if (!empty($parsed['version'])) {
436
- $request->setProtocolVersion($parsed['version']);
437
- }
438
- }
439
- }
440
-
441
- /**
442
- * Parse the config and replace curl.* configurators into the constant based values so it can be used elsewhere
443
- *
444
- * @param array|Collection $config The configuration we want to parse
445
- *
446
- * @return array
447
- */
448
- public static function parseCurlConfig($config)
449
- {
450
- $curlOptions = array();
451
- foreach ($config as $key => $value) {
452
- if (is_string($key) && defined($key)) {
453
- // Convert constants represented as string to constant int values
454
- $key = constant($key);
455
- }
456
- if (is_string($value) && defined($value)) {
457
- $value = constant($value);
458
- }
459
- $curlOptions[$key] = $value;
460
- }
461
-
462
- return $curlOptions;
463
- }
464
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php DELETED
@@ -1,363 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- use Guzzle\Common\AbstractHasDispatcher;
6
- use Guzzle\Common\Event;
7
- use Guzzle\Http\Exception\MultiTransferException;
8
- use Guzzle\Http\Exception\CurlException;
9
- use Guzzle\Http\Message\RequestInterface;
10
-
11
- /**
12
- * Send {@see RequestInterface} objects in parallel using curl_multi
13
- */
14
- class CurlMulti extends AbstractHasDispatcher implements CurlMultiInterface
15
- {
16
- /** @var resource cURL multi handle. */
17
- protected $multiHandle;
18
-
19
- /** @var array Attached {@see RequestInterface} objects. */
20
- protected $requests;
21
-
22
- /** @var \SplObjectStorage RequestInterface to CurlHandle hash */
23
- protected $handles;
24
-
25
- /** @var array Hash mapping curl handle resource IDs to request objects */
26
- protected $resourceHash;
27
-
28
- /** @var array Queued exceptions */
29
- protected $exceptions = array();
30
-
31
- /** @var array Requests that succeeded */
32
- protected $successful = array();
33
-
34
- /** @var array cURL multi error values and codes */
35
- protected $multiErrors = array(
36
- CURLM_BAD_HANDLE => array('CURLM_BAD_HANDLE', 'The passed-in handle is not a valid CURLM handle.'),
37
- CURLM_BAD_EASY_HANDLE => array('CURLM_BAD_EASY_HANDLE', "An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle."),
38
- CURLM_OUT_OF_MEMORY => array('CURLM_OUT_OF_MEMORY', 'You are doomed.'),
39
- CURLM_INTERNAL_ERROR => array('CURLM_INTERNAL_ERROR', 'This can only be returned if libcurl bugs. Please report it to us!')
40
- );
41
-
42
- public function __construct()
43
- {
44
- $this->multiHandle = curl_multi_init();
45
- // @codeCoverageIgnoreStart
46
- if ($this->multiHandle === false) {
47
- throw new CurlException('Unable to create multi handle');
48
- }
49
- // @codeCoverageIgnoreEnd
50
- $this->reset();
51
- }
52
-
53
- public function __destruct()
54
- {
55
- if (is_resource($this->multiHandle)) {
56
- curl_multi_close($this->multiHandle);
57
- }
58
- }
59
-
60
- public function add(RequestInterface $request)
61
- {
62
- $this->requests[] = $request;
63
- // If requests are currently transferring and this is async, then the
64
- // request must be prepared now as the send() method is not called.
65
- $this->beforeSend($request);
66
- $this->dispatch(self::ADD_REQUEST, array('request' => $request));
67
-
68
- return $this;
69
- }
70
-
71
- public function all()
72
- {
73
- return $this->requests;
74
- }
75
-
76
- public function remove(RequestInterface $request)
77
- {
78
- $this->removeHandle($request);
79
- if (($index = array_search($request, $this->requests, true)) !== false) {
80
- $request = $this->requests[$index];
81
- unset($this->requests[$index]);
82
- $this->requests = array_values($this->requests);
83
- $this->dispatch(self::REMOVE_REQUEST, array('request' => $request));
84
- return true;
85
- }
86
-
87
- return false;
88
- }
89
-
90
- public function reset($hard = false)
91
- {
92
- // Remove each request
93
- if ($this->requests) {
94
- foreach ($this->requests as $request) {
95
- $this->remove($request);
96
- }
97
- }
98
-
99
- $this->handles = new \SplObjectStorage();
100
- $this->requests = $this->resourceHash = $this->exceptions = $this->successful = array();
101
- }
102
-
103
- public function send()
104
- {
105
- $this->perform();
106
- $exceptions = $this->exceptions;
107
- $successful = $this->successful;
108
- $this->reset();
109
-
110
- if ($exceptions) {
111
- $this->throwMultiException($exceptions, $successful);
112
- }
113
- }
114
-
115
- public function count()
116
- {
117
- return count($this->requests);
118
- }
119
-
120
- /**
121
- * Build and throw a MultiTransferException
122
- *
123
- * @param array $exceptions Exceptions encountered
124
- * @param array $successful Successful requests
125
- * @throws MultiTransferException
126
- */
127
- protected function throwMultiException(array $exceptions, array $successful)
128
- {
129
- $multiException = new MultiTransferException('Errors during multi transfer');
130
-
131
- while ($e = array_shift($exceptions)) {
132
- $multiException->addFailedRequestWithException($e['request'], $e['exception']);
133
- }
134
-
135
- // Add successful requests
136
- foreach ($successful as $request) {
137
- if (!$multiException->containsRequest($request)) {
138
- $multiException->addSuccessfulRequest($request);
139
- }
140
- }
141
-
142
- throw $multiException;
143
- }
144
-
145
- /**
146
- * Prepare for sending
147
- *
148
- * @param RequestInterface $request Request to prepare
149
- * @throws \Exception on error preparing the request
150
- */
151
- protected function beforeSend(RequestInterface $request)
152
- {
153
- try {
154
- $state = $request->setState(RequestInterface::STATE_TRANSFER);
155
- if ($state == RequestInterface::STATE_TRANSFER) {
156
- // Add the request curl handle to the multi handle
157
- $handle = $this->createCurlHandle($request)->getHandle();
158
- $this->checkCurlResult(curl_multi_add_handle($this->multiHandle, $handle));
159
- } else {
160
- // Requests might decide they don't need to be sent just before transfer (e.g. CachePlugin)
161
- $this->remove($request);
162
- if ($state == RequestInterface::STATE_COMPLETE) {
163
- $this->successful[] = $request;
164
- }
165
- }
166
- } catch (\Exception $e) {
167
- // Queue the exception to be thrown when sent
168
- $this->removeErroredRequest($request, $e);
169
- }
170
- }
171
-
172
- /**
173
- * Create a curl handle for a request
174
- *
175
- * @param RequestInterface $request Request
176
- *
177
- * @return CurlHandle
178
- */
179
- protected function createCurlHandle(RequestInterface $request)
180
- {
181
- $wrapper = CurlHandle::factory($request);
182
- $this->handles[$request] = $wrapper;
183
- $this->resourceHash[(int) $wrapper->getHandle()] = $request;
184
-
185
- return $wrapper;
186
- }
187
-
188
- /**
189
- * Get the data from the multi handle
190
- */
191
- protected function perform()
192
- {
193
- $event = new Event(array('curl_multi' => $this));
194
-
195
- while ($this->requests) {
196
- // Notify each request as polling
197
- $blocking = $total = 0;
198
- foreach ($this->requests as $request) {
199
- ++$total;
200
- $event['request'] = $request;
201
- $request->getEventDispatcher()->dispatch(self::POLLING_REQUEST, $event);
202
- // The blocking variable just has to be non-falsey to block the loop
203
- if ($request->getParams()->hasKey(self::BLOCKING)) {
204
- ++$blocking;
205
- }
206
- }
207
- if ($blocking == $total) {
208
- // Sleep to prevent eating CPU because no requests are actually pending a select call
209
- usleep(500);
210
- } else {
211
- $this->executeHandles();
212
- }
213
- }
214
- }
215
-
216
- /**
217
- * Execute and select curl handles
218
- */
219
- private function executeHandles()
220
- {
221
- // The first curl_multi_select often times out no matter what, but is usually required for fast transfers
222
- $selectTimeout = 0.001;
223
- $active = false;
224
- do {
225
- while (($mrc = curl_multi_exec($this->multiHandle, $active)) == CURLM_CALL_MULTI_PERFORM);
226
- $this->checkCurlResult($mrc);
227
- $this->processMessages();
228
- if ($active && curl_multi_select($this->multiHandle, $selectTimeout) === -1) {
229
- // Perform a usleep if a select returns -1: https://bugs.php.net/bug.php?id=61141
230
- usleep(150);
231
- }
232
- $selectTimeout = 1;
233
- } while ($active);
234
- }
235
-
236
- /**
237
- * Process any received curl multi messages
238
- */
239
- private function processMessages()
240
- {
241
- while ($done = curl_multi_info_read($this->multiHandle)) {
242
- $request = $this->resourceHash[(int) $done['handle']];
243
- try {
244
- $this->processResponse($request, $this->handles[$request], $done);
245
- $this->successful[] = $request;
246
- } catch (\Exception $e) {
247
- $this->removeErroredRequest($request, $e);
248
- }
249
- }
250
- }
251
-
252
- /**
253
- * Remove a request that encountered an exception
254
- *
255
- * @param RequestInterface $request Request to remove
256
- * @param \Exception $e Exception encountered
257
- */
258
- protected function removeErroredRequest(RequestInterface $request, \Exception $e = null)
259
- {
260
- $this->exceptions[] = array('request' => $request, 'exception' => $e);
261
- $this->remove($request);
262
- $this->dispatch(self::MULTI_EXCEPTION, array('exception' => $e, 'all_exceptions' => $this->exceptions));
263
- }
264
-
265
- /**
266
- * Check for errors and fix headers of a request based on a curl response
267
- *
268
- * @param RequestInterface $request Request to process
269
- * @param CurlHandle $handle Curl handle object
270
- * @param array $curl Array returned from curl_multi_info_read
271
- *
272
- * @throws CurlException on Curl error
273
- */
274
- protected function processResponse(RequestInterface $request, CurlHandle $handle, array $curl)
275
- {
276
- // Set the transfer stats on the response
277
- $handle->updateRequestFromTransfer($request);
278
- // Check if a cURL exception occurred, and if so, notify things
279
- $curlException = $this->isCurlException($request, $handle, $curl);
280
-
281
- // Always remove completed curl handles. They can be added back again
282
- // via events if needed (e.g. ExponentialBackoffPlugin)
283
- $this->removeHandle($request);
284
-
285
- if (!$curlException) {
286
- $state = $request->setState(RequestInterface::STATE_COMPLETE, array('handle' => $handle));
287
- // Only remove the request if it wasn't resent as a result of the state change
288
- if ($state != RequestInterface::STATE_TRANSFER) {
289
- $this->remove($request);
290
- }
291
- } else {
292
- // Set the state of the request to an error
293
- $state = $request->setState(RequestInterface::STATE_ERROR, array('exception' => $curlException));
294
- // Allow things to ignore the error if possible
295
- if ($state != RequestInterface::STATE_TRANSFER) {
296
- $this->remove($request);
297
- }
298
- // The error was not handled, so fail
299
- if ($state == RequestInterface::STATE_ERROR) {
300
- /** @var CurlException $curlException */
301
- throw $curlException;
302
- }
303
- }
304
- }
305
-
306
- /**
307
- * Remove a curl handle from the curl multi object
308
- *
309
- * @param RequestInterface $request Request that owns the handle
310
- */
311
- protected function removeHandle(RequestInterface $request)
312
- {
313
- if (isset($this->handles[$request])) {
314
- $handle = $this->handles[$request];
315
- curl_multi_remove_handle($this->multiHandle, $handle->getHandle());
316
- unset($this->handles[$request]);
317
- unset($this->resourceHash[(int) $handle->getHandle()]);
318
- $handle->close();
319
- }
320
- }
321
-
322
- /**
323
- * Check if a cURL transfer resulted in what should be an exception
324
- *
325
- * @param RequestInterface $request Request to check
326
- * @param CurlHandle $handle Curl handle object
327
- * @param array $curl Array returned from curl_multi_info_read
328
- *
329
- * @return CurlException|bool
330
- */
331
- private function isCurlException(RequestInterface $request, CurlHandle $handle, array $curl)
332
- {
333
- if (CURLM_OK == $curl['result'] || CURLM_CALL_MULTI_PERFORM == $curl['result']) {
334
- return false;
335
- }
336
-
337
- $handle->setErrorNo($curl['result']);
338
- $e = new CurlException(sprintf('[curl] %s: %s [url] %s',
339
- $handle->getErrorNo(), $handle->getError(), $handle->getUrl()));
340
- $e->setCurlHandle($handle)
341
- ->setRequest($request)
342
- ->setCurlInfo($handle->getInfo())
343
- ->setError($handle->getError(), $handle->getErrorNo());
344
-
345
- return $e;
346
- }
347
-
348
- /**
349
- * Throw an exception for a cURL multi response if needed
350
- *
351
- * @param int $code Curl response code
352
- * @throws CurlException
353
- */
354
- private function checkCurlResult($code)
355
- {
356
- if ($code != CURLM_OK && $code != CURLM_CALL_MULTI_PERFORM) {
357
- throw new CurlException(isset($this->multiErrors[$code])
358
- ? "cURL error: {$code} ({$this->multiErrors[$code][0]}): cURL message: {$this->multiErrors[$code][1]}"
359
- : 'Unexpected cURL error: ' . $code
360
- );
361
- }
362
- }
363
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- use Guzzle\Common\HasDispatcherInterface;
6
- use Guzzle\Common\Exception\ExceptionCollection;
7
- use Guzzle\Http\Message\RequestInterface;
8
-
9
- /**
10
- * Interface for sending a pool of {@see RequestInterface} objects in parallel
11
- */
12
- interface CurlMultiInterface extends \Countable, HasDispatcherInterface
13
- {
14
- const POLLING_REQUEST = 'curl_multi.polling_request';
15
- const ADD_REQUEST = 'curl_multi.add_request';
16
- const REMOVE_REQUEST = 'curl_multi.remove_request';
17
- const MULTI_EXCEPTION = 'curl_multi.exception';
18
- const BLOCKING = 'curl_multi.blocking';
19
-
20
- /**
21
- * Add a request to the pool.
22
- *
23
- * @param RequestInterface $request Request to add
24
- *
25
- * @return CurlMultiInterface
26
- */
27
- public function add(RequestInterface $request);
28
-
29
- /**
30
- * Get an array of attached {@see RequestInterface} objects
31
- *
32
- * @return array
33
- */
34
- public function all();
35
-
36
- /**
37
- * Remove a request from the pool.
38
- *
39
- * @param RequestInterface $request Request to remove
40
- *
41
- * @return bool Returns true on success or false on failure
42
- */
43
- public function remove(RequestInterface $request);
44
-
45
- /**
46
- * Reset the state and remove any attached RequestInterface objects
47
- *
48
- * @param bool $hard Set to true to close and reopen any open multi handles
49
- */
50
- public function reset($hard = false);
51
-
52
- /**
53
- * Send a pool of {@see RequestInterface} requests.
54
- *
55
- * @throws ExceptionCollection if any requests threw exceptions during the transfer.
56
- */
57
- public function send();
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php DELETED
@@ -1,147 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- use Guzzle\Common\AbstractHasDispatcher;
6
- use Guzzle\Http\Message\RequestInterface;
7
-
8
- /**
9
- * Proxies requests and connections to a pool of internal curl_multi handles. Each recursive call will add requests
10
- * to the next available CurlMulti handle.
11
- */
12
- class CurlMultiProxy extends AbstractHasDispatcher implements CurlMultiInterface
13
- {
14
- protected $handles = array();
15
- protected $groups = array();
16
- protected $queued = array();
17
- protected $maxHandles;
18
-
19
- /**
20
- * @param int $maxHandles The maximum number of idle CurlMulti handles to allow to remain open
21
- */
22
- public function __construct($maxHandles = 3)
23
- {
24
- $this->maxHandles = $maxHandles;
25
- // You can get some weird "Too many open files" errors when sending a large amount of requests in parallel.
26
- // These two statements autoload classes before a system runs out of file descriptors so that you can get back
27
- // valuable error messages if you run out.
28
- class_exists('Guzzle\Http\Message\Response');
29
- class_exists('Guzzle\Http\Exception\CurlException');
30
- }
31
-
32
- public function add(RequestInterface $request)
33
- {
34
- $this->queued[] = $request;
35
-
36
- return $this;
37
- }
38
-
39
- public function all()
40
- {
41
- $requests = $this->queued;
42
- foreach ($this->handles as $handle) {
43
- $requests = array_merge($requests, $handle->all());
44
- }
45
-
46
- return $requests;
47
- }
48
-
49
- public function remove(RequestInterface $request)
50
- {
51
- foreach ($this->queued as $i => $r) {
52
- if ($request === $r) {
53
- unset($this->queued[$i]);
54
- return true;
55
- }
56
- }
57
-
58
- foreach ($this->handles as $handle) {
59
- if ($handle->remove($request)) {
60
- return true;
61
- }
62
- }
63
-
64
- return false;
65
- }
66
-
67
- public function reset($hard = false)
68
- {
69
- $this->queued = array();
70
- $this->groups = array();
71
- foreach ($this->handles as $handle) {
72
- $handle->reset();
73
- }
74
- if ($hard) {
75
- $this->handles = array();
76
- }
77
-
78
- return $this;
79
- }
80
-
81
- public function send()
82
- {
83
- if ($this->queued) {
84
- $group = $this->getAvailableHandle();
85
- // Add this handle to a list of handles than is claimed
86
- $this->groups[] = $group;
87
- while ($request = array_shift($this->queued)) {
88
- $group->add($request);
89
- }
90
- try {
91
- $group->send();
92
- array_pop($this->groups);
93
- $this->cleanupHandles();
94
- } catch (\Exception $e) {
95
- // Remove the group and cleanup if an exception was encountered and no more requests in group
96
- if (!$group->count()) {
97
- array_pop($this->groups);
98
- $this->cleanupHandles();
99
- }
100
- throw $e;
101
- }
102
- }
103
- }
104
-
105
- public function count()
106
- {
107
- return count($this->all());
108
- }
109
-
110
- /**
111
- * Get an existing available CurlMulti handle or create a new one
112
- *
113
- * @return CurlMulti
114
- */
115
- protected function getAvailableHandle()
116
- {
117
- // Grab a handle that is not claimed
118
- foreach ($this->handles as $h) {
119
- if (!in_array($h, $this->groups, true)) {
120
- return $h;
121
- }
122
- }
123
-
124
- // All are claimed, so create one
125
- $handle = new CurlMulti();
126
- $handle->setEventDispatcher($this->getEventDispatcher());
127
- $this->handles[] = $handle;
128
-
129
- return $handle;
130
- }
131
-
132
- /**
133
- * Trims down unused CurlMulti handles to limit the number of open connections
134
- */
135
- protected function cleanupHandles()
136
- {
137
- if ($diff = max(0, count($this->handles) - $this->maxHandles)) {
138
- for ($i = count($this->handles) - 1; $i > 0 && $diff > 0; $i--) {
139
- if (!count($this->handles[$i])) {
140
- unset($this->handles[$i]);
141
- $diff--;
142
- }
143
- }
144
- $this->handles = array_values($this->handles);
145
- }
146
- }
147
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- /**
6
- * Class used for querying curl_version data
7
- */
8
- class CurlVersion
9
- {
10
- /** @var array curl_version() information */
11
- protected $version;
12
-
13
- /** @var CurlVersion */
14
- protected static $instance;
15
-
16
- /** @var string Default user agent */
17
- protected $userAgent;
18
-
19
- /**
20
- * @return CurlVersion
21
- */
22
- public static function getInstance()
23
- {
24
- if (!self::$instance) {
25
- self::$instance = new self();
26
- }
27
-
28
- return self::$instance;
29
- }
30
-
31
- /**
32
- * Get all of the curl_version() data
33
- *
34
- * @return array
35
- */
36
- public function getAll()
37
- {
38
- if (!$this->version) {
39
- $this->version = curl_version();
40
- }
41
-
42
- return $this->version;
43
- }
44
-
45
- /**
46
- * Get a specific type of curl information
47
- *
48
- * @param string $type Version information to retrieve. This value is one of:
49
- * - version_number: cURL 24 bit version number
50
- * - version: cURL version number, as a string
51
- * - ssl_version_number: OpenSSL 24 bit version number
52
- * - ssl_version: OpenSSL version number, as a string
53
- * - libz_version: zlib version number, as a string
54
- * - host: Information about the host where cURL was built
55
- * - features: A bitmask of the CURL_VERSION_XXX constants
56
- * - protocols: An array of protocols names supported by cURL
57
- *
58
- * @return string|float|bool if the $type is found, and false if not found
59
- */
60
- public function get($type)
61
- {
62
- $version = $this->getAll();
63
-
64
- return isset($version[$type]) ? $version[$type] : false;
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php DELETED
@@ -1,147 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Curl;
4
-
5
- use Guzzle\Http\Message\RequestInterface;
6
- use Guzzle\Http\EntityBody;
7
- use Guzzle\Http\Message\Response;
8
-
9
- /**
10
- * Mediator between curl handles and request objects
11
- */
12
- class RequestMediator
13
- {
14
- /** @var RequestInterface */
15
- protected $request;
16
-
17
- /** @var bool Whether or not to emit read/write events */
18
- protected $emitIo;
19
-
20
- /**
21
- * @param RequestInterface $request Request to mediate
22
- * @param bool $emitIo Set to true to dispatch events on input and output
23
- */
24
- public function __construct(RequestInterface $request, $emitIo = false)
25
- {
26
- $this->request = $request;
27
- $this->emitIo = $emitIo;
28
- }
29
-
30
- /**
31
- * Receive a response header from curl
32
- *
33
- * @param resource $curl Curl handle
34
- * @param string $header Received header
35
- *
36
- * @return int
37
- */
38
- public function receiveResponseHeader($curl, $header)
39
- {
40
- static $normalize = array("\r", "\n");
41
- $length = strlen($header);
42
- $header = str_replace($normalize, '', $header);
43
-
44
- if (strpos($header, 'HTTP/') === 0) {
45
-
46
- $startLine = explode(' ', $header, 3);
47
- $code = $startLine[1];
48
- $status = isset($startLine[2]) ? $startLine[2] : '';
49
-
50
- // Only download the body of the response to the specified response
51
- // body when a successful response is received.
52
- if ($code >= 200 && $code < 300) {
53
- $body = $this->request->getResponseBody();
54
- } else {
55
- $body = EntityBody::factory();
56
- }
57
-
58
- $response = new Response($code, null, $body);
59
- $response->setStatus($code, $status);
60
- $this->request->startResponse($response);
61
-
62
- $this->request->dispatch('request.receive.status_line', array(
63
- 'request' => $this,
64
- 'line' => $header,
65
- 'status_code' => $code,
66
- 'reason_phrase' => $status
67
- ));
68
-
69
- } elseif ($pos = strpos($header, ':')) {
70
- $this->request->getResponse()->addHeader(
71
- trim(substr($header, 0, $pos)),
72
- trim(substr($header, $pos + 1))
73
- );
74
- }
75
-
76
- return $length;
77
- }
78
-
79
- /**
80
- * Received a progress notification
81
- *
82
- * @param int $downloadSize Total download size
83
- * @param int $downloaded Amount of bytes downloaded
84
- * @param int $uploadSize Total upload size
85
- * @param int $uploaded Amount of bytes uploaded
86
- * @param resource $handle CurlHandle object
87
- */
88
- public function progress($downloadSize, $downloaded, $uploadSize, $uploaded, $handle = null)
89
- {
90
- $this->request->dispatch('curl.callback.progress', array(
91
- 'request' => $this->request,
92
- 'handle' => $handle,
93
- 'download_size' => $downloadSize,
94
- 'downloaded' => $downloaded,
95
- 'upload_size' => $uploadSize,
96
- 'uploaded' => $uploaded
97
- ));
98
- }
99
-
100
- /**
101
- * Write data to the response body of a request
102
- *
103
- * @param resource $curl Curl handle
104
- * @param string $write Data that was received
105
- *
106
- * @return int
107
- */
108
- public function writeResponseBody($curl, $write)
109
- {
110
- if ($this->emitIo) {
111
- $this->request->dispatch('curl.callback.write', array(
112
- 'request' => $this->request,
113
- 'write' => $write
114
- ));
115
- }
116
-
117
- if ($response = $this->request->getResponse()) {
118
- return $response->getBody()->write($write);
119
- } else {
120
- // Unexpected data received before response headers - abort transfer
121
- return 0;
122
- }
123
- }
124
-
125
- /**
126
- * Read data from the request body and send it to curl
127
- *
128
- * @param resource $ch Curl handle
129
- * @param resource $fd File descriptor
130
- * @param int $length Amount of data to read
131
- *
132
- * @return string
133
- */
134
- public function readRequestBody($ch, $fd, $length)
135
- {
136
- if (!($body = $this->request->getBody())) {
137
- return '';
138
- }
139
-
140
- $read = (string) $body->read($length);
141
- if ($this->emitIo) {
142
- $this->request->dispatch('curl.callback.read', array('request' => $this->request, 'read' => $read));
143
- }
144
-
145
- return $read;
146
- }
147
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBody.php DELETED
@@ -1,201 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Stream\Stream;
7
- use Guzzle\Common\Exception\InvalidArgumentException;
8
- use Guzzle\Http\Mimetypes;
9
-
10
- /**
11
- * Entity body used with an HTTP request or response
12
- */
13
- class EntityBody extends Stream implements EntityBodyInterface
14
- {
15
- /** @var bool Content-Encoding of the entity body if known */
16
- protected $contentEncoding = false;
17
-
18
- /** @var callable Method to invoke for rewinding a stream */
19
- protected $rewindFunction;
20
-
21
- /**
22
- * Create a new EntityBody based on the input type
23
- *
24
- * @param resource|string|EntityBody $resource Entity body data
25
- * @param int $size Size of the data contained in the resource
26
- *
27
- * @return EntityBody
28
- * @throws InvalidArgumentException if the $resource arg is not a resource or string
29
- */
30
- public static function factory($resource = '', $size = null)
31
- {
32
- if ($resource instanceof EntityBodyInterface) {
33
- return $resource;
34
- }
35
-
36
- switch (gettype($resource)) {
37
- case 'string':
38
- return self::fromString($resource);
39
- case 'resource':
40
- return new static($resource, $size);
41
- case 'object':
42
- if (method_exists($resource, '__toString')) {
43
- return self::fromString((string) $resource);
44
- }
45
- break;
46
- case 'array':
47
- return self::fromString(http_build_query($resource));
48
- }
49
-
50
- throw new InvalidArgumentException('Invalid resource type');
51
- }
52
-
53
- public function setRewindFunction($callable)
54
- {
55
- if (!is_callable($callable)) {
56
- throw new InvalidArgumentException('Must specify a callable');
57
- }
58
-
59
- $this->rewindFunction = $callable;
60
-
61
- return $this;
62
- }
63
-
64
- public function rewind()
65
- {
66
- return $this->rewindFunction ? call_user_func($this->rewindFunction, $this) : parent::rewind();
67
- }
68
-
69
- /**
70
- * Create a new EntityBody from a string
71
- *
72
- * @param string $string String of data
73
- *
74
- * @return EntityBody
75
- */
76
- public static function fromString($string)
77
- {
78
- $stream = fopen('php://temp', 'r+');
79
- if ($string !== '') {
80
- fwrite($stream, $string);
81
- rewind($stream);
82
- }
83
-
84
- return new static($stream);
85
- }
86
-
87
- public function compress($filter = 'zlib.deflate')
88
- {
89
- $result = $this->handleCompression($filter);
90
- $this->contentEncoding = $result ? $filter : false;
91
-
92
- return $result;
93
- }
94
-
95
- public function uncompress($filter = 'zlib.inflate')
96
- {
97
- $offsetStart = 0;
98
-
99
- // When inflating gzipped data, the first 10 bytes must be stripped
100
- // if a gzip header is present
101
- if ($filter == 'zlib.inflate') {
102
- // @codeCoverageIgnoreStart
103
- if (!$this->isReadable() || ($this->isConsumed() && !$this->isSeekable())) {
104
- return false;
105
- }
106
- // @codeCoverageIgnoreEnd
107
- if (stream_get_contents($this->stream, 3, 0) === "\x1f\x8b\x08") {
108
- $offsetStart = 10;
109
- }
110
- }
111
-
112
- $this->contentEncoding = false;
113
-
114
- return $this->handleCompression($filter, $offsetStart);
115
- }
116
-
117
- public function getContentLength()
118
- {
119
- return $this->getSize();
120
- }
121
-
122
- public function getContentType()
123
- {
124
- return $this->getUri() ? Mimetypes::getInstance()->fromFilename($this->getUri()) : null;
125
- }
126
-
127
- public function getContentMd5($rawOutput = false, $base64Encode = false)
128
- {
129
- if ($hash = self::getHash($this, 'md5', $rawOutput)) {
130
- return $hash && $base64Encode ? base64_encode($hash) : $hash;
131
- } else {
132
- return false;
133
- }
134
- }
135
-
136
- /**
137
- * Calculate the MD5 hash of an entity body
138
- *
139
- * @param EntityBodyInterface $body Entity body to calculate the hash for
140
- * @param bool $rawOutput Whether or not to use raw output
141
- * @param bool $base64Encode Whether or not to base64 encode raw output (only if raw output is true)
142
- *
143
- * @return bool|string Returns an MD5 string on success or FALSE on failure
144
- * @deprecated This will be deprecated soon
145
- * @codeCoverageIgnore
146
- */
147
- public static function calculateMd5(EntityBodyInterface $body, $rawOutput = false, $base64Encode = false)
148
- {
149
- Version::warn(__CLASS__ . ' is deprecated. Use getContentMd5()');
150
- return $body->getContentMd5($rawOutput, $base64Encode);
151
- }
152
-
153
- public function setStreamFilterContentEncoding($streamFilterContentEncoding)
154
- {
155
- $this->contentEncoding = $streamFilterContentEncoding;
156
-
157
- return $this;
158
- }
159
-
160
- public function getContentEncoding()
161
- {
162
- return strtr($this->contentEncoding, array(
163
- 'zlib.deflate' => 'gzip',
164
- 'bzip2.compress' => 'compress'
165
- )) ?: false;
166
- }
167
-
168
- protected function handleCompression($filter, $offsetStart = 0)
169
- {
170
- // @codeCoverageIgnoreStart
171
- if (!$this->isReadable() || ($this->isConsumed() && !$this->isSeekable())) {
172
- return false;
173
- }
174
- // @codeCoverageIgnoreEnd
175
-
176
- $handle = fopen('php://temp', 'r+');
177
- $filter = @stream_filter_append($handle, $filter, STREAM_FILTER_WRITE);
178
- if (!$filter) {
179
- return false;
180
- }
181
-
182
- // Seek to the offset start if possible
183
- $this->seek($offsetStart);
184
- while ($data = fread($this->stream, 8096)) {
185
- fwrite($handle, $data);
186
- }
187
-
188
- fclose($this->stream);
189
- $this->stream = $handle;
190
- stream_filter_remove($filter);
191
- $stat = fstat($this->stream);
192
- $this->size = $stat['size'];
193
- $this->rebuildCache();
194
- $this->seek(0);
195
-
196
- // Remove any existing rewind function as the underlying stream has been replaced
197
- $this->rewindFunction = null;
198
-
199
- return true;
200
- }
201
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Stream\StreamInterface;
6
-
7
- /**
8
- * Entity body used with an HTTP request or response
9
- */
10
- interface EntityBodyInterface extends StreamInterface
11
- {
12
- /**
13
- * Specify a custom callback used to rewind a non-seekable stream. This can be useful entity enclosing requests
14
- * that are redirected.
15
- *
16
- * @param mixed $callable Callable to invoke to rewind a non-seekable stream. The callback must accept an
17
- * EntityBodyInterface object, perform the rewind if possible, and return a boolean
18
- * representing whether or not the rewind was successful.
19
- * @return self
20
- */
21
- public function setRewindFunction($callable);
22
-
23
- /**
24
- * If the stream is readable, compress the data in the stream using deflate compression. The uncompressed stream is
25
- * then closed, and the compressed stream then becomes the wrapped stream.
26
- *
27
- * @param string $filter Compression filter
28
- *
29
- * @return bool Returns TRUE on success or FALSE on failure
30
- */
31
- public function compress($filter = 'zlib.deflate');
32
-
33
- /**
34
- * Decompress a deflated string. Once uncompressed, the uncompressed string is then used as the wrapped stream.
35
- *
36
- * @param string $filter De-compression filter
37
- *
38
- * @return bool Returns TRUE on success or FALSE on failure
39
- */
40
- public function uncompress($filter = 'zlib.inflate');
41
-
42
- /**
43
- * Get the Content-Length of the entity body if possible (alias of getSize)
44
- *
45
- * @return int|bool Returns the Content-Length or false on failure
46
- */
47
- public function getContentLength();
48
-
49
- /**
50
- * Guess the Content-Type of a local stream
51
- *
52
- * @return string|null
53
- * @see http://www.php.net/manual/en/function.finfo-open.php
54
- */
55
- public function getContentType();
56
-
57
- /**
58
- * Get an MD5 checksum of the stream's contents
59
- *
60
- * @param bool $rawOutput Whether or not to use raw output
61
- * @param bool $base64Encode Whether or not to base64 encode raw output (only if raw output is true)
62
- *
63
- * @return bool|string Returns an MD5 string on success or FALSE on failure
64
- */
65
- public function getContentMd5($rawOutput = false, $base64Encode = false);
66
-
67
- /**
68
- * Get the Content-Encoding of the EntityBody
69
- *
70
- * @return bool|string
71
- */
72
- public function getContentEncoding();
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Http\Message\RequestInterface;
6
- use Guzzle\Http\Message\Response;
7
-
8
- /**
9
- * Http request exception thrown when a bad response is received
10
- */
11
- class BadResponseException extends RequestException
12
- {
13
- /** @var Response */
14
- private $response;
15
-
16
- /**
17
- * Factory method to create a new response exception based on the response code.
18
- *
19
- * @param RequestInterface $request Request
20
- * @param Response $response Response received
21
- *
22
- * @return BadResponseException
23
- */
24
- public static function factory(RequestInterface $request, Response $response)
25
- {
26
- if ($response->isClientError()) {
27
- $label = 'Client error response';
28
- $class = __NAMESPACE__ . '\\ClientErrorResponseException';
29
- } elseif ($response->isServerError()) {
30
- $label = 'Server error response';
31
- $class = __NAMESPACE__ . '\\ServerErrorResponseException';
32
- } else {
33
- $label = 'Unsuccessful response';
34
- $class = __CLASS__;
35
- }
36
-
37
- $message = $label . PHP_EOL . implode(PHP_EOL, array(
38
- '[status code] ' . $response->getStatusCode(),
39
- '[reason phrase] ' . $response->getReasonPhrase(),
40
- '[url] ' . $request->getUrl(),
41
- ));
42
-
43
- $e = new $class($message);
44
- $e->setResponse($response);
45
- $e->setRequest($request);
46
-
47
- return $e;
48
- }
49
-
50
- /**
51
- * Set the response that caused the exception
52
- *
53
- * @param Response $response Response to set
54
- */
55
- public function setResponse(Response $response)
56
- {
57
- $this->response = $response;
58
- }
59
-
60
- /**
61
- * Get the response that caused the exception
62
- *
63
- * @return Response
64
- */
65
- public function getResponse()
66
- {
67
- return $this->response;
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- /**
6
- * Exception when a client error is encountered (4xx codes)
7
- */
8
- class ClientErrorResponseException extends BadResponseException {}
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/CouldNotRewindStreamException.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Common\Exception\RuntimeException;
6
-
7
- class CouldNotRewindStreamException extends RuntimeException implements HttpException {}
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/CurlException.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Http\Curl\CurlHandle;
6
-
7
- /**
8
- * cURL request exception
9
- */
10
- class CurlException extends RequestException
11
- {
12
- private $curlError;
13
- private $curlErrorNo;
14
- private $handle;
15
- private $curlInfo = array();
16
-
17
- /**
18
- * Set the cURL error message
19
- *
20
- * @param string $error Curl error
21
- * @param int $number Curl error number
22
- *
23
- * @return self
24
- */
25
- public function setError($error, $number)
26
- {
27
- $this->curlError = $error;
28
- $this->curlErrorNo = $number;
29
-
30
- return $this;
31
- }
32
-
33
- /**
34
- * Set the associated curl handle
35
- *
36
- * @param CurlHandle $handle Curl handle
37
- *
38
- * @return self
39
- */
40
- public function setCurlHandle(CurlHandle $handle)
41
- {
42
- $this->handle = $handle;
43
-
44
- return $this;
45
- }
46
-
47
- /**
48
- * Get the associated cURL handle
49
- *
50
- * @return CurlHandle|null
51
- */
52
- public function getCurlHandle()
53
- {
54
- return $this->handle;
55
- }
56
-
57
- /**
58
- * Get the associated cURL error message
59
- *
60
- * @return string|null
61
- */
62
- public function getError()
63
- {
64
- return $this->curlError;
65
- }
66
-
67
- /**
68
- * Get the associated cURL error number
69
- *
70
- * @return int|null
71
- */
72
- public function getErrorNo()
73
- {
74
- return $this->curlErrorNo;
75
- }
76
-
77
- /**
78
- * Returns curl information about the transfer
79
- *
80
- * @return array
81
- */
82
- public function getCurlInfo()
83
- {
84
- return $this->curlInfo;
85
- }
86
-
87
- /**
88
- * Set curl transfer information
89
- *
90
- * @param array $info Array of curl transfer information
91
- *
92
- * @return self
93
- * @link http://php.net/manual/en/function.curl-getinfo.php
94
- */
95
- public function setCurlInfo(array $info)
96
- {
97
- $this->curlInfo = $info;
98
-
99
- return $this;
100
- }
101
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Common\Exception\GuzzleException;
6
-
7
- /**
8
- * Http exception interface
9
- */
10
- interface HttpException extends GuzzleException {}
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/MultiTransferException.php DELETED
@@ -1,145 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Common\Exception\ExceptionCollection;
6
- use Guzzle\Http\Message\RequestInterface;
7
-
8
- /**
9
- * Exception encountered during a multi transfer
10
- */
11
- class MultiTransferException extends ExceptionCollection
12
- {
13
- protected $successfulRequests = array();
14
- protected $failedRequests = array();
15
- protected $exceptionForRequest = array();
16
-
17
- /**
18
- * Get all of the requests in the transfer
19
- *
20
- * @return array
21
- */
22
- public function getAllRequests()
23
- {
24
- return array_merge($this->successfulRequests, $this->failedRequests);
25
- }
26
-
27
- /**
28
- * Add to the array of successful requests
29
- *
30
- * @param RequestInterface $request Successful request
31
- *
32
- * @return self
33
- */
34
- public function addSuccessfulRequest(RequestInterface $request)
35
- {
36
- $this->successfulRequests[] = $request;
37
-
38
- return $this;
39
- }
40
-
41
- /**
42
- * Add to the array of failed requests
43
- *
44
- * @param RequestInterface $request Failed request
45
- *
46
- * @return self
47
- */
48
- public function addFailedRequest(RequestInterface $request)
49
- {
50
- $this->failedRequests[] = $request;
51
-
52
- return $this;
53
- }
54
-
55
- /**
56
- * Add to the array of failed requests and associate with exceptions
57
- *
58
- * @param RequestInterface $request Failed request
59
- * @param \Exception $exception Exception to add and associate with
60
- *
61
- * @return self
62
- */
63
- public function addFailedRequestWithException(RequestInterface $request, \Exception $exception)
64
- {
65
- $this->add($exception)
66
- ->addFailedRequest($request)
67
- ->exceptionForRequest[spl_object_hash($request)] = $exception;
68
-
69
- return $this;
70
- }
71
-
72
- /**
73
- * Get the Exception that caused the given $request to fail
74
- *
75
- * @param RequestInterface $request Failed command
76
- *
77
- * @return \Exception|null
78
- */
79
- public function getExceptionForFailedRequest(RequestInterface $request)
80
- {
81
- $oid = spl_object_hash($request);
82
-
83
- return isset($this->exceptionForRequest[$oid]) ? $this->exceptionForRequest[$oid] : null;
84
- }
85
-
86
- /**
87
- * Set all of the successful requests
88
- *
89
- * @param array Array of requests
90
- *
91
- * @return self
92
- */
93
- public function setSuccessfulRequests(array $requests)
94
- {
95
- $this->successfulRequests = $requests;
96
-
97
- return $this;
98
- }
99
-
100
- /**
101
- * Set all of the failed requests
102
- *
103
- * @param array Array of requests
104
- *
105
- * @return self
106
- */
107
- public function setFailedRequests(array $requests)
108
- {
109
- $this->failedRequests = $requests;
110
-
111
- return $this;
112
- }
113
-
114
- /**
115
- * Get an array of successful requests sent in the multi transfer
116
- *
117
- * @return array
118
- */
119
- public function getSuccessfulRequests()
120
- {
121
- return $this->successfulRequests;
122
- }
123
-
124
- /**
125
- * Get an array of failed requests sent in the multi transfer
126
- *
127
- * @return array
128
- */
129
- public function getFailedRequests()
130
- {
131
- return $this->failedRequests;
132
- }
133
-
134
- /**
135
- * Check if the exception object contains a request
136
- *
137
- * @param RequestInterface $request Request to check
138
- *
139
- * @return bool
140
- */
141
- public function containsRequest(RequestInterface $request)
142
- {
143
- return in_array($request, $this->failedRequests, true) || in_array($request, $this->successfulRequests, true);
144
- }
145
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- use Guzzle\Common\Exception\RuntimeException;
6
- use Guzzle\Http\Message\RequestInterface;
7
-
8
- /**
9
- * Http request exception
10
- */
11
- class RequestException extends RuntimeException implements HttpException
12
- {
13
- /** @var RequestInterface */
14
- protected $request;
15
-
16
- /**
17
- * Set the request that caused the exception
18
- *
19
- * @param RequestInterface $request Request to set
20
- *
21
- * @return RequestException
22
- */
23
- public function setRequest(RequestInterface $request)
24
- {
25
- $this->request = $request;
26
-
27
- return $this;
28
- }
29
-
30
- /**
31
- * Get the request that caused the exception
32
- *
33
- * @return RequestInterface
34
- */
35
- public function getRequest()
36
- {
37
- return $this->request;
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- /**
6
- * Exception when a server error is encountered (5xx codes)
7
- */
8
- class ServerErrorResponseException extends BadResponseException {}
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/TooManyRedirectsException.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Exception;
4
-
5
- class TooManyRedirectsException extends BadResponseException {}
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/IoEmittingEntityBody.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Event;
6
- use Guzzle\Common\HasDispatcherInterface;
7
- use Symfony\Component\EventDispatcher\EventDispatcher;
8
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
9
- use Symfony\Component\EventDispatcher\EventDispatcherInterface;
10
-
11
- /**
12
- * EntityBody decorator that emits events for read and write methods
13
- */
14
- class IoEmittingEntityBody extends AbstractEntityBodyDecorator implements HasDispatcherInterface
15
- {
16
- /** @var EventDispatcherInterface */
17
- protected $eventDispatcher;
18
-
19
- public static function getAllEvents()
20
- {
21
- return array('body.read', 'body.write');
22
- }
23
-
24
- /**
25
- * {@inheritdoc}
26
- * @codeCoverageIgnore
27
- */
28
- public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
29
- {
30
- $this->eventDispatcher = $eventDispatcher;
31
-
32
- return $this;
33
- }
34
-
35
- public function getEventDispatcher()
36
- {
37
- if (!$this->eventDispatcher) {
38
- $this->eventDispatcher = new EventDispatcher();
39
- }
40
-
41
- return $this->eventDispatcher;
42
- }
43
-
44
- public function dispatch($eventName, array $context = array())
45
- {
46
- return $this->getEventDispatcher()->dispatch($eventName, new Event($context));
47
- }
48
-
49
- /**
50
- * {@inheritdoc}
51
- * @codeCoverageIgnore
52
- */
53
- public function addSubscriber(EventSubscriberInterface $subscriber)
54
- {
55
- $this->getEventDispatcher()->addSubscriber($subscriber);
56
-
57
- return $this;
58
- }
59
-
60
- public function read($length)
61
- {
62
- $event = array(
63
- 'body' => $this,
64
- 'length' => $length,
65
- 'read' => $this->body->read($length)
66
- );
67
- $this->dispatch('body.read', $event);
68
-
69
- return $event['read'];
70
- }
71
-
72
- public function write($string)
73
- {
74
- $event = array(
75
- 'body' => $this,
76
- 'write' => $string,
77
- 'result' => $this->body->write($string)
78
- );
79
- $this->dispatch('body.write', $event);
80
-
81
- return $event['result'];
82
- }
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Common\Collection;
7
- use Guzzle\Http\Message\Header\HeaderCollection;
8
- use Guzzle\Http\Message\Header\HeaderFactory;
9
- use Guzzle\Http\Message\Header\HeaderFactoryInterface;
10
- use Guzzle\Http\Message\Header\HeaderInterface;
11
-
12
- /**
13
- * Abstract HTTP request/response message
14
- */
15
- abstract class AbstractMessage implements MessageInterface
16
- {
17
- /** @var array HTTP header collection */
18
- protected $headers;
19
-
20
- /** @var HeaderFactoryInterface $headerFactory */
21
- protected $headerFactory;
22
-
23
- /** @var Collection Custom message parameters that are extendable by plugins */
24
- protected $params;
25
-
26
- /** @var string Message protocol */
27
- protected $protocol = 'HTTP';
28
-
29
- /** @var string HTTP protocol version of the message */
30
- protected $protocolVersion = '1.1';
31
-
32
- public function __construct()
33
- {
34
- $this->params = new Collection();
35
- $this->headerFactory = new HeaderFactory();
36
- $this->headers = new HeaderCollection();
37
- }
38
-
39
- /**
40
- * Set the header factory to use to create headers
41
- *
42
- * @param HeaderFactoryInterface $factory
43
- *
44
- * @return self
45
- */
46
- public function setHeaderFactory(HeaderFactoryInterface $factory)
47
- {
48
- $this->headerFactory = $factory;
49
-
50
- return $this;
51
- }
52
-
53
- public function getParams()
54
- {
55
- return $this->params;
56
- }
57
-
58
- public function addHeader($header, $value)
59
- {
60
- if (isset($this->headers[$header])) {
61
- $this->headers[$header]->add($value);
62
- } elseif ($value instanceof HeaderInterface) {
63
- $this->headers[$header] = $value;
64
- } else {
65
- $this->headers[$header] = $this->headerFactory->createHeader($header, $value);
66
- }
67
-
68
- return $this;
69
- }
70
-
71
- public function addHeaders(array $headers)
72
- {
73
- foreach ($headers as $key => $value) {
74
- $this->addHeader($key, $value);
75
- }
76
-
77
- return $this;
78
- }
79
-
80
- public function getHeader($header)
81
- {
82
- return $this->headers[$header];
83
- }
84
-
85
- public function getHeaders()
86
- {
87
- return $this->headers;
88
- }
89
-
90
- public function getHeaderLines()
91
- {
92
- $headers = array();
93
- foreach ($this->headers as $value) {
94
- $headers[] = $value->getName() . ': ' . $value;
95
- }
96
-
97
- return $headers;
98
- }
99
-
100
- public function setHeader($header, $value)
101
- {
102
- unset($this->headers[$header]);
103
- $this->addHeader($header, $value);
104
-
105
- return $this;
106
- }
107
-
108
- public function setHeaders(array $headers)
109
- {
110
- $this->headers->clear();
111
- foreach ($headers as $key => $value) {
112
- $this->addHeader($key, $value);
113
- }
114
-
115
- return $this;
116
- }
117
-
118
- public function hasHeader($header)
119
- {
120
- return isset($this->headers[$header]);
121
- }
122
-
123
- public function removeHeader($header)
124
- {
125
- unset($this->headers[$header]);
126
-
127
- return $this;
128
- }
129
-
130
- /**
131
- * @deprecated Use $message->getHeader()->parseParams()
132
- * @codeCoverageIgnore
133
- */
134
- public function getTokenizedHeader($header, $token = ';')
135
- {
136
- Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader()->parseParams()');
137
- if ($this->hasHeader($header)) {
138
- $data = new Collection();
139
- foreach ($this->getHeader($header)->parseParams() as $values) {
140
- foreach ($values as $key => $value) {
141
- if ($value === '') {
142
- $data->set($data->count(), $key);
143
- } else {
144
- $data->add($key, $value);
145
- }
146
- }
147
- }
148
- return $data;
149
- }
150
- }
151
-
152
- /**
153
- * @deprecated
154
- * @codeCoverageIgnore
155
- */
156
- public function setTokenizedHeader($header, $data, $token = ';')
157
- {
158
- Version::warn(__METHOD__ . ' is deprecated.');
159
- return $this;
160
- }
161
-
162
- /**
163
- * @deprecated
164
- * @codeCoverageIgnore
165
- */
166
- public function getCacheControlDirective($directive)
167
- {
168
- Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->getDirective()');
169
- if (!($header = $this->getHeader('Cache-Control'))) {
170
- return null;
171
- }
172
-
173
- return $header->getDirective($directive);
174
- }
175
-
176
- /**
177
- * @deprecated
178
- * @codeCoverageIgnore
179
- */
180
- public function hasCacheControlDirective($directive)
181
- {
182
- Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->hasDirective()');
183
- if ($header = $this->getHeader('Cache-Control')) {
184
- return $header->hasDirective($directive);
185
- } else {
186
- return false;
187
- }
188
- }
189
-
190
- /**
191
- * @deprecated
192
- * @codeCoverageIgnore
193
- */
194
- public function addCacheControlDirective($directive, $value = true)
195
- {
196
- Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->addDirective()');
197
- if (!($header = $this->getHeader('Cache-Control'))) {
198
- $this->addHeader('Cache-Control', '');
199
- $header = $this->getHeader('Cache-Control');
200
- }
201
-
202
- $header->addDirective($directive, $value);
203
-
204
- return $this;
205
- }
206
-
207
- /**
208
- * @deprecated
209
- * @codeCoverageIgnore
210
- */
211
- public function removeCacheControlDirective($directive)
212
- {
213
- Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->removeDirective()');
214
- if ($header = $this->getHeader('Cache-Control')) {
215
- $header->removeDirective($directive);
216
- }
217
-
218
- return $this;
219
- }
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php DELETED
@@ -1,247 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Http\EntityBody;
6
- use Guzzle\Http\EntityBodyInterface;
7
- use Guzzle\Http\QueryString;
8
- use Guzzle\Http\RedirectPlugin;
9
- use Guzzle\Http\Exception\RequestException;
10
-
11
- /**
12
- * HTTP request that sends an entity-body in the request message (POST, PUT, PATCH, DELETE)
13
- */
14
- class EntityEnclosingRequest extends Request implements EntityEnclosingRequestInterface
15
- {
16
- /** @var int When the size of the body is greater than 1MB, then send Expect: 100-Continue */
17
- protected $expectCutoff = 1048576;
18
-
19
- /** @var EntityBodyInterface $body Body of the request */
20
- protected $body;
21
-
22
- /** @var QueryString POST fields to use in the EntityBody */
23
- protected $postFields;
24
-
25
- /** @var array POST files to send with the request */
26
- protected $postFiles = array();
27
-
28
- public function __construct($method, $url, $headers = array())
29
- {
30
- $this->postFields = new QueryString();
31
- parent::__construct($method, $url, $headers);
32
- }
33
-
34
- /**
35
- * @return string
36
- */
37
- public function __toString()
38
- {
39
- // Only attempt to include the POST data if it's only fields
40
- if (count($this->postFields) && empty($this->postFiles)) {
41
- return parent::__toString() . (string) $this->postFields;
42
- }
43
-
44
- return parent::__toString() . $this->body;
45
- }
46
-
47
- public function setState($state, array $context = array())
48
- {
49
- parent::setState($state, $context);
50
- if ($state == self::STATE_TRANSFER && !$this->body && !count($this->postFields) && !count($this->postFiles)) {
51
- $this->setHeader('Content-Length', 0)->removeHeader('Transfer-Encoding');
52
- }
53
-
54
- return $this->state;
55
- }
56
-
57
- public function setBody($body, $contentType = null)
58
- {
59
- $this->body = EntityBody::factory($body);
60
-
61
- // Auto detect the Content-Type from the path of the request if possible
62
- if ($contentType === null && !$this->hasHeader('Content-Type')) {
63
- $contentType = $this->body->getContentType();
64
- }
65
-
66
- if ($contentType) {
67
- $this->setHeader('Content-Type', $contentType);
68
- }
69
-
70
- // Always add the Expect 100-Continue header if the body cannot be rewound. This helps with redirects.
71
- if (!$this->body->isSeekable() && $this->expectCutoff !== false) {
72
- $this->setHeader('Expect', '100-Continue');
73
- }
74
-
75
- // Set the Content-Length header if it can be determined
76
- $size = $this->body->getContentLength();
77
- if ($size !== null && $size !== false) {
78
- $this->setHeader('Content-Length', $size);
79
- if ($size > $this->expectCutoff) {
80
- $this->setHeader('Expect', '100-Continue');
81
- }
82
- } elseif (!$this->hasHeader('Content-Length')) {
83
- if ('1.1' == $this->protocolVersion) {
84
- $this->setHeader('Transfer-Encoding', 'chunked');
85
- } else {
86
- throw new RequestException(
87
- 'Cannot determine Content-Length and cannot use chunked Transfer-Encoding when using HTTP/1.0'
88
- );
89
- }
90
- }
91
-
92
- return $this;
93
- }
94
-
95
- public function getBody()
96
- {
97
- return $this->body;
98
- }
99
-
100
- /**
101
- * Set the size that the entity body of the request must exceed before adding the Expect: 100-Continue header.
102
- *
103
- * @param int|bool $size Cutoff in bytes. Set to false to never send the expect header (even with non-seekable data)
104
- *
105
- * @return self
106
- */
107
- public function setExpectHeaderCutoff($size)
108
- {
109
- $this->expectCutoff = $size;
110
- if ($size === false || !$this->body) {
111
- $this->removeHeader('Expect');
112
- } elseif ($this->body && $this->body->getSize() && $this->body->getSize() > $size) {
113
- $this->setHeader('Expect', '100-Continue');
114
- }
115
-
116
- return $this;
117
- }
118
-
119
- public function configureRedirects($strict = false, $maxRedirects = 5)
120
- {
121
- $this->getParams()->set(RedirectPlugin::STRICT_REDIRECTS, $strict);
122
- if ($maxRedirects == 0) {
123
- $this->getParams()->set(RedirectPlugin::DISABLE, true);
124
- } else {
125
- $this->getParams()->set(RedirectPlugin::MAX_REDIRECTS, $maxRedirects);
126
- }
127
-
128
- return $this;
129
- }
130
-
131
- public function getPostField($field)
132
- {
133
- return $this->postFields->get($field);
134
- }
135
-
136
- public function getPostFields()
137
- {
138
- return $this->postFields;
139
- }
140
-
141
- public function setPostField($key, $value)
142
- {
143
- $this->postFields->set($key, $value);
144
- $this->processPostFields();
145
-
146
- return $this;
147
- }
148
-
149
- public function addPostFields($fields)
150
- {
151
- $this->postFields->merge($fields);
152
- $this->processPostFields();
153
-
154
- return $this;
155
- }
156
-
157
- public function removePostField($field)
158
- {
159
- $this->postFields->remove($field);
160
- $this->processPostFields();
161
-
162
- return $this;
163
- }
164
-
165
- public function getPostFiles()
166
- {
167
- return $this->postFiles;
168
- }
169
-
170
- public function getPostFile($fieldName)
171
- {
172
- return isset($this->postFiles[$fieldName]) ? $this->postFiles[$fieldName] : null;
173
- }
174
-
175
- public function removePostFile($fieldName)
176
- {
177
- unset($this->postFiles[$fieldName]);
178
- $this->processPostFields();
179
-
180
- return $this;
181
- }
182
-
183
- public function addPostFile($field, $filename = null, $contentType = null, $postname = null)
184
- {
185
- $data = null;
186
-
187
- if ($field instanceof PostFileInterface) {
188
- $data = $field;
189
- } elseif (is_array($filename)) {
190
- // Allow multiple values to be set in a single key
191
- foreach ($filename as $file) {
192
- $this->addPostFile($field, $file, $contentType);
193
- }
194
- return $this;
195
- } elseif (!is_string($filename)) {
196
- throw new RequestException('The path to a file must be a string');
197
- } elseif (!empty($filename)) {
198
- // Adding an empty file will cause cURL to error out
199
- $data = new PostFile($field, $filename, $contentType, $postname);
200
- }
201
-
202
- if ($data) {
203
- if (!isset($this->postFiles[$data->getFieldName()])) {
204
- $this->postFiles[$data->getFieldName()] = array($data);
205
- } else {
206
- $this->postFiles[$data->getFieldName()][] = $data;
207
- }
208
- $this->processPostFields();
209
- }
210
-
211
- return $this;
212
- }
213
-
214
- public function addPostFiles(array $files)
215
- {
216
- foreach ($files as $key => $file) {
217
- if ($file instanceof PostFileInterface) {
218
- $this->addPostFile($file, null, null, false);
219
- } elseif (is_string($file)) {
220
- // Convert non-associative array keys into 'file'
221
- if (is_numeric($key)) {
222
- $key = 'file';
223
- }
224
- $this->addPostFile($key, $file, null, false);
225
- } else {
226
- throw new RequestException('File must be a string or instance of PostFileInterface');
227
- }
228
- }
229
-
230
- return $this;
231
- }
232
-
233
- /**
234
- * Determine what type of request should be sent based on post fields
235
- */
236
- protected function processPostFields()
237
- {
238
- if (!$this->postFiles) {
239
- $this->removeHeader('Expect')->setHeader('Content-Type', self::URL_ENCODED);
240
- } else {
241
- $this->setHeader('Content-Type', self::MULTIPART);
242
- if ($this->expectCutoff !== false) {
243
- $this->setHeader('Expect', '100-Continue');
244
- }
245
- }
246
- }
247
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php DELETED
@@ -1,137 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Http\Exception\RequestException;
6
- use Guzzle\Http\EntityBodyInterface;
7
- use Guzzle\Http\QueryString;
8
-
9
- /**
10
- * HTTP request that sends an entity-body in the request message (POST, PUT)
11
- */
12
- interface EntityEnclosingRequestInterface extends RequestInterface
13
- {
14
- const URL_ENCODED = 'application/x-www-form-urlencoded; charset=utf-8';
15
- const MULTIPART = 'multipart/form-data';
16
-
17
- /**
18
- * Set the body of the request
19
- *
20
- * @param string|resource|EntityBodyInterface $body Body to use in the entity body of the request
21
- * @param string $contentType Content-Type to set. Leave null to use an existing
22
- * Content-Type or to guess the Content-Type
23
- * @return self
24
- * @throws RequestException if the protocol is < 1.1 and Content-Length can not be determined
25
- */
26
- public function setBody($body, $contentType = null);
27
-
28
- /**
29
- * Get the body of the request if set
30
- *
31
- * @return EntityBodyInterface|null
32
- */
33
- public function getBody();
34
-
35
- /**
36
- * Get a POST field from the request
37
- *
38
- * @param string $field Field to retrieve
39
- *
40
- * @return mixed|null
41
- */
42
- public function getPostField($field);
43
-
44
- /**
45
- * Get the post fields that will be used in the request
46
- *
47
- * @return QueryString
48
- */
49
- public function getPostFields();
50
-
51
- /**
52
- * Set a POST field value
53
- *
54
- * @param string $key Key to set
55
- * @param string $value Value to set
56
- *
57
- * @return self
58
- */
59
- public function setPostField($key, $value);
60
-
61
- /**
62
- * Add POST fields to use in the request
63
- *
64
- * @param QueryString|array $fields POST fields
65
- *
66
- * @return self
67
- */
68
- public function addPostFields($fields);
69
-
70
- /**
71
- * Remove a POST field or file by name
72
- *
73
- * @param string $field Name of the POST field or file to remove
74
- *
75
- * @return self
76
- */
77
- public function removePostField($field);
78
-
79
- /**
80
- * Returns an associative array of POST field names to PostFileInterface objects
81
- *
82
- * @return array
83
- */
84
- public function getPostFiles();
85
-
86
- /**
87
- * Get a POST file from the request
88
- *
89
- * @param string $fieldName POST fields to retrieve
90
- *
91
- * @return array|null Returns an array wrapping an array of PostFileInterface objects
92
- */
93
- public function getPostFile($fieldName);
94
-
95
- /**
96
- * Remove a POST file from the request
97
- *
98
- * @param string $fieldName POST file field name to remove
99
- *
100
- * @return self
101
- */
102
- public function removePostFile($fieldName);
103
-
104
- /**
105
- * Add a POST file to the upload
106
- *
107
- * @param string $field POST field to use (e.g. file). Used to reference content from the server.
108
- * @param string $filename Full path to the file. Do not include the @ symbol.
109
- * @param string $contentType Optional Content-Type to add to the Content-Disposition.
110
- * Default behavior is to guess. Set to false to not specify.
111
- * @param string $postname The name of the file, when posted. (e.g. rename the file)
112
- * @return self
113
- */
114
- public function addPostFile($field, $filename = null, $contentType = null, $postname = null);
115
-
116
- /**
117
- * Add POST files to use in the upload
118
- *
119
- * @param array $files An array of POST fields => filenames where filename can be a string or PostFileInterface
120
- *
121
- * @return self
122
- */
123
- public function addPostFiles(array $files);
124
-
125
- /**
126
- * Configure how redirects are handled for the request
127
- *
128
- * @param bool $strict Set to true to follow strict RFC compliance when redirecting POST requests. Most
129
- * browsers with follow a 301-302 redirect for a POST request with a GET request. This is
130
- * the default behavior of Guzzle. Enable strict redirects to redirect these responses
131
- * with a POST rather than a GET request.
132
- * @param int $maxRedirects Specify the maximum number of allowed redirects. Set to 0 to disable redirects.
133
- *
134
- * @return self
135
- */
136
- public function configureRedirects($strict = false, $maxRedirects = 5);
137
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header.php DELETED
@@ -1,182 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Http\Message\Header\HeaderInterface;
7
-
8
- /**
9
- * Represents a header and all of the values stored by that header
10
- */
11
- class Header implements HeaderInterface
12
- {
13
- protected $values = array();
14
- protected $header;
15
- protected $glue;
16
-
17
- /**
18
- * @param string $header Name of the header
19
- * @param array|string $values Values of the header as an array or a scalar
20
- * @param string $glue Glue used to combine multiple values into a string
21
- */
22
- public function __construct($header, $values = array(), $glue = ',')
23
- {
24
- $this->header = trim($header);
25
- $this->glue = $glue;
26
-
27
- foreach ((array) $values as $value) {
28
- foreach ((array) $value as $v) {
29
- $this->values[] = $v;
30
- }
31
- }
32
- }
33
-
34
- public function __toString()
35
- {
36
- return implode($this->glue . ' ', $this->toArray());
37
- }
38
-
39
- public function add($value)
40
- {
41
- $this->values[] = $value;
42
-
43
- return $this;
44
- }
45
-
46
- public function getName()
47
- {
48
- return $this->header;
49
- }
50
-
51
- public function setName($name)
52
- {
53
- $this->header = $name;
54
-
55
- return $this;
56
- }
57
-
58
- public function setGlue($glue)
59
- {
60
- $this->glue = $glue;
61
-
62
- return $this;
63
- }
64
-
65
- public function getGlue()
66
- {
67
- return $this->glue;
68
- }
69
-
70
- /**
71
- * Normalize the header to be a single header with an array of values.
72
- *
73
- * If any values of the header contains the glue string value (e.g. ","), then the value will be exploded into
74
- * multiple entries in the header.
75
- *
76
- * @return self
77
- */
78
- public function normalize()
79
- {
80
- $values = $this->toArray();
81
-
82
- for ($i = 0, $total = count($values); $i < $total; $i++) {
83
- if (strpos($values[$i], $this->glue) !== false) {
84
- // Explode on glue when the glue is not inside of a comma
85
- foreach (preg_split('/' . preg_quote($this->glue) . '(?=([^"]*"[^"]*")*[^"]*$)/', $values[$i]) as $v) {
86
- $values[] = trim($v);
87
- }
88
- unset($values[$i]);
89
- }
90
- }
91
-
92
- $this->values = array_values($values);
93
-
94
- return $this;
95
- }
96
-
97
- public function hasValue($searchValue)
98
- {
99
- return in_array($searchValue, $this->toArray());
100
- }
101
-
102
- public function removeValue($searchValue)
103
- {
104
- $this->values = array_values(array_filter($this->values, function ($value) use ($searchValue) {
105
- return $value != $searchValue;
106
- }));
107
-
108
- return $this;
109
- }
110
-
111
- public function toArray()
112
- {
113
- return $this->values;
114
- }
115
-
116
- public function count()
117
- {
118
- return count($this->toArray());
119
- }
120
-
121
- public function getIterator()
122
- {
123
- return new \ArrayIterator($this->toArray());
124
- }
125
-
126
- public function parseParams()
127
- {
128
- $params = $matches = array();
129
- $callback = array($this, 'trimHeader');
130
-
131
- // Normalize the header into a single array and iterate over all values
132
- foreach ($this->normalize()->toArray() as $val) {
133
- $part = array();
134
- foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
135
- if (!preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
136
- continue;
137
- }
138
- $pieces = array_map($callback, $matches[0]);
139
- $part[$pieces[0]] = isset($pieces[1]) ? $pieces[1] : '';
140
- }
141
- if ($part) {
142
- $params[] = $part;
143
- }
144
- }
145
-
146
- return $params;
147
- }
148
-
149
- /**
150
- * @deprecated
151
- * @codeCoverageIgnore
152
- */
153
- public function hasExactHeader($header)
154
- {
155
- Version::warn(__METHOD__ . ' is deprecated');
156
- return $this->header == $header;
157
- }
158
-
159
- /**
160
- * @deprecated
161
- * @codeCoverageIgnore
162
- */
163
- public function raw()
164
- {
165
- Version::warn(__METHOD__ . ' is deprecated. Use toArray()');
166
- return $this->toArray();
167
- }
168
-
169
- /**
170
- * Trim a header by removing excess spaces and wrapping quotes
171
- *
172
- * @param $str
173
- *
174
- * @return string
175
- */
176
- protected function trimHeader($str)
177
- {
178
- static $trimmed = "\"' \n\t";
179
-
180
- return trim($str, $trimmed);
181
- }
182
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php DELETED
@@ -1,121 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- use Guzzle\Http\Message\Header;
6
-
7
- /**
8
- * Provides helpful functionality for Cache-Control headers
9
- */
10
- class CacheControl extends Header
11
- {
12
- /** @var array */
13
- protected $directives;
14
-
15
- public function add($value)
16
- {
17
- parent::add($value);
18
- $this->directives = null;
19
- }
20
-
21
- public function removeValue($searchValue)
22
- {
23
- parent::removeValue($searchValue);
24
- $this->directives = null;
25
- }
26
-
27
- /**
28
- * Check if a specific cache control directive exists
29
- *
30
- * @param string $param Directive to retrieve
31
- *
32
- * @return bool
33
- */
34
- public function hasDirective($param)
35
- {
36
- $directives = $this->getDirectives();
37
-
38
- return isset($directives[$param]);
39
- }
40
-
41
- /**
42
- * Get a specific cache control directive
43
- *
44
- * @param string $param Directive to retrieve
45
- *
46
- * @return string|bool|null
47
- */
48
- public function getDirective($param)
49
- {
50
- $directives = $this->getDirectives();
51
-
52
- return isset($directives[$param]) ? $directives[$param] : null;
53
- }
54
-
55
- /**
56
- * Add a cache control directive
57
- *
58
- * @param string $param Directive to add
59
- * @param string $value Value to set
60
- *
61
- * @return self
62
- */
63
- public function addDirective($param, $value)
64
- {
65
- $directives = $this->getDirectives();
66
- $directives[$param] = $value;
67
- $this->updateFromDirectives($directives);
68
-
69
- return $this;
70
- }
71
-
72
- /**
73
- * Remove a cache control directive by name
74
- *
75
- * @param string $param Directive to remove
76
- *
77
- * @return self
78
- */
79
- public function removeDirective($param)
80
- {
81
- $directives = $this->getDirectives();
82
- unset($directives[$param]);
83
- $this->updateFromDirectives($directives);
84
-
85
- return $this;
86
- }
87
-
88
- /**
89
- * Get an associative array of cache control directives
90
- *
91
- * @return array
92
- */
93
- public function getDirectives()
94
- {
95
- if ($this->directives === null) {
96
- $this->directives = array();
97
- foreach ($this->parseParams() as $collection) {
98
- foreach ($collection as $key => $value) {
99
- $this->directives[$key] = $value === '' ? true : $value;
100
- }
101
- }
102
- }
103
-
104
- return $this->directives;
105
- }
106
-
107
- /**
108
- * Updates the header value based on the parsed directives
109
- *
110
- * @param array $directives Array of cache control directives
111
- */
112
- protected function updateFromDirectives(array $directives)
113
- {
114
- $this->directives = $directives;
115
- $this->values = array();
116
-
117
- foreach ($directives as $key => $value) {
118
- $this->values[] = $value === true ? $key : "{$key}={$value}";
119
- }
120
- }
121
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php DELETED
@@ -1,108 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- use Guzzle\Common\ToArrayInterface;
6
-
7
- /**
8
- * Provides a case-insensitive collection of headers
9
- */
10
- class HeaderCollection implements \IteratorAggregate, \Countable, \ArrayAccess, ToArrayInterface
11
- {
12
- /** @var array */
13
- protected $headers;
14
-
15
- public function __construct($headers = array())
16
- {
17
- $this->headers = $headers;
18
- }
19
-
20
- public function __clone()
21
- {
22
- foreach ($this->headers as &$header) {
23
- $header = clone $header;
24
- }
25
- }
26
-
27
- /**
28
- * Clears the header collection
29
- */
30
- public function clear()
31
- {
32
- $this->headers = array();
33
- }
34
-
35
- /**
36
- * Set a header on the collection
37
- *
38
- * @param HeaderInterface $header Header to add
39
- *
40
- * @return self
41
- */
42
- public function add(HeaderInterface $header)
43
- {
44
- $this->headers[strtolower($header->getName())] = $header;
45
-
46
- return $this;
47
- }
48
-
49
- /**
50
- * Get an array of header objects
51
- *
52
- * @return array
53
- */
54
- public function getAll()
55
- {
56
- return $this->headers;
57
- }
58
-
59
- /**
60
- * Alias of offsetGet
61
- */
62
- public function get($key)
63
- {
64
- return $this->offsetGet($key);
65
- }
66
-
67
- public function count()
68
- {
69
- return count($this->headers);
70
- }
71
-
72
- public function offsetExists($offset)
73
- {
74
- return isset($this->headers[strtolower($offset)]);
75
- }
76
-
77
- public function offsetGet($offset)
78
- {
79
- $l = strtolower($offset);
80
-
81
- return isset($this->headers[$l]) ? $this->headers[$l] : null;
82
- }
83
-
84
- public function offsetSet($offset, $value)
85
- {
86
- $this->add($value);
87
- }
88
-
89
- public function offsetUnset($offset)
90
- {
91
- unset($this->headers[strtolower($offset)]);
92
- }
93
-
94
- public function getIterator()
95
- {
96
- return new \ArrayIterator($this->headers);
97
- }
98
-
99
- public function toArray()
100
- {
101
- $result = array();
102
- foreach ($this->headers as $header) {
103
- $result[$header->getName()] = $header->toArray();
104
- }
105
-
106
- return $result;
107
- }
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- use Guzzle\Http\Message\Header;
6
-
7
- /**
8
- * Default header factory implementation
9
- */
10
- class HeaderFactory implements HeaderFactoryInterface
11
- {
12
- /** @var array */
13
- protected $mapping = array(
14
- 'cache-control' => 'Guzzle\Http\Message\Header\CacheControl',
15
- 'link' => 'Guzzle\Http\Message\Header\Link',
16
- );
17
-
18
- public function createHeader($header, $value = null)
19
- {
20
- $lowercase = strtolower($header);
21
-
22
- return isset($this->mapping[$lowercase])
23
- ? new $this->mapping[$lowercase]($header, $value)
24
- : new Header($header, $value);
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- /**
6
- * Interface for creating headers
7
- */
8
- interface HeaderFactoryInterface
9
- {
10
- /**
11
- * Create a header from a header name and a single value
12
- *
13
- * @param string $header Name of the header to create
14
- * @param string $value Value to set on the header
15
- *
16
- * @return HeaderInterface
17
- */
18
- public function createHeader($header, $value = null);
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderInterface.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- use Guzzle\Common\ToArrayInterface;
6
-
7
- interface HeaderInterface extends ToArrayInterface, \Countable, \IteratorAggregate
8
- {
9
- /**
10
- * Convert the header to a string
11
- *
12
- * @return string
13
- */
14
- public function __toString();
15
-
16
- /**
17
- * Add a value to the list of header values
18
- *
19
- * @param string $value Value to add to the header
20
- *
21
- * @return self
22
- */
23
- public function add($value);
24
-
25
- /**
26
- * Get the name of the header
27
- *
28
- * @return string
29
- */
30
- public function getName();
31
-
32
- /**
33
- * Change the name of the header
34
- *
35
- * @param string $name Name to change to
36
- *
37
- * @return self
38
- */
39
- public function setName($name);
40
-
41
- /**
42
- * Change the glue used to implode the values
43
- *
44
- * @param string $glue Glue used to implode multiple values
45
- *
46
- * @return self
47
- */
48
- public function setGlue($glue);
49
-
50
- /**
51
- * Get the glue used to implode multiple values into a string
52
- *
53
- * @return string
54
- */
55
- public function getGlue();
56
-
57
- /**
58
- * Check if the collection of headers has a particular value
59
- *
60
- * @param string $searchValue Value to search for
61
- *
62
- * @return bool
63
- */
64
- public function hasValue($searchValue);
65
-
66
- /**
67
- * Remove a specific value from the header
68
- *
69
- * @param string $searchValue Value to remove
70
- *
71
- * @return self
72
- */
73
- public function removeValue($searchValue);
74
-
75
- /**
76
- * Parse a header containing ";" separated data into an array of associative arrays representing the header
77
- * key value pair data of the header. When a parameter does not contain a value, but just contains a key, this
78
- * function will inject a key with a '' string value.
79
- *
80
- * @return array
81
- */
82
- public function parseParams();
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Header/Link.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message\Header;
4
-
5
- use Guzzle\Http\Message\Header;
6
-
7
- /**
8
- * Provides helpful functionality for link headers
9
- */
10
- class Link extends Header
11
- {
12
- /**
13
- * Add a link to the header
14
- *
15
- * @param string $url Link URL
16
- * @param string $rel Link rel
17
- * @param array $params Other link parameters
18
- *
19
- * @return self
20
- */
21
- public function addLink($url, $rel, array $params = array())
22
- {
23
- $values = array("<{$url}>", "rel=\"{$rel}\"");
24
-
25
- foreach ($params as $k => $v) {
26
- $values[] = "{$k}=\"{$v}\"";
27
- }
28
-
29
- return $this->add(implode('; ', $values));
30
- }
31
-
32
- /**
33
- * Check if a specific link exists for a given rel attribute
34
- *
35
- * @param string $rel rel value
36
- *
37
- * @return bool
38
- */
39
- public function hasLink($rel)
40
- {
41
- return $this->getLink($rel) !== null;
42
- }
43
-
44
- /**
45
- * Get a specific link for a given rel attribute
46
- *
47
- * @param string $rel Rel value
48
- *
49
- * @return array|null
50
- */
51
- public function getLink($rel)
52
- {
53
- foreach ($this->getLinks() as $link) {
54
- if (isset($link['rel']) && $link['rel'] == $rel) {
55
- return $link;
56
- }
57
- }
58
-
59
- return null;
60
- }
61
-
62
- /**
63
- * Get an associative array of links
64
- *
65
- * For example:
66
- * Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg", <http://.../back.jpeg>; rel=back; type="image/jpeg"
67
- *
68
- * <code>
69
- * var_export($response->getLinks());
70
- * array(
71
- * array(
72
- * 'url' => 'http:/.../front.jpeg',
73
- * 'rel' => 'back',
74
- * 'type' => 'image/jpeg',
75
- * )
76
- * )
77
- * </code>
78
- *
79
- * @return array
80
- */
81
- public function getLinks()
82
- {
83
- $links = $this->parseParams();
84
-
85
- foreach ($links as &$link) {
86
- $key = key($link);
87
- unset($link[$key]);
88
- $link['url'] = trim($key, '<> ');
89
- }
90
-
91
- return $links;
92
- }
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- /**
6
- * Request and response message interface
7
- */
8
- interface MessageInterface
9
- {
10
- /**
11
- * Get application and plugin specific parameters set on the message.
12
- *
13
- * @return \Guzzle\Common\Collection
14
- */
15
- public function getParams();
16
-
17
- /**
18
- * Add a header to an existing collection of headers.
19
- *
20
- * @param string $header Header name to add
21
- * @param string $value Value of the header
22
- *
23
- * @return self
24
- */
25
- public function addHeader($header, $value);
26
-
27
- /**
28
- * Add and merge in an array of HTTP headers.
29
- *
30
- * @param array $headers Associative array of header data.
31
- *
32
- * @return self
33
- */
34
- public function addHeaders(array $headers);
35
-
36
- /**
37
- * Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.
38
- *
39
- * @param string $header Header to retrieve.
40
- *
41
- * @return Header|null
42
- */
43
- public function getHeader($header);
44
-
45
- /**
46
- * Get all headers as a collection
47
- *
48
- * @return \Guzzle\Http\Message\Header\HeaderCollection
49
- */
50
- public function getHeaders();
51
-
52
- /**
53
- * Check if the specified header is present.
54
- *
55
- * @param string $header The header to check.
56
- *
57
- * @return bool
58
- */
59
- public function hasHeader($header);
60
-
61
- /**
62
- * Remove a specific HTTP header.
63
- *
64
- * @param string $header HTTP header to remove.
65
- *
66
- * @return self
67
- */
68
- public function removeHeader($header);
69
-
70
- /**
71
- * Set an HTTP header and overwrite any existing value for the header
72
- *
73
- * @param string $header Name of the header to set.
74
- * @param mixed $value Value to set.
75
- *
76
- * @return self
77
- */
78
- public function setHeader($header, $value);
79
-
80
- /**
81
- * Overwrite all HTTP headers with the supplied array of headers
82
- *
83
- * @param array $headers Associative array of header data.
84
- *
85
- * @return self
86
- */
87
- public function setHeaders(array $headers);
88
-
89
- /**
90
- * Get an array of message header lines (e.g. ["Host: example.com", ...])
91
- *
92
- * @return array
93
- */
94
- public function getHeaderLines();
95
-
96
- /**
97
- * Get the raw message headers as a string
98
- *
99
- * @return string
100
- */
101
- public function getRawHeaders();
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFile.php DELETED
@@ -1,124 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Common\Exception\InvalidArgumentException;
7
- use Guzzle\Http\Mimetypes;
8
-
9
- /**
10
- * POST file upload
11
- */
12
- class PostFile implements PostFileInterface
13
- {
14
- protected $fieldName;
15
- protected $contentType;
16
- protected $filename;
17
- protected $postname;
18
-
19
- /**
20
- * @param string $fieldName Name of the field
21
- * @param string $filename Local path to the file
22
- * @param string $postname Remote post file name
23
- * @param string $contentType Content-Type of the upload
24
- */
25
- public function __construct($fieldName, $filename, $contentType = null, $postname = null)
26
- {
27
- $this->fieldName = $fieldName;
28
- $this->setFilename($filename);
29
- $this->postname = $postname ? $postname : basename($filename);
30
- $this->contentType = $contentType ?: $this->guessContentType();
31
- }
32
-
33
- public function setFieldName($name)
34
- {
35
- $this->fieldName = $name;
36
-
37
- return $this;
38
- }
39
-
40
- public function getFieldName()
41
- {
42
- return $this->fieldName;
43
- }
44
-
45
- public function setFilename($filename)
46
- {
47
- // Remove leading @ symbol
48
- if (strpos($filename, '@') === 0) {
49
- $filename = substr($filename, 1);
50
- }
51
-
52
- if (!is_readable($filename)) {
53
- throw new InvalidArgumentException("Unable to open {$filename} for reading");
54
- }
55
-
56
- $this->filename = $filename;
57
-
58
- return $this;
59
- }
60
-
61
- public function setPostname($postname)
62
- {
63
- $this->postname = $postname;
64
-
65
- return $this;
66
- }
67
-
68
- public function getFilename()
69
- {
70
- return $this->filename;
71
- }
72
-
73
- public function getPostname()
74
- {
75
- return $this->postname;
76
- }
77
-
78
- public function setContentType($type)
79
- {
80
- $this->contentType = $type;
81
-
82
- return $this;
83
- }
84
-
85
- public function getContentType()
86
- {
87
- return $this->contentType;
88
- }
89
-
90
- public function getCurlValue()
91
- {
92
- // PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
93
- // See: https://wiki.php.net/rfc/curl-file-upload
94
- if (function_exists('curl_file_create')) {
95
- return curl_file_create($this->filename, $this->contentType, $this->postname);
96
- }
97
-
98
- // Use the old style if using an older version of PHP
99
- $value = "@{$this->filename};filename=" . $this->postname;
100
- if ($this->contentType) {
101
- $value .= ';type=' . $this->contentType;
102
- }
103
-
104
- return $value;
105
- }
106
-
107
- /**
108
- * @deprecated
109
- * @codeCoverageIgnore
110
- */
111
- public function getCurlString()
112
- {
113
- Version::warn(__METHOD__ . ' is deprecated. Use getCurlValue()');
114
- return $this->getCurlValue();
115
- }
116
-
117
- /**
118
- * Determine the Content-Type of the file
119
- */
120
- protected function guessContentType()
121
- {
122
- return Mimetypes::getInstance()->fromFilename($this->filename) ?: 'application/octet-stream';
123
- }
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Exception\InvalidArgumentException;
6
-
7
- /**
8
- * POST file upload
9
- */
10
- interface PostFileInterface
11
- {
12
- /**
13
- * Set the name of the field
14
- *
15
- * @param string $name Field name
16
- *
17
- * @return self
18
- */
19
- public function setFieldName($name);
20
-
21
- /**
22
- * Get the name of the field
23
- *
24
- * @return string
25
- */
26
- public function getFieldName();
27
-
28
- /**
29
- * Set the path to the file
30
- *
31
- * @param string $path Full path to the file
32
- *
33
- * @return self
34
- * @throws InvalidArgumentException if the file cannot be read
35
- */
36
- public function setFilename($path);
37
-
38
- /**
39
- * Set the post name of the file
40
- *
41
- * @param string $name The new name of the file
42
- *
43
- * @return self
44
- */
45
- public function setPostname($name);
46
-
47
- /**
48
- * Get the full path to the file
49
- *
50
- * @return string
51
- */
52
- public function getFilename();
53
-
54
- /**
55
- * Get the post name of the file
56
- *
57
- * @return string
58
- */
59
- public function getPostname();
60
-
61
- /**
62
- * Set the Content-Type of the file
63
- *
64
- * @param string $type Content type
65
- *
66
- * @return self
67
- */
68
- public function setContentType($type);
69
-
70
- /**
71
- * Get the Content-Type of the file
72
- *
73
- * @return string
74
- */
75
- public function getContentType();
76
-
77
- /**
78
- * Get a cURL ready string or CurlFile object for the upload
79
- *
80
- * @return string
81
- */
82
- public function getCurlValue();
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php DELETED
@@ -1,638 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Common\Event;
7
- use Guzzle\Common\Collection;
8
- use Guzzle\Common\Exception\RuntimeException;
9
- use Guzzle\Common\Exception\InvalidArgumentException;
10
- use Guzzle\Http\Exception\RequestException;
11
- use Guzzle\Http\Exception\BadResponseException;
12
- use Guzzle\Http\ClientInterface;
13
- use Guzzle\Http\EntityBody;
14
- use Guzzle\Http\EntityBodyInterface;
15
- use Guzzle\Http\Message\Header\HeaderInterface;
16
- use Guzzle\Http\Url;
17
- use Guzzle\Parser\ParserRegistry;
18
- use Symfony\Component\EventDispatcher\EventDispatcherInterface;
19
- use Symfony\Component\EventDispatcher\EventDispatcher;
20
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
21
-
22
- /**
23
- * HTTP request class to send requests
24
- */
25
- class Request extends AbstractMessage implements RequestInterface
26
- {
27
- /** @var EventDispatcherInterface */
28
- protected $eventDispatcher;
29
-
30
- /** @var Url HTTP Url */
31
- protected $url;
32
-
33
- /** @var string HTTP method (GET, PUT, POST, DELETE, HEAD, OPTIONS, TRACE) */
34
- protected $method;
35
-
36
- /** @var ClientInterface */
37
- protected $client;
38
-
39
- /** @var Response Response of the request */
40
- protected $response;
41
-
42
- /** @var EntityBodyInterface Response body */
43
- protected $responseBody;
44
-
45
- /** @var string State of the request object */
46
- protected $state;
47
-
48
- /** @var string Authentication username */
49
- protected $username;
50
-
51
- /** @var string Auth password */
52
- protected $password;
53
-
54
- /** @var Collection cURL specific transfer options */
55
- protected $curlOptions;
56
-
57
- /** @var bool */
58
- protected $isRedirect = false;
59
-
60
- public static function getAllEvents()
61
- {
62
- return array(
63
- // Called when receiving or uploading data through cURL
64
- 'curl.callback.read', 'curl.callback.write', 'curl.callback.progress',
65
- // Cloning a request
66
- 'request.clone',
67
- // About to send the request, sent request, completed transaction
68
- 'request.before_send', 'request.sent', 'request.complete',
69
- // A request received a successful response
70
- 'request.success',
71
- // A request received an unsuccessful response
72
- 'request.error',
73
- // An exception is being thrown because of an unsuccessful response
74
- 'request.exception',
75
- // Received response status line
76
- 'request.receive.status_line'
77
- );
78
- }
79
-
80
- /**
81
- * @param string $method HTTP method
82
- * @param string|Url $url HTTP URL to connect to. The URI scheme, host header, and URI are parsed from the
83
- * full URL. If query string parameters are present they will be parsed as well.
84
- * @param array|Collection $headers HTTP headers
85
- */
86
- public function __construct($method, $url, $headers = array())
87
- {
88
- parent::__construct();
89
- $this->method = strtoupper($method);
90
- $this->curlOptions = new Collection();
91
- $this->setUrl($url);
92
-
93
- if ($headers) {
94
- // Special handling for multi-value headers
95
- foreach ($headers as $key => $value) {
96
- // Deal with collisions with Host and Authorization
97
- if ($key == 'host' || $key == 'Host') {
98
- $this->setHeader($key, $value);
99
- } elseif ($value instanceof HeaderInterface) {
100
- $this->addHeader($key, $value);
101
- } else {
102
- foreach ((array) $value as $v) {
103
- $this->addHeader($key, $v);
104
- }
105
- }
106
- }
107
- }
108
-
109
- $this->setState(self::STATE_NEW);
110
- }
111
-
112
- public function __clone()
113
- {
114
- if ($this->eventDispatcher) {
115
- $this->eventDispatcher = clone $this->eventDispatcher;
116
- }
117
- $this->curlOptions = clone $this->curlOptions;
118
- $this->params = clone $this->params;
119
- $this->url = clone $this->url;
120
- $this->response = $this->responseBody = null;
121
- $this->headers = clone $this->headers;
122
-
123
- $this->setState(RequestInterface::STATE_NEW);
124
- $this->dispatch('request.clone', array('request' => $this));
125
- }
126
-
127
- /**
128
- * Get the HTTP request as a string
129
- *
130
- * @return string
131
- */
132
- public function __toString()
133
- {
134
- return $this->getRawHeaders() . "\r\n\r\n";
135
- }
136
-
137
- /**
138
- * Default method that will throw exceptions if an unsuccessful response is received.
139
- *
140
- * @param Event $event Received
141
- * @throws BadResponseException if the response is not successful
142
- */
143
- public static function onRequestError(Event $event)
144
- {
145
- $e = BadResponseException::factory($event['request'], $event['response']);
146
- $event['request']->setState(self::STATE_ERROR, array('exception' => $e) + $event->toArray());
147
- throw $e;
148
- }
149
-
150
- public function setClient(ClientInterface $client)
151
- {
152
- $this->client = $client;
153
-
154
- return $this;
155
- }
156
-
157
- public function getClient()
158
- {
159
- return $this->client;
160
- }
161
-
162
- public function getRawHeaders()
163
- {
164
- $protocolVersion = $this->protocolVersion ?: '1.1';
165
-
166
- return trim($this->method . ' ' . $this->getResource()) . ' '
167
- . strtoupper(str_replace('https', 'http', $this->url->getScheme()))
168
- . '/' . $protocolVersion . "\r\n" . implode("\r\n", $this->getHeaderLines());
169
- }
170
-
171
- public function setUrl($url)
172
- {
173
- if ($url instanceof Url) {
174
- $this->url = $url;
175
- } else {
176
- $this->url = Url::factory($url);
177
- }
178
-
179
- // Update the port and host header
180
- $this->setPort($this->url->getPort());
181
-
182
- if ($this->url->getUsername() || $this->url->getPassword()) {
183
- $this->setAuth($this->url->getUsername(), $this->url->getPassword());
184
- // Remove the auth info from the URL
185
- $this->url->setUsername(null);
186
- $this->url->setPassword(null);
187
- }
188
-
189
- return $this;
190
- }
191
-
192
- public function send()
193
- {
194
- if (!$this->client) {
195
- throw new RuntimeException('A client must be set on the request');
196
- }
197
-
198
- return $this->client->send($this);
199
- }
200
-
201
- public function getResponse()
202
- {
203
- return $this->response;
204
- }
205
-
206
- public function getQuery($asString = false)
207
- {
208
- return $asString
209
- ? (string) $this->url->getQuery()
210
- : $this->url->getQuery();
211
- }
212
-
213
- public function getMethod()
214
- {
215
- return $this->method;
216
- }
217
-
218
- public function getScheme()
219
- {
220
- return $this->url->getScheme();
221
- }
222
-
223
- public function setScheme($scheme)
224
- {
225
- $this->url->setScheme($scheme);
226
-
227
- return $this;
228
- }
229
-
230
- public function getHost()
231
- {
232
- return $this->url->getHost();
233
- }
234
-
235
- public function setHost($host)
236
- {
237
- $this->url->setHost($host);
238
- $this->setPort($this->url->getPort());
239
-
240
- return $this;
241
- }
242
-
243
- public function getProtocolVersion()
244
- {
245
- return $this->protocolVersion;
246
- }
247
-
248
- public function setProtocolVersion($protocol)
249
- {
250
- $this->protocolVersion = $protocol;
251
-
252
- return $this;
253
- }
254
-
255
- public function getPath()
256
- {
257
- return '/' . ltrim($this->url->getPath(), '/');
258
- }
259
-
260
- public function setPath($path)
261
- {
262
- $this->url->setPath($path);
263
-
264
- return $this;
265
- }
266
-
267
- public function getPort()
268
- {
269
- return $this->url->getPort();
270
- }
271
-
272
- public function setPort($port)
273
- {
274
- $this->url->setPort($port);
275
-
276
- // Include the port in the Host header if it is not the default port for the scheme of the URL
277
- $scheme = $this->url->getScheme();
278
- if (($scheme == 'http' && $port != 80) || ($scheme == 'https' && $port != 443)) {
279
- $this->headers['host'] = $this->headerFactory->createHeader('Host', $this->url->getHost() . ':' . $port);
280
- } else {
281
- $this->headers['host'] = $this->headerFactory->createHeader('Host', $this->url->getHost());
282
- }
283
-
284
- return $this;
285
- }
286
-
287
- public function getUsername()
288
- {
289
- return $this->username;
290
- }
291
-
292
- public function getPassword()
293
- {
294
- return $this->password;
295
- }
296
-
297
- public function setAuth($user, $password = '', $scheme = CURLAUTH_BASIC)
298
- {
299
- static $authMap = array(
300
- 'basic' => CURLAUTH_BASIC,
301
- 'digest' => CURLAUTH_DIGEST,
302
- 'ntlm' => CURLAUTH_NTLM,
303
- 'any' => CURLAUTH_ANY
304
- );
305
-
306
- // If we got false or null, disable authentication
307
- if (!$user) {
308
- $this->password = $this->username = null;
309
- $this->removeHeader('Authorization');
310
- $this->getCurlOptions()->remove(CURLOPT_HTTPAUTH);
311
- return $this;
312
- }
313
-
314
- if (!is_numeric($scheme)) {
315
- $scheme = strtolower($scheme);
316
- if (!isset($authMap[$scheme])) {
317
- throw new InvalidArgumentException($scheme . ' is not a valid authentication type');
318
- }
319
- $scheme = $authMap[$scheme];
320
- }
321
-
322
- $this->username = $user;
323
- $this->password = $password;
324
-
325
- // Bypass CURL when using basic auth to promote connection reuse
326
- if ($scheme == CURLAUTH_BASIC) {
327
- $this->getCurlOptions()->remove(CURLOPT_HTTPAUTH);
328
- $this->setHeader('Authorization', 'Basic ' . base64_encode($this->username . ':' . $this->password));
329
- } else {
330
- $this->getCurlOptions()
331
- ->set(CURLOPT_HTTPAUTH, $scheme)
332
- ->set(CURLOPT_USERPWD, $this->username . ':' . $this->password);
333
- }
334
-
335
- return $this;
336
- }
337
-
338
- public function getResource()
339
- {
340
- $resource = $this->getPath();
341
- if ($query = (string) $this->url->getQuery()) {
342
- $resource .= '?' . $query;
343
- }
344
-
345
- return $resource;
346
- }
347
-
348
- public function getUrl($asObject = false)
349
- {
350
- return $asObject ? clone $this->url : (string) $this->url;
351
- }
352
-
353
- public function getState()
354
- {
355
- return $this->state;
356
- }
357
-
358
- public function setState($state, array $context = array())
359
- {
360
- $oldState = $this->state;
361
- $this->state = $state;
362
-
363
- switch ($state) {
364
- case self::STATE_NEW:
365
- $this->response = null;
366
- break;
367
- case self::STATE_TRANSFER:
368
- if ($oldState !== $state) {
369
- // Fix Content-Length and Transfer-Encoding collisions
370
- if ($this->hasHeader('Transfer-Encoding') && $this->hasHeader('Content-Length')) {
371
- $this->removeHeader('Transfer-Encoding');
372
- }
373
- $this->dispatch('request.before_send', array('request' => $this));
374
- }
375
- break;
376
- case self::STATE_COMPLETE:
377
- if ($oldState !== $state) {
378
- $this->processResponse($context);
379
- $this->responseBody = null;
380
- }
381
- break;
382
- case self::STATE_ERROR:
383
- if (isset($context['exception'])) {
384
- $this->dispatch('request.exception', array(
385
- 'request' => $this,
386
- 'response' => isset($context['response']) ? $context['response'] : $this->response,
387
- 'exception' => isset($context['exception']) ? $context['exception'] : null
388
- ));
389
- }
390
- }
391
-
392
- return $this->state;
393
- }
394
-
395
- public function getCurlOptions()
396
- {
397
- return $this->curlOptions;
398
- }
399
-
400
- public function startResponse(Response $response)
401
- {
402
- $this->state = self::STATE_TRANSFER;
403
- $response->setEffectiveUrl((string) $this->getUrl());
404
- $this->response = $response;
405
-
406
- return $this;
407
- }
408
-
409
- public function setResponse(Response $response, $queued = false)
410
- {
411
- $response->setEffectiveUrl((string) $this->url);
412
-
413
- if ($queued) {
414
- $ed = $this->getEventDispatcher();
415
- $ed->addListener('request.before_send', $f = function ($e) use ($response, &$f, $ed) {
416
- $e['request']->setResponse($response);
417
- $ed->removeListener('request.before_send', $f);
418
- }, -9999);
419
- } else {
420
- $this->response = $response;
421
- // If a specific response body is specified, then use it instead of the response's body
422
- if ($this->responseBody && !$this->responseBody->getCustomData('default') && !$response->isRedirect()) {
423
- $this->getResponseBody()->write((string) $this->response->getBody());
424
- } else {
425
- $this->responseBody = $this->response->getBody();
426
- }
427
- $this->setState(self::STATE_COMPLETE);
428
- }
429
-
430
- return $this;
431
- }
432
-
433
- public function setResponseBody($body)
434
- {
435
- // Attempt to open a file for writing if a string was passed
436
- if (is_string($body)) {
437
- // @codeCoverageIgnoreStart
438
- if (!($body = fopen($body, 'w+'))) {
439
- throw new InvalidArgumentException('Could not open ' . $body . ' for writing');
440
- }
441
- // @codeCoverageIgnoreEnd
442
- }
443
-
444
- $this->responseBody = EntityBody::factory($body);
445
-
446
- return $this;
447
- }
448
-
449
- public function getResponseBody()
450
- {
451
- if ($this->responseBody === null) {
452
- $this->responseBody = EntityBody::factory()->setCustomData('default', true);
453
- }
454
-
455
- return $this->responseBody;
456
- }
457
-
458
- /**
459
- * Determine if the response body is repeatable (readable + seekable)
460
- *
461
- * @return bool
462
- * @deprecated Use getResponseBody()->isSeekable()
463
- * @codeCoverageIgnore
464
- */
465
- public function isResponseBodyRepeatable()
466
- {
467
- Version::warn(__METHOD__ . ' is deprecated. Use $request->getResponseBody()->isRepeatable()');
468
- return !$this->responseBody ? true : $this->responseBody->isRepeatable();
469
- }
470
-
471
- public function getCookies()
472
- {
473
- if ($cookie = $this->getHeader('Cookie')) {
474
- $data = ParserRegistry::getInstance()->getParser('cookie')->parseCookie($cookie);
475
- return $data['cookies'];
476
- }
477
-
478
- return array();
479
- }
480
-
481
- public function getCookie($name)
482
- {
483
- $cookies = $this->getCookies();
484
-
485
- return isset($cookies[$name]) ? $cookies[$name] : null;
486
- }
487
-
488
- public function addCookie($name, $value)
489
- {
490
- if (!$this->hasHeader('Cookie')) {
491
- $this->setHeader('Cookie', "{$name}={$value}");
492
- } else {
493
- $this->getHeader('Cookie')->add("{$name}={$value}");
494
- }
495
-
496
- // Always use semicolons to separate multiple cookie headers
497
- $this->getHeader('Cookie')->setGlue(';');
498
-
499
- return $this;
500
- }
501
-
502
- public function removeCookie($name)
503
- {
504
- if ($cookie = $this->getHeader('Cookie')) {
505
- foreach ($cookie as $cookieValue) {
506
- if (strpos($cookieValue, $name . '=') === 0) {
507
- $cookie->removeValue($cookieValue);
508
- }
509
- }
510
- }
511
-
512
- return $this;
513
- }
514
-
515
- public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
516
- {
517
- $this->eventDispatcher = $eventDispatcher;
518
- $this->eventDispatcher->addListener('request.error', array(__CLASS__, 'onRequestError'), -255);
519
-
520
- return $this;
521
- }
522
-
523
- public function getEventDispatcher()
524
- {
525
- if (!$this->eventDispatcher) {
526
- $this->setEventDispatcher(new EventDispatcher());
527
- }
528
-
529
- return $this->eventDispatcher;
530
- }
531
-
532
- public function dispatch($eventName, array $context = array())
533
- {
534
- $context['request'] = $this;
535
-
536
- return $this->getEventDispatcher()->dispatch($eventName, new Event($context));
537
- }
538
-
539
- public function addSubscriber(EventSubscriberInterface $subscriber)
540
- {
541
- $this->getEventDispatcher()->addSubscriber($subscriber);
542
-
543
- return $this;
544
- }
545
-
546
- /**
547
- * Get an array containing the request and response for event notifications
548
- *
549
- * @return array
550
- */
551
- protected function getEventArray()
552
- {
553
- return array(
554
- 'request' => $this,
555
- 'response' => $this->response
556
- );
557
- }
558
-
559
- /**
560
- * Process a received response
561
- *
562
- * @param array $context Contextual information
563
- * @throws RequestException|BadResponseException on unsuccessful responses
564
- */
565
- protected function processResponse(array $context = array())
566
- {
567
- if (!$this->response) {
568
- // If no response, then processResponse shouldn't have been called
569
- $e = new RequestException('Error completing request');
570
- $e->setRequest($this);
571
- throw $e;
572
- }
573
-
574
- $this->state = self::STATE_COMPLETE;
575
-
576
- // A request was sent, but we don't know if we'll send more or if the final response will be successful
577
- $this->dispatch('request.sent', $this->getEventArray() + $context);
578
-
579
- // Some response processors will remove the response or reset the state (example: ExponentialBackoffPlugin)
580
- if ($this->state == RequestInterface::STATE_COMPLETE) {
581
-
582
- // The request completed, so the HTTP transaction is complete
583
- $this->dispatch('request.complete', $this->getEventArray());
584
-
585
- // If the response is bad, allow listeners to modify it or throw exceptions. You can change the response by
586
- // modifying the Event object in your listeners or calling setResponse() on the request
587
- if ($this->response->isError()) {
588
- $event = new Event($this->getEventArray());
589
- $this->getEventDispatcher()->dispatch('request.error', $event);
590
- // Allow events of request.error to quietly change the response
591
- if ($event['response'] !== $this->response) {
592
- $this->response = $event['response'];
593
- }
594
- }
595
-
596
- // If a successful response was received, dispatch an event
597
- if ($this->response->isSuccessful()) {
598
- $this->dispatch('request.success', $this->getEventArray());
599
- }
600
- }
601
- }
602
-
603
- /**
604
- * @deprecated Use Guzzle\Plugin\Cache\DefaultCanCacheStrategy
605
- * @codeCoverageIgnore
606
- */
607
- public function canCache()
608
- {
609
- Version::warn(__METHOD__ . ' is deprecated. Use Guzzle\Plugin\Cache\DefaultCanCacheStrategy.');
610
- if (class_exists('Guzzle\Plugin\Cache\DefaultCanCacheStrategy')) {
611
- $canCache = new \Guzzle\Plugin\Cache\DefaultCanCacheStrategy();
612
- return $canCache->canCacheRequest($this);
613
- } else {
614
- return false;
615
- }
616
- }
617
-
618
- /**
619
- * @deprecated Use the history plugin (not emitting a warning as this is built-into the RedirectPlugin for now)
620
- * @codeCoverageIgnore
621
- */
622
- public function setIsRedirect($isRedirect)
623
- {
624
- $this->isRedirect = $isRedirect;
625
-
626
- return $this;
627
- }
628
-
629
- /**
630
- * @deprecated Use the history plugin
631
- * @codeCoverageIgnore
632
- */
633
- public function isRedirect()
634
- {
635
- Version::warn(__METHOD__ . ' is deprecated. Use the HistoryPlugin to track this.');
636
- return $this->isRedirect;
637
- }
638
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php DELETED
@@ -1,359 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Collection;
6
- use Guzzle\Common\Exception\InvalidArgumentException;
7
- use Guzzle\Http\RedirectPlugin;
8
- use Guzzle\Http\Url;
9
- use Guzzle\Parser\ParserRegistry;
10
-
11
- /**
12
- * Default HTTP request factory used to create the default {@see Request} and {@see EntityEnclosingRequest} objects.
13
- */
14
- class RequestFactory implements RequestFactoryInterface
15
- {
16
- /** @var RequestFactory Singleton instance of the default request factory */
17
- protected static $instance;
18
-
19
- /** @var array Hash of methods available to the class (provides fast isset() lookups) */
20
- protected $methods;
21
-
22
- /** @var string Class to instantiate for requests with no body */
23
- protected $requestClass = 'Guzzle\\Http\\Message\\Request';
24
-
25
- /** @var string Class to instantiate for requests with a body */
26
- protected $entityEnclosingRequestClass = 'Guzzle\\Http\\Message\\EntityEnclosingRequest';
27
-
28
- /**
29
- * Get a cached instance of the default request factory
30
- *
31
- * @return RequestFactory
32
- */
33
- public static function getInstance()
34
- {
35
- // @codeCoverageIgnoreStart
36
- if (!static::$instance) {
37
- static::$instance = new static();
38
- }
39
- // @codeCoverageIgnoreEnd
40
-
41
- return static::$instance;
42
- }
43
-
44
- public function __construct()
45
- {
46
- $this->methods = array_flip(get_class_methods(__CLASS__));
47
- }
48
-
49
- public function fromMessage($message)
50
- {
51
- $parsed = ParserRegistry::getInstance()->getParser('message')->parseRequest($message);
52
-
53
- if (!$parsed) {
54
- return false;
55
- }
56
-
57
- $request = $this->fromParts($parsed['method'], $parsed['request_url'],
58
- $parsed['headers'], $parsed['body'], $parsed['protocol'],
59
- $parsed['version']);
60
-
61
- // EntityEnclosingRequest adds an "Expect: 100-Continue" header when using a raw request body for PUT or POST
62
- // requests. This factory method should accurately reflect the message, so here we are removing the Expect
63
- // header if one was not supplied in the message.
64
- if (!isset($parsed['headers']['Expect']) && !isset($parsed['headers']['expect'])) {
65
- $request->removeHeader('Expect');
66
- }
67
-
68
- return $request;
69
- }
70
-
71
- public function fromParts(
72
- $method,
73
- array $urlParts,
74
- $headers = null,
75
- $body = null,
76
- $protocol = 'HTTP',
77
- $protocolVersion = '1.1'
78
- ) {
79
- return $this->create($method, Url::buildUrl($urlParts), $headers, $body)
80
- ->setProtocolVersion($protocolVersion);
81
- }
82
-
83
- public function create($method, $url, $headers = null, $body = null, array $options = array())
84
- {
85
- $method = strtoupper($method);
86
-
87
- if ($method == 'GET' || $method == 'HEAD' || $method == 'TRACE' || $method == 'OPTIONS') {
88
- // Handle non-entity-enclosing request methods
89
- $request = new $this->requestClass($method, $url, $headers);
90
- if ($body) {
91
- // The body is where the response body will be stored
92
- $type = gettype($body);
93
- if ($type == 'string' || $type == 'resource' || $type == 'object') {
94
- $request->setResponseBody($body);
95
- }
96
- }
97
- } else {
98
- // Create an entity enclosing request by default
99
- $request = new $this->entityEnclosingRequestClass($method, $url, $headers);
100
- if ($body || $body === '0') {
101
- // Add POST fields and files to an entity enclosing request if an array is used
102
- if (is_array($body) || $body instanceof Collection) {
103
- // Normalize PHP style cURL uploads with a leading '@' symbol
104
- foreach ($body as $key => $value) {
105
- if (is_string($value) && substr($value, 0, 1) == '@') {
106
- $request->addPostFile($key, $value);
107
- unset($body[$key]);
108
- }
109
- }
110
- // Add the fields if they are still present and not all files
111
- $request->addPostFields($body);
112
- } else {
113
- // Add a raw entity body body to the request
114
- $request->setBody($body, (string) $request->getHeader('Content-Type'));
115
- if ((string) $request->getHeader('Transfer-Encoding') == 'chunked') {
116
- $request->removeHeader('Content-Length');
117
- }
118
- }
119
- }
120
- }
121
-
122
- if ($options) {
123
- $this->applyOptions($request, $options);
124
- }
125
-
126
- return $request;
127
- }
128
-
129
- /**
130
- * Clone a request while changing the method. Emulates the behavior of
131
- * {@see Guzzle\Http\Message\Request::clone}, but can change the HTTP method.
132
- *
133
- * @param RequestInterface $request Request to clone
134
- * @param string $method Method to set
135
- *
136
- * @return RequestInterface
137
- */
138
- public function cloneRequestWithMethod(RequestInterface $request, $method)
139
- {
140
- // Create the request with the same client if possible
141
- if ($request->getClient()) {
142
- $cloned = $request->getClient()->createRequest($method, $request->getUrl(), $request->getHeaders());
143
- } else {
144
- $cloned = $this->create($method, $request->getUrl(), $request->getHeaders());
145
- }
146
-
147
- $cloned->getCurlOptions()->replace($request->getCurlOptions()->toArray());
148
- $cloned->setEventDispatcher(clone $request->getEventDispatcher());
149
- // Ensure that that the Content-Length header is not copied if changing to GET or HEAD
150
- if (!($cloned instanceof EntityEnclosingRequestInterface)) {
151
- $cloned->removeHeader('Content-Length');
152
- } elseif ($request instanceof EntityEnclosingRequestInterface) {
153
- $cloned->setBody($request->getBody());
154
- }
155
- $cloned->getParams()->replace($request->getParams()->toArray());
156
- $cloned->dispatch('request.clone', array('request' => $cloned));
157
-
158
- return $cloned;
159
- }
160
-
161
- public function applyOptions(RequestInterface $request, array $options = array(), $flags = self::OPTIONS_NONE)
162
- {
163
- // Iterate over each key value pair and attempt to apply a config using function visitors
164
- foreach ($options as $key => $value) {
165
- $method = "visit_{$key}";
166
- if (isset($this->methods[$method])) {
167
- $this->{$method}($request, $value, $flags);
168
- }
169
- }
170
- }
171
-
172
- protected function visit_headers(RequestInterface $request, $value, $flags)
173
- {
174
- if (!is_array($value)) {
175
- throw new InvalidArgumentException('headers value must be an array');
176
- }
177
-
178
- if ($flags & self::OPTIONS_AS_DEFAULTS) {
179
- // Merge headers in but do not overwrite existing values
180
- foreach ($value as $key => $header) {
181
- if (!$request->hasHeader($key)) {
182
- $request->setHeader($key, $header);
183
- }
184
- }
185
- } else {
186
- $request->addHeaders($value);
187
- }
188
- }
189
-
190
- protected function visit_body(RequestInterface $request, $value, $flags)
191
- {
192
- if ($request instanceof EntityEnclosingRequestInterface) {
193
- $request->setBody($value);
194
- } else {
195
- throw new InvalidArgumentException('Attempting to set a body on a non-entity-enclosing request');
196
- }
197
- }
198
-
199
- protected function visit_allow_redirects(RequestInterface $request, $value, $flags)
200
- {
201
- if ($value === false) {
202
- $request->getParams()->set(RedirectPlugin::DISABLE, true);
203
- }
204
- }
205
-
206
- protected function visit_auth(RequestInterface $request, $value, $flags)
207
- {
208
- if (!is_array($value)) {
209
- throw new InvalidArgumentException('auth value must be an array');
210
- }
211
-
212
- $request->setAuth($value[0], isset($value[1]) ? $value[1] : null, isset($value[2]) ? $value[2] : 'basic');
213
- }
214
-
215
- protected function visit_query(RequestInterface $request, $value, $flags)
216
- {
217
- if (!is_array($value)) {
218
- throw new InvalidArgumentException('query value must be an array');
219
- }
220
-
221
- if ($flags & self::OPTIONS_AS_DEFAULTS) {
222
- // Merge query string values in but do not overwrite existing values
223
- $query = $request->getQuery();
224
- $query->overwriteWith(array_diff_key($value, $query->toArray()));
225
- } else {
226
- $request->getQuery()->overwriteWith($value);
227
- }
228
- }
229
-
230
- protected function visit_cookies(RequestInterface $request, $value, $flags)
231
- {
232
- if (!is_array($value)) {
233
- throw new InvalidArgumentException('cookies value must be an array');
234
- }
235
-
236
- foreach ($value as $name => $v) {
237
- $request->addCookie($name, $v);
238
- }
239
- }
240
-
241
- protected function visit_events(RequestInterface $request, $value, $flags)
242
- {
243
- if (!is_array($value)) {
244
- throw new InvalidArgumentException('events value must be an array');
245
- }
246
-
247
- foreach ($value as $name => $method) {
248
- if (is_array($method)) {
249
- $request->getEventDispatcher()->addListener($name, $method[0], $method[1]);
250
- } else {
251
- $request->getEventDispatcher()->addListener($name, $method);
252
- }
253
- }
254
- }
255
-
256
- protected function visit_plugins(RequestInterface $request, $value, $flags)
257
- {
258
- if (!is_array($value)) {
259
- throw new InvalidArgumentException('plugins value must be an array');
260
- }
261
-
262
- foreach ($value as $plugin) {
263
- $request->addSubscriber($plugin);
264
- }
265
- }
266
-
267
- protected function visit_exceptions(RequestInterface $request, $value, $flags)
268
- {
269
- if ($value === false || $value === 0) {
270
- $dispatcher = $request->getEventDispatcher();
271
- foreach ($dispatcher->getListeners('request.error') as $listener) {
272
- if (is_array($listener) && $listener[0] == 'Guzzle\Http\Message\Request' && $listener[1] = 'onRequestError') {
273
- $dispatcher->removeListener('request.error', $listener);
274
- break;
275
- }
276
- }
277
- }
278
- }
279
-
280
- protected function visit_save_to(RequestInterface $request, $value, $flags)
281
- {
282
- $request->setResponseBody($value);
283
- }
284
-
285
- protected function visit_params(RequestInterface $request, $value, $flags)
286
- {
287
- if (!is_array($value)) {
288
- throw new InvalidArgumentException('params value must be an array');
289
- }
290
-
291
- $request->getParams()->overwriteWith($value);
292
- }
293
-
294
- protected function visit_timeout(RequestInterface $request, $value, $flags)
295
- {
296
- if (defined('CURLOPT_TIMEOUT_MS')) {
297
- $request->getCurlOptions()->set(CURLOPT_TIMEOUT_MS, $value * 1000);
298
- } else {
299
- $request->getCurlOptions()->set(CURLOPT_TIMEOUT, $value);
300
- }
301
- }
302
-
303
- protected function visit_connect_timeout(RequestInterface $request, $value, $flags)
304
- {
305
- if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {
306
- $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT_MS, $value * 1000);
307
- } else {
308
- $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT, $value);
309
- }
310
- }
311
-
312
- protected function visit_debug(RequestInterface $request, $value, $flags)
313
- {
314
- if ($value) {
315
- $request->getCurlOptions()->set(CURLOPT_VERBOSE, true);
316
- }
317
- }
318
-
319
- protected function visit_verify(RequestInterface $request, $value, $flags)
320
- {
321
- $curl = $request->getCurlOptions();
322
- if ($value === true || is_string($value)) {
323
- $curl[CURLOPT_SSL_VERIFYHOST] = 2;
324
- $curl[CURLOPT_SSL_VERIFYPEER] = true;
325
- if ($value !== true) {
326
- $curl[CURLOPT_CAINFO] = $value;
327
- }
328
- } elseif ($value === false) {
329
- unset($curl[CURLOPT_CAINFO]);
330
- $curl[CURLOPT_SSL_VERIFYHOST] = 0;
331
- $curl[CURLOPT_SSL_VERIFYPEER] = false;
332
- }
333
- }
334
-
335
- protected function visit_proxy(RequestInterface $request, $value, $flags)
336
- {
337
- $request->getCurlOptions()->set(CURLOPT_PROXY, $value, $flags);
338
- }
339
-
340
- protected function visit_cert(RequestInterface $request, $value, $flags)
341
- {
342
- if (is_array($value)) {
343
- $request->getCurlOptions()->set(CURLOPT_SSLCERT, $value[0]);
344
- $request->getCurlOptions()->set(CURLOPT_SSLCERTPASSWD, $value[1]);
345
- } else {
346
- $request->getCurlOptions()->set(CURLOPT_SSLCERT, $value);
347
- }
348
- }
349
-
350
- protected function visit_ssl_key(RequestInterface $request, $value, $flags)
351
- {
352
- if (is_array($value)) {
353
- $request->getCurlOptions()->set(CURLOPT_SSLKEY, $value[0]);
354
- $request->getCurlOptions()->set(CURLOPT_SSLKEYPASSWD, $value[1]);
355
- } else {
356
- $request->getCurlOptions()->set(CURLOPT_SSLKEY, $value);
357
- }
358
- }
359
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php DELETED
@@ -1,105 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Collection;
6
- use Guzzle\Http\EntityBodyInterface;
7
- use Guzzle\Http\Url;
8
-
9
- /**
10
- * Request factory used to create HTTP requests
11
- */
12
- interface RequestFactoryInterface
13
- {
14
- const OPTIONS_NONE = 0;
15
- const OPTIONS_AS_DEFAULTS = 1;
16
-
17
- /**
18
- * Create a new request based on an HTTP message
19
- *
20
- * @param string $message HTTP message as a string
21
- *
22
- * @return RequestInterface
23
- */
24
- public function fromMessage($message);
25
-
26
- /**
27
- * Create a request from URL parts as returned from parse_url()
28
- *
29
- * @param string $method HTTP method (GET, POST, PUT, HEAD, DELETE, etc)
30
- *
31
- * @param array $urlParts URL parts containing the same keys as parse_url()
32
- * - scheme: e.g. http
33
- * - host: e.g. www.guzzle-project.com
34
- * - port: e.g. 80
35
- * - user: e.g. michael
36
- * - pass: e.g. rocks
37
- * - path: e.g. / OR /index.html
38
- * - query: after the question mark ?
39
- * @param array|Collection $headers HTTP headers
40
- * @param string|resource|array|EntityBodyInterface $body Body to send in the request
41
- * @param string $protocol Protocol (HTTP, SPYDY, etc)
42
- * @param string $protocolVersion 1.0, 1.1, etc
43
- *
44
- * @return RequestInterface
45
- */
46
- public function fromParts(
47
- $method,
48
- array $urlParts,
49
- $headers = null,
50
- $body = null,
51
- $protocol = 'HTTP',
52
- $protocolVersion = '1.1'
53
- );
54
-
55
- /**
56
- * Create a new request based on the HTTP method
57
- *
58
- * @param string $method HTTP method (GET, POST, PUT, PATCH, HEAD, DELETE, ...)
59
- * @param string|Url $url HTTP URL to connect to
60
- * @param array|Collection $headers HTTP headers
61
- * @param string|resource|array|EntityBodyInterface $body Body to send in the request
62
- * @param array $options Array of options to apply to the request
63
- *
64
- * @return RequestInterface
65
- */
66
- public function create($method, $url, $headers = null, $body = null, array $options = array());
67
-
68
- /**
69
- * Apply an associative array of options to the request
70
- *
71
- * @param RequestInterface $request Request to update
72
- * @param array $options Options to use with the request. Available options are:
73
- * "headers": Associative array of headers
74
- * "query": Associative array of query string values to add to the request
75
- * "body": Body of a request, including an EntityBody, string, or array when sending POST requests.
76
- * "auth": Array of HTTP authentication parameters to use with the request. The array must contain the
77
- * username in index [0], the password in index [2], and can optionally contain the authentication type
78
- * in index [3]. The authentication types are: "Basic", "Digest", "NTLM", "Any" (defaults to "Basic").
79
- * "cookies": Associative array of cookies
80
- * "allow_redirects": Set to false to disable redirects
81
- * "save_to": String, fopen resource, or EntityBody object used to store the body of the response
82
- * "events": Associative array mapping event names to a closure or array of (priority, closure)
83
- * "plugins": Array of plugins to add to the request
84
- * "exceptions": Set to false to disable throwing exceptions on an HTTP level error (e.g. 404, 500, etc)
85
- * "params": Set custom request data parameters on a request. (Note: these are not query string parameters)
86
- * "timeout": Float describing the timeout of the request in seconds
87
- * "connect_timeout": Float describing the number of seconds to wait while trying to connect. Use 0 to wait
88
- * indefinitely.
89
- * "verify": Set to true to enable SSL cert validation (the default), false to disable, or supply the path
90
- * to a CA bundle to enable verification using a custom certificate.
91
- * "cert": Set to a string to specify the path to a file containing a PEM formatted certificate. If a
92
- * password is required, then set an array containing the path to the PEM file followed by the the
93
- * password required for the certificate.
94
- * "ssl_key": Specify the path to a file containing a private SSL key in PEM format. If a password is
95
- * required, then set an array containing the path to the SSL key followed by the password required for
96
- * the certificate.
97
- * "proxy": Specify an HTTP proxy (e.g. "http://username:password@192.168.16.1:10")
98
- * "debug": Set to true to display all data sent over the wire
99
- * @param int $flags Bitwise flags to apply when applying the options to the request. Defaults to no special
100
- * options. `1` (OPTIONS_AS_DEFAULTS): When specified, options will only update a request when
101
- * the value does not already exist on the request. This is only supported by "query" and
102
- * "headers". Other bitwise options may be added in the future.
103
- */
104
- public function applyOptions(RequestInterface $request, array $options = array(), $flags = self::OPTIONS_NONE);
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestInterface.php DELETED
@@ -1,318 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Collection;
6
- use Guzzle\Common\HasDispatcherInterface;
7
- use Guzzle\Http\Exception\RequestException;
8
- use Guzzle\Http\ClientInterface;
9
- use Guzzle\Http\EntityBodyInterface;
10
- use Guzzle\Http\Url;
11
- use Guzzle\Http\QueryString;
12
-
13
- /**
14
- * Generic HTTP request interface
15
- */
16
- interface RequestInterface extends MessageInterface, HasDispatcherInterface
17
- {
18
- const STATE_NEW = 'new';
19
- const STATE_COMPLETE = 'complete';
20
- const STATE_TRANSFER = 'transfer';
21
- const STATE_ERROR = 'error';
22
-
23
- const GET = 'GET';
24
- const PUT = 'PUT';
25
- const POST = 'POST';
26
- const DELETE = 'DELETE';
27
- const HEAD = 'HEAD';
28
- const CONNECT = 'CONNECT';
29
- const OPTIONS = 'OPTIONS';
30
- const TRACE = 'TRACE';
31
- const PATCH = 'PATCH';
32
-
33
- /**
34
- * @return string
35
- */
36
- public function __toString();
37
-
38
- /**
39
- * Send the request
40
- *
41
- * @return Response
42
- * @throws RequestException on a request error
43
- */
44
- public function send();
45
-
46
- /**
47
- * Set the client used to transport the request
48
- *
49
- * @param ClientInterface $client
50
- *
51
- * @return self
52
- */
53
- public function setClient(ClientInterface $client);
54
-
55
- /**
56
- * Get the client used to transport the request
57
- *
58
- * @return ClientInterface $client
59
- */
60
- public function getClient();
61
-
62
- /**
63
- * Set the URL of the request
64
- *
65
- * @param string $url|Url Full URL to set including query string
66
- *
67
- * @return self
68
- */
69
- public function setUrl($url);
70
-
71
- /**
72
- * Get the full URL of the request (e.g. 'http://www.guzzle-project.com/')
73
- *
74
- * @param bool $asObject Set to TRUE to retrieve the URL as a clone of the URL object owned by the request.
75
- *
76
- * @return string|Url
77
- */
78
- public function getUrl($asObject = false);
79
-
80
- /**
81
- * Get the resource part of the the request, including the path, query string, and fragment
82
- *
83
- * @return string
84
- */
85
- public function getResource();
86
-
87
- /**
88
- * Get the collection of key value pairs that will be used as the query string in the request
89
- *
90
- * @return QueryString
91
- */
92
- public function getQuery();
93
-
94
- /**
95
- * Get the HTTP method of the request
96
- *
97
- * @return string
98
- */
99
- public function getMethod();
100
-
101
- /**
102
- * Get the URI scheme of the request (http, https, ftp, etc)
103
- *
104
- * @return string
105
- */
106
- public function getScheme();
107
-
108
- /**
109
- * Set the URI scheme of the request (http, https, ftp, etc)
110
- *
111
- * @param string $scheme Scheme to set
112
- *
113
- * @return self
114
- */
115
- public function setScheme($scheme);
116
-
117
- /**
118
- * Get the host of the request
119
- *
120
- * @return string
121
- */
122
- public function getHost();
123
-
124
- /**
125
- * Set the host of the request. Including a port in the host will modify the port of the request.
126
- *
127
- * @param string $host Host to set (e.g. www.yahoo.com, www.yahoo.com:80)
128
- *
129
- * @return self
130
- */
131
- public function setHost($host);
132
-
133
- /**
134
- * Get the path of the request (e.g. '/', '/index.html')
135
- *
136
- * @return string
137
- */
138
- public function getPath();
139
-
140
- /**
141
- * Set the path of the request (e.g. '/', '/index.html')
142
- *
143
- * @param string|array $path Path to set or array of segments to implode
144
- *
145
- * @return self
146
- */
147
- public function setPath($path);
148
-
149
- /**
150
- * Get the port that the request will be sent on if it has been set
151
- *
152
- * @return int|null
153
- */
154
- public function getPort();
155
-
156
- /**
157
- * Set the port that the request will be sent on
158
- *
159
- * @param int $port Port number to set
160
- *
161
- * @return self
162
- */
163
- public function setPort($port);
164
-
165
- /**
166
- * Get the username to pass in the URL if set
167
- *
168
- * @return string|null
169
- */
170
- public function getUsername();
171
-
172
- /**
173
- * Get the password to pass in the URL if set
174
- *
175
- * @return string|null
176
- */
177
- public function getPassword();
178
-
179
- /**
180
- * Set HTTP authorization parameters
181
- *
182
- * @param string|bool $user User name or false disable authentication
183
- * @param string $password Password
184
- * @param string $scheme Authentication scheme ('Basic', 'Digest', or a CURLAUTH_* constant (deprecated))
185
- *
186
- * @return self
187
- * @link http://www.ietf.org/rfc/rfc2617.txt
188
- * @link http://php.net/manual/en/function.curl-setopt.php See the available options for CURLOPT_HTTPAUTH
189
- * @throws RequestException
190
- */
191
- public function setAuth($user, $password = '', $scheme = 'Basic');
192
-
193
- /**
194
- * Get the HTTP protocol version of the request
195
- *
196
- * @return string
197
- */
198
- public function getProtocolVersion();
199
-
200
- /**
201
- * Set the HTTP protocol version of the request (e.g. 1.1 or 1.0)
202
- *
203
- * @param string $protocol HTTP protocol version to use with the request
204
- *
205
- * @return self
206
- */
207
- public function setProtocolVersion($protocol);
208
-
209
- /**
210
- * Get the previously received {@see Response} or NULL if the request has not been sent
211
- *
212
- * @return Response|null
213
- */
214
- public function getResponse();
215
-
216
- /**
217
- * Manually set a response for the request.
218
- *
219
- * This method is useful for specifying a mock response for the request or setting the response using a cache.
220
- * Manually setting a response will bypass the actual sending of a request.
221
- *
222
- * @param Response $response Response object to set
223
- * @param bool $queued Set to TRUE to keep the request in a state of not having been sent, but queue the
224
- * response for send()
225
- *
226
- * @return self Returns a reference to the object.
227
- */
228
- public function setResponse(Response $response, $queued = false);
229
-
230
- /**
231
- * The start of a response has been received for a request and the request is still in progress
232
- *
233
- * @param Response $response Response that has been received so far
234
- *
235
- * @return self
236
- */
237
- public function startResponse(Response $response);
238
-
239
- /**
240
- * Set the EntityBody that will hold a successful response message's entity body.
241
- *
242
- * This method should be invoked when you need to send the response's entity body somewhere other than the normal
243
- * php://temp buffer. For example, you can send the entity body to a socket, file, or some other custom stream.
244
- *
245
- * @param EntityBodyInterface|string|resource $body Response body object. Pass a string to attempt to store the
246
- * response body in a local file.
247
- * @return Request
248
- */
249
- public function setResponseBody($body);
250
-
251
- /**
252
- * Get the EntityBody that will hold the resulting response message's entity body. This response body will only
253
- * be used for successful responses. Intermediate responses (e.g. redirects) will not use the targeted response
254
- * body.
255
- *
256
- * @return EntityBodyInterface
257
- */
258
- public function getResponseBody();
259
-
260
- /**
261
- * Get the state of the request. One of 'complete', 'transfer', 'new', 'error'
262
- *
263
- * @return string
264
- */
265
- public function getState();
266
-
267
- /**
268
- * Set the state of the request
269
- *
270
- * @param string $state State of the request ('complete', 'transfer', 'new', 'error')
271
- * @param array $context Contextual information about the state change
272
- *
273
- * @return string Returns the current state of the request (which may have changed due to events being fired)
274
- */
275
- public function setState($state, array $context = array());
276
-
277
- /**
278
- * Get the cURL options that will be applied when the cURL handle is created
279
- *
280
- * @return Collection
281
- */
282
- public function getCurlOptions();
283
-
284
- /**
285
- * Get an array of Cookies
286
- *
287
- * @return array
288
- */
289
- public function getCookies();
290
-
291
- /**
292
- * Get a cookie value by name
293
- *
294
- * @param string $name Cookie to retrieve
295
- *
296
- * @return null|string
297
- */
298
- public function getCookie($name);
299
-
300
- /**
301
- * Add a Cookie value by name to the Cookie header
302
- *
303
- * @param string $name Name of the cookie to add
304
- * @param string $value Value to set
305
- *
306
- * @return self
307
- */
308
- public function addCookie($name, $value);
309
-
310
- /**
311
- * Remove a specific cookie value by name
312
- *
313
- * @param string $name Cookie to remove by name
314
- *
315
- * @return self
316
- */
317
- public function removeCookie($name);
318
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php DELETED
@@ -1,968 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\Message;
4
-
5
- use Guzzle\Common\Version;
6
- use Guzzle\Common\ToArrayInterface;
7
- use Guzzle\Common\Exception\RuntimeException;
8
- use Guzzle\Http\EntityBodyInterface;
9
- use Guzzle\Http\EntityBody;
10
- use Guzzle\Http\Exception\BadResponseException;
11
- use Guzzle\Http\RedirectPlugin;
12
- use Guzzle\Parser\ParserRegistry;
13
-
14
- /**
15
- * Guzzle HTTP response object
16
- */
17
- class Response extends AbstractMessage implements \Serializable
18
- {
19
- /**
20
- * @var array Array of reason phrases and their corresponding status codes
21
- */
22
- private static $statusTexts = array(
23
- 100 => 'Continue',
24
- 101 => 'Switching Protocols',
25
- 102 => 'Processing',
26
- 200 => 'OK',
27
- 201 => 'Created',
28
- 202 => 'Accepted',
29
- 203 => 'Non-Authoritative Information',
30
- 204 => 'No Content',
31
- 205 => 'Reset Content',
32
- 206 => 'Partial Content',
33
- 207 => 'Multi-Status',
34
- 208 => 'Already Reported',
35
- 226 => 'IM Used',
36
- 300 => 'Multiple Choices',
37
- 301 => 'Moved Permanently',
38
- 302 => 'Found',
39
- 303 => 'See Other',
40
- 304 => 'Not Modified',
41
- 305 => 'Use Proxy',
42
- 307 => 'Temporary Redirect',
43
- 308 => 'Permanent Redirect',
44
- 400 => 'Bad Request',
45
- 401 => 'Unauthorized',
46
- 402 => 'Payment Required',
47
- 403 => 'Forbidden',
48
- 404 => 'Not Found',
49
- 405 => 'Method Not Allowed',
50
- 406 => 'Not Acceptable',
51
- 407 => 'Proxy Authentication Required',
52
- 408 => 'Request Timeout',
53
- 409 => 'Conflict',
54
- 410 => 'Gone',
55
- 411 => 'Length Required',
56
- 412 => 'Precondition Failed',
57
- 413 => 'Request Entity Too Large',
58
- 414 => 'Request-URI Too Long',
59
- 415 => 'Unsupported Media Type',
60
- 416 => 'Requested Range Not Satisfiable',
61
- 417 => 'Expectation Failed',
62
- 422 => 'Unprocessable Entity',
63
- 423 => 'Locked',
64
- 424 => 'Failed Dependency',
65
- 425 => 'Reserved for WebDAV advanced collections expired proposal',
66
- 426 => 'Upgrade required',
67
- 428 => 'Precondition Required',
68
- 429 => 'Too Many Requests',
69
- 431 => 'Request Header Fields Too Large',
70
- 500 => 'Internal Server Error',
71
- 501 => 'Not Implemented',
72
- 502 => 'Bad Gateway',
73
- 503 => 'Service Unavailable',
74
- 504 => 'Gateway Timeout',
75
- 505 => 'HTTP Version Not Supported',
76
- 506 => 'Variant Also Negotiates (Experimental)',
77
- 507 => 'Insufficient Storage',
78
- 508 => 'Loop Detected',
79
- 510 => 'Not Extended',
80
- 511 => 'Network Authentication Required',
81
- );
82
-
83
- /** @var EntityBodyInterface The response body */
84
- protected $body;
85
-
86
- /** @var string The reason phrase of the response (human readable code) */
87
- protected $reasonPhrase;
88
-
89
- /** @var string The status code of the response */
90
- protected $statusCode;
91
-
92
- /** @var array Information about the request */
93
- protected $info = array();
94
-
95
- /** @var string The effective URL that returned this response */
96
- protected $effectiveUrl;
97
-
98
- /** @var array Cacheable response codes (see RFC 2616:13.4) */
99
- protected static $cacheResponseCodes = array(200, 203, 206, 300, 301, 410);
100
-
101
- /**
102
- * Create a new Response based on a raw response message
103
- *
104
- * @param string $message Response message
105
- *
106
- * @return self|bool Returns false on error
107
- */
108
- public static function fromMessage($message)
109
- {
110
- $data = ParserRegistry::getInstance()->getParser('message')->parseResponse($message);
111
- if (!$data) {
112
- return false;
113
- }
114
-
115
- $response = new static($data['code'], $data['headers'], $data['body']);
116
- $response->setProtocol($data['protocol'], $data['version'])
117
- ->setStatus($data['code'], $data['reason_phrase']);
118
-
119
- // Set the appropriate Content-Length if the one set is inaccurate (e.g. setting to X)
120
- $contentLength = (string) $response->getHeader('Content-Length');
121
- $actualLength = strlen($data['body']);
122
- if (strlen($data['body']) > 0 && $contentLength != $actualLength) {
123
- $response->setHeader('Content-Length', $actualLength);
124
- }
125
-
126
- return $response;
127
- }
128
-
129
- /**
130
- * Construct the response
131
- *
132
- * @param string $statusCode The response status code (e.g. 200, 404, etc)
133
- * @param ToArrayInterface|array $headers The response headers
134
- * @param string|resource|EntityBodyInterface $body The body of the response
135
- *
136
- * @throws BadResponseException if an invalid response code is given
137
- */
138
- public function __construct($statusCode, $headers = null, $body = null)
139
- {
140
- parent::__construct();
141
- $this->setStatus($statusCode);
142
- $this->body = EntityBody::factory($body !== null ? $body : '');
143
-
144
- if ($headers) {
145
- if (is_array($headers)) {
146
- $this->setHeaders($headers);
147
- } elseif ($headers instanceof ToArrayInterface) {
148
- $this->setHeaders($headers->toArray());
149
- } else {
150
- throw new BadResponseException('Invalid headers argument received');
151
- }
152
- }
153
- }
154
-
155
- /**
156
- * @return string
157
- */
158
- public function __toString()
159
- {
160
- return $this->getMessage();
161
- }
162
-
163
- public function serialize()
164
- {
165
- return json_encode(array(
166
- 'status' => $this->statusCode,
167
- 'body' => (string) $this->body,
168
- 'headers' => $this->headers->toArray()
169
- ));
170
- }
171
-
172
- public function unserialize($serialize)
173
- {
174
- $data = json_decode($serialize, true);
175
- $this->__construct($data['status'], $data['headers'], $data['body']);
176
- }
177
-
178
- /**
179
- * Get the response entity body
180
- *
181
- * @param bool $asString Set to TRUE to return a string of the body rather than a full body object
182
- *
183
- * @return EntityBodyInterface|string
184
- */
185
- public function getBody($asString = false)
186
- {
187
- return $asString ? (string) $this->body : $this->body;
188
- }
189
-
190
- /**
191
- * Set the response entity body
192
- *
193
- * @param EntityBodyInterface|string $body Body to set
194
- *
195
- * @return self
196
- */
197
- public function setBody($body)
198
- {
199
- $this->body = EntityBody::factory($body);
200
-
201
- return $this;
202
- }
203
-
204
- /**
205
- * Set the protocol and protocol version of the response
206
- *
207
- * @param string $protocol Response protocol
208
- * @param string $version Protocol version
209
- *
210
- * @return self
211
- */
212
- public function setProtocol($protocol, $version)
213
- {
214
- $this->protocol = $protocol;
215
- $this->protocolVersion = $version;
216
-
217
- return $this;
218
- }
219
-
220
- /**
221
- * Get the protocol used for the response (e.g. HTTP)
222
- *
223
- * @return string
224
- */
225
- public function getProtocol()
226
- {
227
- return $this->protocol;
228
- }
229
-
230
- /**
231
- * Get the HTTP protocol version
232
- *
233
- * @return string
234
- */
235
- public function getProtocolVersion()
236
- {
237
- return $this->protocolVersion;
238
- }
239
-
240
- /**
241
- * Get a cURL transfer information
242
- *
243
- * @param string $key A single statistic to check
244
- *
245
- * @return array|string|null Returns all stats if no key is set, a single stat if a key is set, or null if a key
246
- * is set and not found
247
- * @link http://www.php.net/manual/en/function.curl-getinfo.php
248
- */
249
- public function getInfo($key = null)
250
- {
251
- if ($key === null) {
252
- return $this->info;
253
- } elseif (array_key_exists($key, $this->info)) {
254
- return $this->info[$key];
255
- } else {
256
- return null;
257
- }
258
- }
259
-
260
- /**
261
- * Set the transfer information
262
- *
263
- * @param array $info Array of cURL transfer stats
264
- *
265
- * @return self
266
- */
267
- public function setInfo(array $info)
268
- {
269
- $this->info = $info;
270
-
271
- return $this;
272
- }
273
-
274
- /**
275
- * Set the response status
276
- *
277
- * @param int $statusCode Response status code to set
278
- * @param string $reasonPhrase Response reason phrase
279
- *
280
- * @return self
281
- * @throws BadResponseException when an invalid response code is received
282
- */
283
- public function setStatus($statusCode, $reasonPhrase = '')
284
- {
285
- $this->statusCode = (int) $statusCode;
286
-
287
- if (!$reasonPhrase && isset(self::$statusTexts[$this->statusCode])) {
288
- $this->reasonPhrase = self::$statusTexts[$this->statusCode];
289
- } else {
290
- $this->reasonPhrase = $reasonPhrase;
291
- }
292
-
293
- return $this;
294
- }
295
-
296
- /**
297
- * Get the response status code
298
- *
299
- * @return integer
300
- */
301
- public function getStatusCode()
302
- {
303
- return $this->statusCode;
304
- }
305
-
306
- /**
307
- * Get the entire response as a string
308
- *
309
- * @return string
310
- */
311
- public function getMessage()
312
- {
313
- $message = $this->getRawHeaders();
314
-
315
- // Only include the body in the message if the size is < 2MB
316
- $size = $this->body->getSize();
317
- if ($size < 2097152) {
318
- $message .= (string) $this->body;
319
- }
320
-
321
- return $message;
322
- }
323
-
324
- /**
325
- * Get the the raw message headers as a string
326
- *
327
- * @return string
328
- */
329
- public function getRawHeaders()
330
- {
331
- $headers = 'HTTP/1.1 ' . $this->statusCode . ' ' . $this->reasonPhrase . "\r\n";
332
- $lines = $this->getHeaderLines();
333
- if (!empty($lines)) {
334
- $headers .= implode("\r\n", $lines) . "\r\n";
335
- }
336
-
337
- return $headers . "\r\n";
338
- }
339
-
340
- /**
341
- * Get the response reason phrase- a human readable version of the numeric
342
- * status code
343
- *
344
- * @return string
345
- */
346
- public function getReasonPhrase()
347
- {
348
- return $this->reasonPhrase;
349
- }
350
-
351
- /**
352
- * Get the Accept-Ranges HTTP header
353
- *
354
- * @return string Returns what partial content range types this server supports.
355
- */
356
- public function getAcceptRanges()
357
- {
358
- return (string) $this->getHeader('Accept-Ranges');
359
- }
360
-
361
- /**
362
- * Calculate the age of the response
363
- *
364
- * @return integer
365
- */
366
- public function calculateAge()
367
- {
368
- $age = $this->getHeader('Age');
369
-
370
- if ($age === null && $this->getDate()) {
371
- $age = time() - strtotime($this->getDate());
372
- }
373
-
374
- return $age === null ? null : (int) (string) $age;
375
- }
376
-
377
- /**
378
- * Get the Age HTTP header
379
- *
380
- * @return integer|null Returns the age the object has been in a proxy cache in seconds.
381
- */
382
- public function getAge()
383
- {
384
- return (string) $this->getHeader('Age');
385
- }
386
-
387
- /**
388
- * Get the Allow HTTP header
389
- *
390
- * @return string|null Returns valid actions for a specified resource. To be used for a 405 Method not allowed.
391
- */
392
- public function getAllow()
393
- {
394
- return (string) $this->getHeader('Allow');
395
- }
396
-
397
- /**
398
- * Check if an HTTP method is allowed by checking the Allow response header
399
- *
400
- * @param string $method Method to check
401
- *
402
- * @return bool
403
- */
404
- public function isMethodAllowed($method)
405
- {
406
- $allow = $this->getHeader('Allow');
407
- if ($allow) {
408
- foreach (explode(',', $allow) as $allowable) {
409
- if (!strcasecmp(trim($allowable), $method)) {
410
- return true;
411
- }
412
- }
413
- }
414
-
415
- return false;
416
- }
417
-
418
- /**
419
- * Get the Cache-Control HTTP header
420
- *
421
- * @return string
422
- */
423
- public function getCacheControl()
424
- {
425
- return (string) $this->getHeader('Cache-Control');
426
- }
427
-
428
- /**
429
- * Get the Connection HTTP header
430
- *
431
- * @return string
432
- */
433
- public function getConnection()
434
- {
435
- return (string) $this->getHeader('Connection');
436
- }
437
-
438
- /**
439
- * Get the Content-Encoding HTTP header
440
- *
441
- * @return string|null
442
- */
443
- public function getContentEncoding()
444
- {
445
- return (string) $this->getHeader('Content-Encoding');
446
- }
447
-
448
- /**
449
- * Get the Content-Language HTTP header
450
- *
451
- * @return string|null Returns the language the content is in.
452
- */
453
- public function getContentLanguage()
454
- {
455
- return (string) $this->getHeader('Content-Language');
456
- }
457
-
458
- /**
459
- * Get the Content-Length HTTP header
460
- *
461
- * @return integer Returns the length of the response body in bytes
462
- */
463
- public function getContentLength()
464
- {
465
- return (int) (string) $this->getHeader('Content-Length');
466
- }
467
-
468
- /**
469
- * Get the Content-Location HTTP header
470
- *
471
- * @return string|null Returns an alternate location for the returned data (e.g /index.htm)
472
- */
473
- public function getContentLocation()
474
- {
475
- return (string) $this->getHeader('Content-Location');
476
- }
477
-
478
- /**
479
- * Get the Content-Disposition HTTP header
480
- *
481
- * @return string|null Returns the Content-Disposition header
482
- */
483
- public function getContentDisposition()
484
- {
485
- return (string) $this->getHeader('Content-Disposition');
486
- }
487
-
488
- /**
489
- * Get the Content-MD5 HTTP header
490
- *
491
- * @return string|null Returns a Base64-encoded binary MD5 sum of the content of the response.
492
- */
493
- public function getContentMd5()
494
- {
495
- return (string) $this->getHeader('Content-MD5');
496
- }
497
-
498
- /**
499
- * Get the Content-Range HTTP header
500
- *
501
- * @return string Returns where in a full body message this partial message belongs (e.g. bytes 21010-47021/47022).
502
- */
503
- public function getContentRange()
504
- {
505
- return (string) $this->getHeader('Content-Range');
506
- }
507
-
508
- /**
509
- * Get the Content-Type HTTP header
510
- *
511
- * @return string Returns the mime type of this content.
512
- */
513
- public function getContentType()
514
- {
515
- return (string) $this->getHeader('Content-Type');
516
- }
517
-
518
- /**
519
- * Checks if the Content-Type is of a certain type. This is useful if the
520
- * Content-Type header contains charset information and you need to know if
521
- * the Content-Type matches a particular type.
522
- *
523
- * @param string $type Content type to check against
524
- *
525
- * @return bool
526
- */
527
- public function isContentType($type)
528
- {
529
- return stripos($this->getHeader('Content-Type'), $type) !== false;
530
- }
531
-
532
- /**
533
- * Get the Date HTTP header
534
- *
535
- * @return string|null Returns the date and time that the message was sent.
536
- */
537
- public function getDate()
538
- {
539
- return (string) $this->getHeader('Date');
540
- }
541
-
542
- /**
543
- * Get the ETag HTTP header
544
- *
545
- * @return string|null Returns an identifier for a specific version of a resource, often a Message digest.
546
- */
547
- public function getEtag()
548
- {
549
- return (string) $this->getHeader('ETag');
550
- }
551
-
552
- /**
553
- * Get the Expires HTTP header
554
- *
555
- * @return string|null Returns the date/time after which the response is considered stale.
556
- */
557
- public function getExpires()
558
- {
559
- return (string) $this->getHeader('Expires');
560
- }
561
-
562
- /**
563
- * Get the Last-Modified HTTP header
564
- *
565
- * @return string|null Returns the last modified date for the requested object, in RFC 2822 format
566
- * (e.g. Tue, 15 Nov 1994 12:45:26 GMT)
567
- */
568
- public function getLastModified()
569
- {
570
- return (string) $this->getHeader('Last-Modified');
571
- }
572
-
573
- /**
574
- * Get the Location HTTP header
575
- *
576
- * @return string|null Used in redirection, or when a new resource has been created.
577
- */
578
- public function getLocation()
579
- {
580
- return (string) $this->getHeader('Location');
581
- }
582
-
583
- /**
584
- * Get the Pragma HTTP header
585
- *
586
- * @return Header|null Returns the implementation-specific headers that may have various effects anywhere along
587
- * the request-response chain.
588
- */
589
- public function getPragma()
590
- {
591
- return (string) $this->getHeader('Pragma');
592
- }
593
-
594
- /**
595
- * Get the Proxy-Authenticate HTTP header
596
- *
597
- * @return string|null Authentication to access the proxy (e.g. Basic)
598
- */
599
- public function getProxyAuthenticate()
600
- {
601
- return (string) $this->getHeader('Proxy-Authenticate');
602
- }
603
-
604
- /**
605
- * Get the Retry-After HTTP header
606
- *
607
- * @return int|null If an entity is temporarily unavailable, this instructs the client to try again after a
608
- * specified period of time.
609
- */
610
- public function getRetryAfter()
611
- {
612
- return (string) $this->getHeader('Retry-After');
613
- }
614
-
615
- /**
616
- * Get the Server HTTP header
617
- *
618
- * @return string|null A name for the server
619
- */
620
- public function getServer()
621
- {
622
- return (string) $this->getHeader('Server');
623
- }
624
-
625
- /**
626
- * Get the Set-Cookie HTTP header
627
- *
628
- * @return string|null An HTTP cookie.
629
- */
630
- public function getSetCookie()
631
- {
632
- return (string) $this->getHeader('Set-Cookie');
633
- }
634
-
635
- /**
636
- * Get the Trailer HTTP header
637
- *
638
- * @return string|null The Trailer general field value indicates that the given set of header fields is present in
639
- * the trailer of a message encoded with chunked transfer-coding.
640
- */
641
- public function getTrailer()
642
- {
643
- return (string) $this->getHeader('Trailer');
644
- }
645
-
646
- /**
647
- * Get the Transfer-Encoding HTTP header
648
- *
649
- * @return string|null The form of encoding used to safely transfer the entity to the user
650
- */
651
- public function getTransferEncoding()
652
- {
653
- return (string) $this->getHeader('Transfer-Encoding');
654
- }
655
-
656
- /**
657
- * Get the Vary HTTP header
658
- *
659
- * @return string|null Tells downstream proxies how to match future request headers to decide whether the cached
660
- * response can be used rather than requesting a fresh one from the origin server.
661
- */
662
- public function getVary()
663
- {
664
- return (string) $this->getHeader('Vary');
665
- }
666
-
667
- /**
668
- * Get the Via HTTP header
669
- *
670
- * @return string|null Informs the client of proxies through which the response was sent.
671
- */
672
- public function getVia()
673
- {
674
- return (string) $this->getHeader('Via');
675
- }
676
-
677
- /**
678
- * Get the Warning HTTP header
679
- *
680
- * @return string|null A general warning about possible problems with the entity body
681
- */
682
- public function getWarning()
683
- {
684
- return (string) $this->getHeader('Warning');
685
- }
686
-
687
- /**
688
- * Get the WWW-Authenticate HTTP header
689
- *
690
- * @return string|null Indicates the authentication scheme that should be used to access the requested entity
691
- */
692
- public function getWwwAuthenticate()
693
- {
694
- return (string) $this->getHeader('WWW-Authenticate');
695
- }
696
-
697
- /**
698
- * Checks if HTTP Status code is a Client Error (4xx)
699
- *
700
- * @return bool
701
- */
702
- public function isClientError()
703
- {
704
- return $this->statusCode >= 400 && $this->statusCode < 500;
705
- }
706
-
707
- /**
708
- * Checks if HTTP Status code is Server OR Client Error (4xx or 5xx)
709
- *
710
- * @return boolean
711
- */
712
- public function isError()
713
- {
714
- return $this->isClientError() || $this->isServerError();
715
- }
716
-
717
- /**
718
- * Checks if HTTP Status code is Information (1xx)
719
- *
720
- * @return bool
721
- */
722
- public function isInformational()
723
- {
724
- return $this->statusCode < 200;
725
- }
726
-
727
- /**
728
- * Checks if HTTP Status code is a Redirect (3xx)
729
- *
730
- * @return bool
731
- */
732
- public function isRedirect()
733
- {
734
- return $this->statusCode >= 300 && $this->statusCode < 400;
735
- }
736
-
737
- /**
738
- * Checks if HTTP Status code is Server Error (5xx)
739
- *
740
- * @return bool
741
- */
742
- public function isServerError()
743
- {
744
- return $this->statusCode >= 500 && $this->statusCode < 600;
745
- }
746
-
747
- /**
748
- * Checks if HTTP Status code is Successful (2xx | 304)
749
- *
750
- * @return bool
751
- */
752
- public function isSuccessful()
753
- {
754
- return ($this->statusCode >= 200 && $this->statusCode < 300) || $this->statusCode == 304;
755
- }
756
-
757
- /**
758
- * Check if the response can be cached based on the response headers
759
- *
760
- * @return bool Returns TRUE if the response can be cached or false if not
761
- */
762
- public function canCache()
763
- {
764
- // Check if the response is cacheable based on the code
765
- if (!in_array((int) $this->getStatusCode(), self::$cacheResponseCodes)) {
766
- return false;
767
- }
768
-
769
- // Make sure a valid body was returned and can be cached
770
- if ((!$this->getBody()->isReadable() || !$this->getBody()->isSeekable())
771
- && ($this->getContentLength() > 0 || $this->getTransferEncoding() == 'chunked')) {
772
- return false;
773
- }
774
-
775
- // Never cache no-store resources (this is a private cache, so private
776
- // can be cached)
777
- if ($this->getHeader('Cache-Control') && $this->getHeader('Cache-Control')->hasDirective('no-store')) {
778
- return false;
779
- }
780
-
781
- return $this->isFresh() || $this->getFreshness() === null || $this->canValidate();
782
- }
783
-
784
- /**
785
- * Gets the number of seconds from the current time in which this response is still considered fresh
786
- *
787
- * @return int|null Returns the number of seconds
788
- */
789
- public function getMaxAge()
790
- {
791
- if ($header = $this->getHeader('Cache-Control')) {
792
- // s-max-age, then max-age, then Expires
793
- if ($age = $header->getDirective('s-maxage')) {
794
- return $age;
795
- }
796
- if ($age = $header->getDirective('max-age')) {
797
- return $age;
798
- }
799
- }
800
-
801
- if ($this->getHeader('Expires')) {
802
- return strtotime($this->getExpires()) - time();
803
- }
804
-
805
- return null;
806
- }
807
-
808
- /**
809
- * Check if the response is considered fresh.
810
- *
811
- * A response is considered fresh when its age is less than or equal to the freshness lifetime (maximum age) of the
812
- * response.
813
- *
814
- * @return bool|null
815
- */
816
- public function isFresh()
817
- {
818
- $fresh = $this->getFreshness();
819
-
820
- return $fresh === null ? null : $fresh >= 0;
821
- }
822
-
823
- /**
824
- * Check if the response can be validated against the origin server using a conditional GET request.
825
- *
826
- * @return bool
827
- */
828
- public function canValidate()
829
- {
830
- return $this->getEtag() || $this->getLastModified();
831
- }
832
-
833
- /**
834
- * Get the freshness of the response by returning the difference of the maximum lifetime of the response and the
835
- * age of the response (max-age - age).
836
- *
837
- * Freshness values less than 0 mean that the response is no longer fresh and is ABS(freshness) seconds expired.
838
- * Freshness values of greater than zero is the number of seconds until the response is no longer fresh. A NULL
839
- * result means that no freshness information is available.
840
- *
841
- * @return int
842
- */
843
- public function getFreshness()
844
- {
845
- $maxAge = $this->getMaxAge();
846
- $age = $this->calculateAge();
847
-
848
- return $maxAge && $age ? ($maxAge - $age) : null;
849
- }
850
-
851
- /**
852
- * Parse the JSON response body and return an array
853
- *
854
- * @return array|string|int|bool|float
855
- * @throws RuntimeException if the response body is not in JSON format
856
- */
857
- public function json()
858
- {
859
- $data = json_decode((string) $this->body, true);
860
- if (JSON_ERROR_NONE !== json_last_error()) {
861
- throw new RuntimeException('Unable to parse response body into JSON: ' . json_last_error());
862
- }
863
-
864
- return $data === null ? array() : $data;
865
- }
866
-
867
- /**
868
- * Parse the XML response body and return a \SimpleXMLElement.
869
- *
870
- * In order to prevent XXE attacks, this method disables loading external
871
- * entities. If you rely on external entities, then you must parse the
872
- * XML response manually by accessing the response body directly.
873
- *
874
- * @return \SimpleXMLElement
875
- * @throws RuntimeException if the response body is not in XML format
876
- * @link http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html
877
- */
878
- public function xml()
879
- {
880
- $errorMessage = null;
881
- $internalErrors = libxml_use_internal_errors(true);
882
- $disableEntities = libxml_disable_entity_loader(true);
883
- libxml_clear_errors();
884
-
885
- try {
886
- $xml = new \SimpleXMLElement((string) $this->body ?: '<root />', LIBXML_NONET);
887
- if ($error = libxml_get_last_error()) {
888
- $errorMessage = $error->message;
889
- }
890
- } catch (\Exception $e) {
891
- $errorMessage = $e->getMessage();
892
- }
893
-
894
- libxml_clear_errors();
895
- libxml_use_internal_errors($internalErrors);
896
- libxml_disable_entity_loader($disableEntities);
897
-
898
- if ($errorMessage) {
899
- throw new RuntimeException('Unable to parse response body into XML: ' . $errorMessage);
900
- }
901
-
902
- return $xml;
903
- }
904
-
905
- /**
906
- * Get the redirect count of this response
907
- *
908
- * @return int
909
- */
910
- public function getRedirectCount()
911
- {
912
- return (int) $this->params->get(RedirectPlugin::REDIRECT_COUNT);
913
- }
914
-
915
- /**
916
- * Set the effective URL that resulted in this response (e.g. the last redirect URL)
917
- *
918
- * @param string $url The effective URL
919
- *
920
- * @return self
921
- */
922
- public function setEffectiveUrl($url)
923
- {
924
- $this->effectiveUrl = $url;
925
-
926
- return $this;
927
- }
928
-
929
- /**
930
- * Get the effective URL that resulted in this response (e.g. the last redirect URL)
931
- *
932
- * @return string
933
- */
934
- public function getEffectiveUrl()
935
- {
936
- return $this->effectiveUrl;
937
- }
938
-
939
- /**
940
- * @deprecated
941
- * @codeCoverageIgnore
942
- */
943
- public function getPreviousResponse()
944
- {
945
- Version::warn(__METHOD__ . ' is deprecated. Use the HistoryPlugin.');
946
- return null;
947
- }
948
-
949
- /**
950
- * @deprecated
951
- * @codeCoverageIgnore
952
- */
953
- public function setRequest($request)
954
- {
955
- Version::warn(__METHOD__ . ' is deprecated');
956
- return $this;
957
- }
958
-
959
- /**
960
- * @deprecated
961
- * @codeCoverageIgnore
962
- */
963
- public function getRequest()
964
- {
965
- Version::warn(__METHOD__ . ' is deprecated');
966
- return null;
967
- }
968
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php DELETED
@@ -1,962 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- /**
6
- * Provides mappings of file extensions to mimetypes
7
- * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
8
- */
9
- class Mimetypes
10
- {
11
- /** @var self */
12
- protected static $instance;
13
-
14
- /** @var array Mapping of extension to mimetype */
15
- protected $mimetypes = array(
16
- '3dml' => 'text/vnd.in3d.3dml',
17
- '3g2' => 'video/3gpp2',
18
- '3gp' => 'video/3gpp',
19
- '7z' => 'application/x-7z-compressed',
20
- 'aab' => 'application/x-authorware-bin',
21
- 'aac' => 'audio/x-aac',
22
- 'aam' => 'application/x-authorware-map',
23
- 'aas' => 'application/x-authorware-seg',
24
- 'abw' => 'application/x-abiword',
25
- 'ac' => 'application/pkix-attr-cert',
26
- 'acc' => 'application/vnd.americandynamics.acc',
27
- 'ace' => 'application/x-ace-compressed',
28
- 'acu' => 'application/vnd.acucobol',
29
- 'acutc' => 'application/vnd.acucorp',
30
- 'adp' => 'audio/adpcm',
31
- 'aep' => 'application/vnd.audiograph',
32
- 'afm' => 'application/x-font-type1',
33
- 'afp' => 'application/vnd.ibm.modcap',
34
- 'ahead' => 'application/vnd.ahead.space',
35
- 'ai' => 'application/postscript',
36
- 'aif' => 'audio/x-aiff',
37
- 'aifc' => 'audio/x-aiff',
38
- 'aiff' => 'audio/x-aiff',
39
- 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
40
- 'ait' => 'application/vnd.dvb.ait',
41
- 'ami' => 'application/vnd.amiga.ami',
42
- 'apk' => 'application/vnd.android.package-archive',
43
- 'application' => 'application/x-ms-application',
44
- 'apr' => 'application/vnd.lotus-approach',
45
- 'asa' => 'text/plain',
46
- 'asax' => 'application/octet-stream',
47
- 'asc' => 'application/pgp-signature',
48
- 'ascx' => 'text/plain',
49
- 'asf' => 'video/x-ms-asf',
50
- 'ashx' => 'text/plain',
51
- 'asm' => 'text/x-asm',
52
- 'asmx' => 'text/plain',
53
- 'aso' => 'application/vnd.accpac.simply.aso',
54
- 'asp' => 'text/plain',
55
- 'aspx' => 'text/plain',
56
- 'asx' => 'video/x-ms-asf',
57
- 'atc' => 'application/vnd.acucorp',
58
- 'atom' => 'application/atom+xml',
59
- 'atomcat' => 'application/atomcat+xml',
60
- 'atomsvc' => 'application/atomsvc+xml',
61
- 'atx' => 'application/vnd.antix.game-component',
62
- 'au' => 'audio/basic',
63
- 'avi' => 'video/x-msvideo',
64
- 'aw' => 'application/applixware',
65
- 'axd' => 'text/plain',
66
- 'azf' => 'application/vnd.airzip.filesecure.azf',
67
- 'azs' => 'application/vnd.airzip.filesecure.azs',
68
- 'azw' => 'application/vnd.amazon.ebook',
69
- 'bat' => 'application/x-msdownload',
70
- 'bcpio' => 'application/x-bcpio',
71
- 'bdf' => 'application/x-font-bdf',
72
- 'bdm' => 'application/vnd.syncml.dm+wbxml',
73
- 'bed' => 'application/vnd.realvnc.bed',
74
- 'bh2' => 'application/vnd.fujitsu.oasysprs',
75
- 'bin' => 'application/octet-stream',
76
- 'bmi' => 'application/vnd.bmi',
77
- 'bmp' => 'image/bmp',
78
- 'book' => 'application/vnd.framemaker',
79
- 'box' => 'application/vnd.previewsystems.box',
80
- 'boz' => 'application/x-bzip2',
81
- 'bpk' => 'application/octet-stream',
82
- 'btif' => 'image/prs.btif',
83
- 'bz' => 'application/x-bzip',
84
- 'bz2' => 'application/x-bzip2',
85
- 'c' => 'text/x-c',
86
- 'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
87
- 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
88
- 'c4d' => 'application/vnd.clonk.c4group',
89
- 'c4f' => 'application/vnd.clonk.c4group',
90
- 'c4g' => 'application/vnd.clonk.c4group',
91
- 'c4p' => 'application/vnd.clonk.c4group',
92
- 'c4u' => 'application/vnd.clonk.c4group',
93
- 'cab' => 'application/vnd.ms-cab-compressed',
94
- 'car' => 'application/vnd.curl.car',
95
- 'cat' => 'application/vnd.ms-pki.seccat',
96
- 'cc' => 'text/x-c',
97
- 'cct' => 'application/x-director',
98
- 'ccxml' => 'application/ccxml+xml',
99
- 'cdbcmsg' => 'application/vnd.contact.cmsg',
100
- 'cdf' => 'application/x-netcdf',
101
- 'cdkey' => 'application/vnd.mediastation.cdkey',
102
- 'cdmia' => 'application/cdmi-capability',
103
- 'cdmic' => 'application/cdmi-container',
104
- 'cdmid' => 'application/cdmi-domain',
105
- 'cdmio' => 'application/cdmi-object',
106
- 'cdmiq' => 'application/cdmi-queue',
107
- 'cdx' => 'chemical/x-cdx',
108
- 'cdxml' => 'application/vnd.chemdraw+xml',
109
- 'cdy' => 'application/vnd.cinderella',
110
- 'cer' => 'application/pkix-cert',
111
- 'cfc' => 'application/x-coldfusion',
112
- 'cfm' => 'application/x-coldfusion',
113
- 'cgm' => 'image/cgm',
114
- 'chat' => 'application/x-chat',
115
- 'chm' => 'application/vnd.ms-htmlhelp',
116
- 'chrt' => 'application/vnd.kde.kchart',
117
- 'cif' => 'chemical/x-cif',
118
- 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
119
- 'cil' => 'application/vnd.ms-artgalry',
120
- 'cla' => 'application/vnd.claymore',
121
- 'class' => 'application/java-vm',
122
- 'clkk' => 'application/vnd.crick.clicker.keyboard',
123
- 'clkp' => 'application/vnd.crick.clicker.palette',
124
- 'clkt' => 'application/vnd.crick.clicker.template',
125
- 'clkw' => 'application/vnd.crick.clicker.wordbank',
126
- 'clkx' => 'application/vnd.crick.clicker',
127
- 'clp' => 'application/x-msclip',
128
- 'cmc' => 'application/vnd.cosmocaller',
129
- 'cmdf' => 'chemical/x-cmdf',
130
- 'cml' => 'chemical/x-cml',
131
- 'cmp' => 'application/vnd.yellowriver-custom-menu',
132
- 'cmx' => 'image/x-cmx',
133
- 'cod' => 'application/vnd.rim.cod',
134
- 'com' => 'application/x-msdownload',
135
- 'conf' => 'text/plain',
136
- 'cpio' => 'application/x-cpio',
137
- 'cpp' => 'text/x-c',
138
- 'cpt' => 'application/mac-compactpro',
139
- 'crd' => 'application/x-mscardfile',
140
- 'crl' => 'application/pkix-crl',
141
- 'crt' => 'application/x-x509-ca-cert',
142
- 'cryptonote' => 'application/vnd.rig.cryptonote',
143
- 'cs' => 'text/plain',
144
- 'csh' => 'application/x-csh',
145
- 'csml' => 'chemical/x-csml',
146
- 'csp' => 'application/vnd.commonspace',
147
- 'css' => 'text/css',
148
- 'cst' => 'application/x-director',
149
- 'csv' => 'text/csv',
150
- 'cu' => 'application/cu-seeme',
151
- 'curl' => 'text/vnd.curl',
152
- 'cww' => 'application/prs.cww',
153
- 'cxt' => 'application/x-director',
154
- 'cxx' => 'text/x-c',
155
- 'dae' => 'model/vnd.collada+xml',
156
- 'daf' => 'application/vnd.mobius.daf',
157
- 'dataless' => 'application/vnd.fdsn.seed',
158
- 'davmount' => 'application/davmount+xml',
159
- 'dcr' => 'application/x-director',
160
- 'dcurl' => 'text/vnd.curl.dcurl',
161
- 'dd2' => 'application/vnd.oma.dd2+xml',
162
- 'ddd' => 'application/vnd.fujixerox.ddd',
163
- 'deb' => 'application/x-debian-package',
164
- 'def' => 'text/plain',
165
- 'deploy' => 'application/octet-stream',
166
- 'der' => 'application/x-x509-ca-cert',
167
- 'dfac' => 'application/vnd.dreamfactory',
168
- 'dic' => 'text/x-c',
169
- 'dir' => 'application/x-director',
170
- 'dis' => 'application/vnd.mobius.dis',
171
- 'dist' => 'application/octet-stream',
172
- 'distz' => 'application/octet-stream',
173
- 'djv' => 'image/vnd.djvu',
174
- 'djvu' => 'image/vnd.djvu',
175
- 'dll' => 'application/x-msdownload',
176
- 'dmg' => 'application/octet-stream',
177
- 'dms' => 'application/octet-stream',
178
- 'dna' => 'application/vnd.dna',
179
- 'doc' => 'application/msword',
180
- 'docm' => 'application/vnd.ms-word.document.macroenabled.12',
181
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
182
- 'dot' => 'application/msword',
183
- 'dotm' => 'application/vnd.ms-word.template.macroenabled.12',
184
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
185
- 'dp' => 'application/vnd.osgi.dp',
186
- 'dpg' => 'application/vnd.dpgraph',
187
- 'dra' => 'audio/vnd.dra',
188
- 'dsc' => 'text/prs.lines.tag',
189
- 'dssc' => 'application/dssc+der',
190
- 'dtb' => 'application/x-dtbook+xml',
191
- 'dtd' => 'application/xml-dtd',
192
- 'dts' => 'audio/vnd.dts',
193
- 'dtshd' => 'audio/vnd.dts.hd',
194
- 'dump' => 'application/octet-stream',
195
- 'dvi' => 'application/x-dvi',
196
- 'dwf' => 'model/vnd.dwf',
197
- 'dwg' => 'image/vnd.dwg',
198
- 'dxf' => 'image/vnd.dxf',
199
- 'dxp' => 'application/vnd.spotfire.dxp',
200
- 'dxr' => 'application/x-director',
201
- 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
202
- 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
203
- 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
204
- 'ecma' => 'application/ecmascript',
205
- 'edm' => 'application/vnd.novadigm.edm',
206
- 'edx' => 'application/vnd.novadigm.edx',
207
- 'efif' => 'application/vnd.picsel',
208
- 'ei6' => 'application/vnd.pg.osasli',
209
- 'elc' => 'application/octet-stream',
210
- 'eml' => 'message/rfc822',
211
- 'emma' => 'application/emma+xml',
212
- 'eol' => 'audio/vnd.digital-winds',
213
- 'eot' => 'application/vnd.ms-fontobject',
214
- 'eps' => 'application/postscript',
215
- 'epub' => 'application/epub+zip',
216
- 'es3' => 'application/vnd.eszigno3+xml',
217
- 'esf' => 'application/vnd.epson.esf',
218
- 'et3' => 'application/vnd.eszigno3+xml',
219
- 'etx' => 'text/x-setext',
220
- 'exe' => 'application/x-msdownload',
221
- 'exi' => 'application/exi',
222
- 'ext' => 'application/vnd.novadigm.ext',
223
- 'ez' => 'application/andrew-inset',
224
- 'ez2' => 'application/vnd.ezpix-album',
225
- 'ez3' => 'application/vnd.ezpix-package',
226
- 'f' => 'text/x-fortran',
227
- 'f4v' => 'video/x-f4v',
228
- 'f77' => 'text/x-fortran',
229
- 'f90' => 'text/x-fortran',
230
- 'fbs' => 'image/vnd.fastbidsheet',
231
- 'fcs' => 'application/vnd.isac.fcs',
232
- 'fdf' => 'application/vnd.fdf',
233
- 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
234
- 'fg5' => 'application/vnd.fujitsu.oasysgp',
235
- 'fgd' => 'application/x-director',
236
- 'fh' => 'image/x-freehand',
237
- 'fh4' => 'image/x-freehand',
238
- 'fh5' => 'image/x-freehand',
239
- 'fh7' => 'image/x-freehand',
240
- 'fhc' => 'image/x-freehand',
241
- 'fig' => 'application/x-xfig',
242
- 'fli' => 'video/x-fli',
243
- 'flo' => 'application/vnd.micrografx.flo',
244
- 'flv' => 'video/x-flv',
245
- 'flw' => 'application/vnd.kde.kivio',
246
- 'flx' => 'text/vnd.fmi.flexstor',
247
- 'fly' => 'text/vnd.fly',
248
- 'fm' => 'application/vnd.framemaker',
249
- 'fnc' => 'application/vnd.frogans.fnc',
250
- 'for' => 'text/x-fortran',
251
- 'fpx' => 'image/vnd.fpx',
252
- 'frame' => 'application/vnd.framemaker',
253
- 'fsc' => 'application/vnd.fsc.weblaunch',
254
- 'fst' => 'image/vnd.fst',
255
- 'ftc' => 'application/vnd.fluxtime.clip',
256
- 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
257
- 'fvt' => 'video/vnd.fvt',
258
- 'fxp' => 'application/vnd.adobe.fxp',
259
- 'fxpl' => 'application/vnd.adobe.fxp',
260
- 'fzs' => 'application/vnd.fuzzysheet',
261
- 'g2w' => 'application/vnd.geoplan',
262
- 'g3' => 'image/g3fax',
263
- 'g3w' => 'application/vnd.geospace',
264
- 'gac' => 'application/vnd.groove-account',
265
- 'gdl' => 'model/vnd.gdl',
266
- 'geo' => 'application/vnd.dynageo',
267
- 'gex' => 'application/vnd.geometry-explorer',
268
- 'ggb' => 'application/vnd.geogebra.file',
269
- 'ggt' => 'application/vnd.geogebra.tool',
270
- 'ghf' => 'application/vnd.groove-help',
271
- 'gif' => 'image/gif',
272
- 'gim' => 'application/vnd.groove-identity-message',
273
- 'gmx' => 'application/vnd.gmx',
274
- 'gnumeric' => 'application/x-gnumeric',
275
- 'gph' => 'application/vnd.flographit',
276
- 'gqf' => 'application/vnd.grafeq',
277
- 'gqs' => 'application/vnd.grafeq',
278
- 'gram' => 'application/srgs',
279
- 'gre' => 'application/vnd.geometry-explorer',
280
- 'grv' => 'application/vnd.groove-injector',
281
- 'grxml' => 'application/srgs+xml',
282
- 'gsf' => 'application/x-font-ghostscript',
283
- 'gtar' => 'application/x-gtar',
284
- 'gtm' => 'application/vnd.groove-tool-message',
285
- 'gtw' => 'model/vnd.gtw',
286
- 'gv' => 'text/vnd.graphviz',
287
- 'gxt' => 'application/vnd.geonext',
288
- 'h' => 'text/x-c',
289
- 'h261' => 'video/h261',
290
- 'h263' => 'video/h263',
291
- 'h264' => 'video/h264',
292
- 'hal' => 'application/vnd.hal+xml',
293
- 'hbci' => 'application/vnd.hbci',
294
- 'hdf' => 'application/x-hdf',
295
- 'hh' => 'text/x-c',
296
- 'hlp' => 'application/winhlp',
297
- 'hpgl' => 'application/vnd.hp-hpgl',
298
- 'hpid' => 'application/vnd.hp-hpid',
299
- 'hps' => 'application/vnd.hp-hps',
300
- 'hqx' => 'application/mac-binhex40',
301
- 'hta' => 'application/octet-stream',
302
- 'htc' => 'text/html',
303
- 'htke' => 'application/vnd.kenameaapp',
304
- 'htm' => 'text/html',
305
- 'html' => 'text/html',
306
- 'hvd' => 'application/vnd.yamaha.hv-dic',
307
- 'hvp' => 'application/vnd.yamaha.hv-voice',
308
- 'hvs' => 'application/vnd.yamaha.hv-script',
309
- 'i2g' => 'application/vnd.intergeo',
310
- 'icc' => 'application/vnd.iccprofile',
311
- 'ice' => 'x-conference/x-cooltalk',
312
- 'icm' => 'application/vnd.iccprofile',
313
- 'ico' => 'image/x-icon',
314
- 'ics' => 'text/calendar',
315
- 'ief' => 'image/ief',
316
- 'ifb' => 'text/calendar',
317
- 'ifm' => 'application/vnd.shana.informed.formdata',
318
- 'iges' => 'model/iges',
319
- 'igl' => 'application/vnd.igloader',
320
- 'igm' => 'application/vnd.insors.igm',
321
- 'igs' => 'model/iges',
322
- 'igx' => 'application/vnd.micrografx.igx',
323
- 'iif' => 'application/vnd.shana.informed.interchange',
324
- 'imp' => 'application/vnd.accpac.simply.imp',
325
- 'ims' => 'application/vnd.ms-ims',
326
- 'in' => 'text/plain',
327
- 'ini' => 'text/plain',
328
- 'ipfix' => 'application/ipfix',
329
- 'ipk' => 'application/vnd.shana.informed.package',
330
- 'irm' => 'application/vnd.ibm.rights-management',
331
- 'irp' => 'application/vnd.irepository.package+xml',
332
- 'iso' => 'application/octet-stream',
333
- 'itp' => 'application/vnd.shana.informed.formtemplate',
334
- 'ivp' => 'application/vnd.immervision-ivp',
335
- 'ivu' => 'application/vnd.immervision-ivu',
336
- 'jad' => 'text/vnd.sun.j2me.app-descriptor',
337
- 'jam' => 'application/vnd.jam',
338
- 'jar' => 'application/java-archive',
339
- 'java' => 'text/x-java-source',
340
- 'jisp' => 'application/vnd.jisp',
341
- 'jlt' => 'application/vnd.hp-jlyt',
342
- 'jnlp' => 'application/x-java-jnlp-file',
343
- 'joda' => 'application/vnd.joost.joda-archive',
344
- 'jpe' => 'image/jpeg',
345
- 'jpeg' => 'image/jpeg',
346
- 'jpg' => 'image/jpeg',
347
- 'jpgm' => 'video/jpm',
348
- 'jpgv' => 'video/jpeg',
349
- 'jpm' => 'video/jpm',
350
- 'js' => 'text/javascript',
351
- 'json' => 'application/json',
352
- 'kar' => 'audio/midi',
353
- 'karbon' => 'application/vnd.kde.karbon',
354
- 'kfo' => 'application/vnd.kde.kformula',
355
- 'kia' => 'application/vnd.kidspiration',
356
- 'kml' => 'application/vnd.google-earth.kml+xml',
357
- 'kmz' => 'application/vnd.google-earth.kmz',
358
- 'kne' => 'application/vnd.kinar',
359
- 'knp' => 'application/vnd.kinar',
360
- 'kon' => 'application/vnd.kde.kontour',
361
- 'kpr' => 'application/vnd.kde.kpresenter',
362
- 'kpt' => 'application/vnd.kde.kpresenter',
363
- 'ksp' => 'application/vnd.kde.kspread',
364
- 'ktr' => 'application/vnd.kahootz',
365
- 'ktx' => 'image/ktx',
366
- 'ktz' => 'application/vnd.kahootz',
367
- 'kwd' => 'application/vnd.kde.kword',
368
- 'kwt' => 'application/vnd.kde.kword',
369
- 'lasxml' => 'application/vnd.las.las+xml',
370
- 'latex' => 'application/x-latex',
371
- 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
372
- 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
373
- 'les' => 'application/vnd.hhe.lesson-player',
374
- 'lha' => 'application/octet-stream',
375
- 'link66' => 'application/vnd.route66.link66+xml',
376
- 'list' => 'text/plain',
377
- 'list3820' => 'application/vnd.ibm.modcap',
378
- 'listafp' => 'application/vnd.ibm.modcap',
379
- 'log' => 'text/plain',
380
- 'lostxml' => 'application/lost+xml',
381
- 'lrf' => 'application/octet-stream',
382
- 'lrm' => 'application/vnd.ms-lrm',
383
- 'ltf' => 'application/vnd.frogans.ltf',
384
- 'lvp' => 'audio/vnd.lucent.voice',
385
- 'lwp' => 'application/vnd.lotus-wordpro',
386
- 'lzh' => 'application/octet-stream',
387
- 'm13' => 'application/x-msmediaview',
388
- 'm14' => 'application/x-msmediaview',
389
- 'm1v' => 'video/mpeg',
390
- 'm21' => 'application/mp21',
391
- 'm2a' => 'audio/mpeg',
392
- 'm2v' => 'video/mpeg',
393
- 'm3a' => 'audio/mpeg',
394
- 'm3u' => 'audio/x-mpegurl',
395
- 'm3u8' => 'application/vnd.apple.mpegurl',
396
- 'm4a' => 'audio/mp4',
397
- 'm4u' => 'video/vnd.mpegurl',
398
- 'm4v' => 'video/mp4',
399
- 'ma' => 'application/mathematica',
400
- 'mads' => 'application/mads+xml',
401
- 'mag' => 'application/vnd.ecowin.chart',
402
- 'maker' => 'application/vnd.framemaker',
403
- 'man' => 'text/troff',
404
- 'mathml' => 'application/mathml+xml',
405
- 'mb' => 'application/mathematica',
406
- 'mbk' => 'application/vnd.mobius.mbk',
407
- 'mbox' => 'application/mbox',
408
- 'mc1' => 'application/vnd.medcalcdata',
409
- 'mcd' => 'application/vnd.mcd',
410
- 'mcurl' => 'text/vnd.curl.mcurl',
411
- 'mdb' => 'application/x-msaccess',
412
- 'mdi' => 'image/vnd.ms-modi',
413
- 'me' => 'text/troff',
414
- 'mesh' => 'model/mesh',
415
- 'meta4' => 'application/metalink4+xml',
416
- 'mets' => 'application/mets+xml',
417
- 'mfm' => 'application/vnd.mfmp',
418
- 'mgp' => 'application/vnd.osgeo.mapguide.package',
419
- 'mgz' => 'application/vnd.proteus.magazine',
420
- 'mid' => 'audio/midi',
421
- 'midi' => 'audio/midi',
422
- 'mif' => 'application/vnd.mif',
423
- 'mime' => 'message/rfc822',
424
- 'mj2' => 'video/mj2',
425
- 'mjp2' => 'video/mj2',
426
- 'mlp' => 'application/vnd.dolby.mlp',
427
- 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
428
- 'mmf' => 'application/vnd.smaf',
429
- 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
430
- 'mny' => 'application/x-msmoney',
431
- 'mobi' => 'application/x-mobipocket-ebook',
432
- 'mods' => 'application/mods+xml',
433
- 'mov' => 'video/quicktime',
434
- 'movie' => 'video/x-sgi-movie',
435
- 'mp2' => 'audio/mpeg',
436
- 'mp21' => 'application/mp21',
437
- 'mp2a' => 'audio/mpeg',
438
- 'mp3' => 'audio/mpeg',
439
- 'mp4' => 'video/mp4',
440
- 'mp4a' => 'audio/mp4',
441
- 'mp4s' => 'application/mp4',
442
- 'mp4v' => 'video/mp4',
443
- 'mpc' => 'application/vnd.mophun.certificate',
444
- 'mpe' => 'video/mpeg',
445
- 'mpeg' => 'video/mpeg',
446
- 'mpg' => 'video/mpeg',
447
- 'mpg4' => 'video/mp4',
448
- 'mpga' => 'audio/mpeg',
449
- 'mpkg' => 'application/vnd.apple.installer+xml',
450
- 'mpm' => 'application/vnd.blueice.multipass',
451
- 'mpn' => 'application/vnd.mophun.application',
452
- 'mpp' => 'application/vnd.ms-project',
453
- 'mpt' => 'application/vnd.ms-project',
454
- 'mpy' => 'application/vnd.ibm.minipay',
455
- 'mqy' => 'application/vnd.mobius.mqy',
456
- 'mrc' => 'application/marc',
457
- 'mrcx' => 'application/marcxml+xml',
458
- 'ms' => 'text/troff',
459
- 'mscml' => 'application/mediaservercontrol+xml',
460
- 'mseed' => 'application/vnd.fdsn.mseed',
461
- 'mseq' => 'application/vnd.mseq',
462
- 'msf' => 'application/vnd.epson.msf',
463
- 'msh' => 'model/mesh',
464
- 'msi' => 'application/x-msdownload',
465
- 'msl' => 'application/vnd.mobius.msl',
466
- 'msty' => 'application/vnd.muvee.style',
467
- 'mts' => 'model/vnd.mts',
468
- 'mus' => 'application/vnd.musician',
469
- 'musicxml' => 'application/vnd.recordare.musicxml+xml',
470
- 'mvb' => 'application/x-msmediaview',
471
- 'mwf' => 'application/vnd.mfer',
472
- 'mxf' => 'application/mxf',
473
- 'mxl' => 'application/vnd.recordare.musicxml',
474
- 'mxml' => 'application/xv+xml',
475
- 'mxs' => 'application/vnd.triscape.mxs',
476
- 'mxu' => 'video/vnd.mpegurl',
477
- 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
478
- 'n3' => 'text/n3',
479
- 'nb' => 'application/mathematica',
480
- 'nbp' => 'application/vnd.wolfram.player',
481
- 'nc' => 'application/x-netcdf',
482
- 'ncx' => 'application/x-dtbncx+xml',
483
- 'ngdat' => 'application/vnd.nokia.n-gage.data',
484
- 'nlu' => 'application/vnd.neurolanguage.nlu',
485
- 'nml' => 'application/vnd.enliven',
486
- 'nnd' => 'application/vnd.noblenet-directory',
487
- 'nns' => 'application/vnd.noblenet-sealer',
488
- 'nnw' => 'application/vnd.noblenet-web',
489
- 'npx' => 'image/vnd.net-fpx',
490
- 'nsf' => 'application/vnd.lotus-notes',
491
- 'oa2' => 'application/vnd.fujitsu.oasys2',
492
- 'oa3' => 'application/vnd.fujitsu.oasys3',
493
- 'oas' => 'application/vnd.fujitsu.oasys',
494
- 'obd' => 'application/x-msbinder',
495
- 'oda' => 'application/oda',
496
- 'odb' => 'application/vnd.oasis.opendocument.database',
497
- 'odc' => 'application/vnd.oasis.opendocument.chart',
498
- 'odf' => 'application/vnd.oasis.opendocument.formula',
499
- 'odft' => 'application/vnd.oasis.opendocument.formula-template',
500
- 'odg' => 'application/vnd.oasis.opendocument.graphics',
501
- 'odi' => 'application/vnd.oasis.opendocument.image',
502
- 'odm' => 'application/vnd.oasis.opendocument.text-master',
503
- 'odp' => 'application/vnd.oasis.opendocument.presentation',
504
- 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
505
- 'odt' => 'application/vnd.oasis.opendocument.text',
506
- 'oga' => 'audio/ogg',
507
- 'ogg' => 'audio/ogg',
508
- 'ogv' => 'video/ogg',
509
- 'ogx' => 'application/ogg',
510
- 'onepkg' => 'application/onenote',
511
- 'onetmp' => 'application/onenote',
512
- 'onetoc' => 'application/onenote',
513
- 'onetoc2' => 'application/onenote',
514
- 'opf' => 'application/oebps-package+xml',
515
- 'oprc' => 'application/vnd.palm',
516
- 'org' => 'application/vnd.lotus-organizer',
517
- 'osf' => 'application/vnd.yamaha.openscoreformat',
518
- 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
519
- 'otc' => 'application/vnd.oasis.opendocument.chart-template',
520
- 'otf' => 'application/x-font-otf',
521
- 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
522
- 'oth' => 'application/vnd.oasis.opendocument.text-web',
523
- 'oti' => 'application/vnd.oasis.opendocument.image-template',
524
- 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
525
- 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
526
- 'ott' => 'application/vnd.oasis.opendocument.text-template',
527
- 'oxt' => 'application/vnd.openofficeorg.extension',
528
- 'p' => 'text/x-pascal',
529
- 'p10' => 'application/pkcs10',
530
- 'p12' => 'application/x-pkcs12',
531
- 'p7b' => 'application/x-pkcs7-certificates',
532
- 'p7c' => 'application/pkcs7-mime',
533
- 'p7m' => 'application/pkcs7-mime',
534
- 'p7r' => 'application/x-pkcs7-certreqresp',
535
- 'p7s' => 'application/pkcs7-signature',
536
- 'p8' => 'application/pkcs8',
537
- 'pas' => 'text/x-pascal',
538
- 'paw' => 'application/vnd.pawaafile',
539
- 'pbd' => 'application/vnd.powerbuilder6',
540
- 'pbm' => 'image/x-portable-bitmap',
541
- 'pcf' => 'application/x-font-pcf',
542
- 'pcl' => 'application/vnd.hp-pcl',
543
- 'pclxl' => 'application/vnd.hp-pclxl',
544
- 'pct' => 'image/x-pict',
545
- 'pcurl' => 'application/vnd.curl.pcurl',
546
- 'pcx' => 'image/x-pcx',
547
- 'pdb' => 'application/vnd.palm',
548
- 'pdf' => 'application/pdf',
549
- 'pfa' => 'application/x-font-type1',
550
- 'pfb' => 'application/x-font-type1',
551
- 'pfm' => 'application/x-font-type1',
552
- 'pfr' => 'application/font-tdpfr',
553
- 'pfx' => 'application/x-pkcs12',
554
- 'pgm' => 'image/x-portable-graymap',
555
- 'pgn' => 'application/x-chess-pgn',
556
- 'pgp' => 'application/pgp-encrypted',
557
- 'php' => 'text/x-php',
558
- 'phps' => 'application/x-httpd-phps',
559
- 'pic' => 'image/x-pict',
560
- 'pkg' => 'application/octet-stream',
561
- 'pki' => 'application/pkixcmp',
562
- 'pkipath' => 'application/pkix-pkipath',
563
- 'plb' => 'application/vnd.3gpp.pic-bw-large',
564
- 'plc' => 'application/vnd.mobius.plc',
565
- 'plf' => 'application/vnd.pocketlearn',
566
- 'pls' => 'application/pls+xml',
567
- 'pml' => 'application/vnd.ctc-posml',
568
- 'png' => 'image/png',
569
- 'pnm' => 'image/x-portable-anymap',
570
- 'portpkg' => 'application/vnd.macports.portpkg',
571
- 'pot' => 'application/vnd.ms-powerpoint',
572
- 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12',
573
- 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
574
- 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
575
- 'ppd' => 'application/vnd.cups-ppd',
576
- 'ppm' => 'image/x-portable-pixmap',
577
- 'pps' => 'application/vnd.ms-powerpoint',
578
- 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
579
- 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
580
- 'ppt' => 'application/vnd.ms-powerpoint',
581
- 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
582
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
583
- 'pqa' => 'application/vnd.palm',
584
- 'prc' => 'application/x-mobipocket-ebook',
585
- 'pre' => 'application/vnd.lotus-freelance',
586
- 'prf' => 'application/pics-rules',
587
- 'ps' => 'application/postscript',
588
- 'psb' => 'application/vnd.3gpp.pic-bw-small',
589
- 'psd' => 'image/vnd.adobe.photoshop',
590
- 'psf' => 'application/x-font-linux-psf',
591
- 'pskcxml' => 'application/pskc+xml',
592
- 'ptid' => 'application/vnd.pvi.ptid1',
593
- 'pub' => 'application/x-mspublisher',
594
- 'pvb' => 'application/vnd.3gpp.pic-bw-var',
595
- 'pwn' => 'application/vnd.3m.post-it-notes',
596
- 'pya' => 'audio/vnd.ms-playready.media.pya',
597
- 'pyv' => 'video/vnd.ms-playready.media.pyv',
598
- 'qam' => 'application/vnd.epson.quickanime',
599
- 'qbo' => 'application/vnd.intu.qbo',
600
- 'qfx' => 'application/vnd.intu.qfx',
601
- 'qps' => 'application/vnd.publishare-delta-tree',
602
- 'qt' => 'video/quicktime',
603
- 'qwd' => 'application/vnd.quark.quarkxpress',
604
- 'qwt' => 'application/vnd.quark.quarkxpress',
605
- 'qxb' => 'application/vnd.quark.quarkxpress',
606
- 'qxd' => 'application/vnd.quark.quarkxpress',
607
- 'qxl' => 'application/vnd.quark.quarkxpress',
608
- 'qxt' => 'application/vnd.quark.quarkxpress',
609
- 'ra' => 'audio/x-pn-realaudio',
610
- 'ram' => 'audio/x-pn-realaudio',
611
- 'rar' => 'application/x-rar-compressed',
612
- 'ras' => 'image/x-cmu-raster',
613
- 'rb' => 'text/plain',
614
- 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
615
- 'rdf' => 'application/rdf+xml',
616
- 'rdz' => 'application/vnd.data-vision.rdz',
617
- 'rep' => 'application/vnd.businessobjects',
618
- 'res' => 'application/x-dtbresource+xml',
619
- 'resx' => 'text/xml',
620
- 'rgb' => 'image/x-rgb',
621
- 'rif' => 'application/reginfo+xml',
622
- 'rip' => 'audio/vnd.rip',
623
- 'rl' => 'application/resource-lists+xml',
624
- 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
625
- 'rld' => 'application/resource-lists-diff+xml',
626
- 'rm' => 'application/vnd.rn-realmedia',
627
- 'rmi' => 'audio/midi',
628
- 'rmp' => 'audio/x-pn-realaudio-plugin',
629
- 'rms' => 'application/vnd.jcp.javame.midlet-rms',
630
- 'rnc' => 'application/relax-ng-compact-syntax',
631
- 'roff' => 'text/troff',
632
- 'rp9' => 'application/vnd.cloanto.rp9',
633
- 'rpss' => 'application/vnd.nokia.radio-presets',
634
- 'rpst' => 'application/vnd.nokia.radio-preset',
635
- 'rq' => 'application/sparql-query',
636
- 'rs' => 'application/rls-services+xml',
637
- 'rsd' => 'application/rsd+xml',
638
- 'rss' => 'application/rss+xml',
639
- 'rtf' => 'application/rtf',
640
- 'rtx' => 'text/richtext',
641
- 's' => 'text/x-asm',
642
- 'saf' => 'application/vnd.yamaha.smaf-audio',
643
- 'sbml' => 'application/sbml+xml',
644
- 'sc' => 'application/vnd.ibm.secure-container',
645
- 'scd' => 'application/x-msschedule',
646
- 'scm' => 'application/vnd.lotus-screencam',
647
- 'scq' => 'application/scvp-cv-request',
648
- 'scs' => 'application/scvp-cv-response',
649
- 'scurl' => 'text/vnd.curl.scurl',
650
- 'sda' => 'application/vnd.stardivision.draw',
651
- 'sdc' => 'application/vnd.stardivision.calc',
652
- 'sdd' => 'application/vnd.stardivision.impress',
653
- 'sdkd' => 'application/vnd.solent.sdkm+xml',
654
- 'sdkm' => 'application/vnd.solent.sdkm+xml',
655
- 'sdp' => 'application/sdp',
656
- 'sdw' => 'application/vnd.stardivision.writer',
657
- 'see' => 'application/vnd.seemail',
658
- 'seed' => 'application/vnd.fdsn.seed',
659
- 'sema' => 'application/vnd.sema',
660
- 'semd' => 'application/vnd.semd',
661
- 'semf' => 'application/vnd.semf',
662
- 'ser' => 'application/java-serialized-object',
663
- 'setpay' => 'application/set-payment-initiation',
664
- 'setreg' => 'application/set-registration-initiation',
665
- 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
666
- 'sfs' => 'application/vnd.spotfire.sfs',
667
- 'sgl' => 'application/vnd.stardivision.writer-global',
668
- 'sgm' => 'text/sgml',
669
- 'sgml' => 'text/sgml',
670
- 'sh' => 'application/x-sh',
671
- 'shar' => 'application/x-shar',
672
- 'shf' => 'application/shf+xml',
673
- 'sig' => 'application/pgp-signature',
674
- 'silo' => 'model/mesh',
675
- 'sis' => 'application/vnd.symbian.install',
676
- 'sisx' => 'application/vnd.symbian.install',
677
- 'sit' => 'application/x-stuffit',
678
- 'sitx' => 'application/x-stuffitx',
679
- 'skd' => 'application/vnd.koan',
680
- 'skm' => 'application/vnd.koan',
681
- 'skp' => 'application/vnd.koan',
682
- 'skt' => 'application/vnd.koan',
683
- 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
684
- 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
685
- 'slt' => 'application/vnd.epson.salt',
686
- 'sm' => 'application/vnd.stepmania.stepchart',
687
- 'smf' => 'application/vnd.stardivision.math',
688
- 'smi' => 'application/smil+xml',
689
- 'smil' => 'application/smil+xml',
690
- 'snd' => 'audio/basic',
691
- 'snf' => 'application/x-font-snf',
692
- 'so' => 'application/octet-stream',
693
- 'spc' => 'application/x-pkcs7-certificates',
694
- 'spf' => 'application/vnd.yamaha.smaf-phrase',
695
- 'spl' => 'application/x-futuresplash',
696
- 'spot' => 'text/vnd.in3d.spot',
697
- 'spp' => 'application/scvp-vp-response',
698
- 'spq' => 'application/scvp-vp-request',
699
- 'spx' => 'audio/ogg',
700
- 'src' => 'application/x-wais-source',
701
- 'sru' => 'application/sru+xml',
702
- 'srx' => 'application/sparql-results+xml',
703
- 'sse' => 'application/vnd.kodak-descriptor',
704
- 'ssf' => 'application/vnd.epson.ssf',
705
- 'ssml' => 'application/ssml+xml',
706
- 'st' => 'application/vnd.sailingtracker.track',
707
- 'stc' => 'application/vnd.sun.xml.calc.template',
708
- 'std' => 'application/vnd.sun.xml.draw.template',
709
- 'stf' => 'application/vnd.wt.stf',
710
- 'sti' => 'application/vnd.sun.xml.impress.template',
711
- 'stk' => 'application/hyperstudio',
712
- 'stl' => 'application/vnd.ms-pki.stl',
713
- 'str' => 'application/vnd.pg.format',
714
- 'stw' => 'application/vnd.sun.xml.writer.template',
715
- 'sub' => 'image/vnd.dvb.subtitle',
716
- 'sus' => 'application/vnd.sus-calendar',
717
- 'susp' => 'application/vnd.sus-calendar',
718
- 'sv4cpio' => 'application/x-sv4cpio',
719
- 'sv4crc' => 'application/x-sv4crc',
720
- 'svc' => 'application/vnd.dvb.service',
721
- 'svd' => 'application/vnd.svd',
722
- 'svg' => 'image/svg+xml',
723
- 'svgz' => 'image/svg+xml',
724
- 'swa' => 'application/x-director',
725
- 'swf' => 'application/x-shockwave-flash',
726
- 'swi' => 'application/vnd.aristanetworks.swi',
727
- 'sxc' => 'application/vnd.sun.xml.calc',
728
- 'sxd' => 'application/vnd.sun.xml.draw',
729
- 'sxg' => 'application/vnd.sun.xml.writer.global',
730
- 'sxi' => 'application/vnd.sun.xml.impress',
731
- 'sxm' => 'application/vnd.sun.xml.math',
732
- 'sxw' => 'application/vnd.sun.xml.writer',
733
- 't' => 'text/troff',
734
- 'tao' => 'application/vnd.tao.intent-module-archive',
735
- 'tar' => 'application/x-tar',
736
- 'tcap' => 'application/vnd.3gpp2.tcap',
737
- 'tcl' => 'application/x-tcl',
738
- 'teacher' => 'application/vnd.smart.teacher',
739
- 'tei' => 'application/tei+xml',
740
- 'teicorpus' => 'application/tei+xml',
741
- 'tex' => 'application/x-tex',
742
- 'texi' => 'application/x-texinfo',
743
- 'texinfo' => 'application/x-texinfo',
744
- 'text' => 'text/plain',
745
- 'tfi' => 'application/thraud+xml',
746
- 'tfm' => 'application/x-tex-tfm',
747
- 'thmx' => 'application/vnd.ms-officetheme',
748
- 'tif' => 'image/tiff',
749
- 'tiff' => 'image/tiff',
750
- 'tmo' => 'application/vnd.tmobile-livetv',
751
- 'torrent' => 'application/x-bittorrent',
752
- 'tpl' => 'application/vnd.groove-tool-template',
753
- 'tpt' => 'application/vnd.trid.tpt',
754
- 'tr' => 'text/troff',
755
- 'tra' => 'application/vnd.trueapp',
756
- 'trm' => 'application/x-msterminal',
757
- 'tsd' => 'application/timestamped-data',
758
- 'tsv' => 'text/tab-separated-values',
759
- 'ttc' => 'application/x-font-ttf',
760
- 'ttf' => 'application/x-font-ttf',
761
- 'ttl' => 'text/turtle',
762
- 'twd' => 'application/vnd.simtech-mindmapper',
763
- 'twds' => 'application/vnd.simtech-mindmapper',
764
- 'txd' => 'application/vnd.genomatix.tuxedo',
765
- 'txf' => 'application/vnd.mobius.txf',
766
- 'txt' => 'text/plain',
767
- 'u32' => 'application/x-authorware-bin',
768
- 'udeb' => 'application/x-debian-package',
769
- 'ufd' => 'application/vnd.ufdl',
770
- 'ufdl' => 'application/vnd.ufdl',
771
- 'umj' => 'application/vnd.umajin',
772
- 'unityweb' => 'application/vnd.unity',
773
- 'uoml' => 'application/vnd.uoml+xml',
774
- 'uri' => 'text/uri-list',
775
- 'uris' => 'text/uri-list',
776
- 'urls' => 'text/uri-list',
777
- 'ustar' => 'application/x-ustar',
778
- 'utz' => 'application/vnd.uiq.theme',
779
- 'uu' => 'text/x-uuencode',
780
- 'uva' => 'audio/vnd.dece.audio',
781
- 'uvd' => 'application/vnd.dece.data',
782
- 'uvf' => 'application/vnd.dece.data',
783
- 'uvg' => 'image/vnd.dece.graphic',
784
- 'uvh' => 'video/vnd.dece.hd',
785
- 'uvi' => 'image/vnd.dece.graphic',
786
- 'uvm' => 'video/vnd.dece.mobile',
787
- 'uvp' => 'video/vnd.dece.pd',
788
- 'uvs' => 'video/vnd.dece.sd',
789
- 'uvt' => 'application/vnd.dece.ttml+xml',
790
- 'uvu' => 'video/vnd.uvvu.mp4',
791
- 'uvv' => 'video/vnd.dece.video',
792
- 'uvva' => 'audio/vnd.dece.audio',
793
- 'uvvd' => 'application/vnd.dece.data',
794
- 'uvvf' => 'application/vnd.dece.data',
795
- 'uvvg' => 'image/vnd.dece.graphic',
796
- 'uvvh' => 'video/vnd.dece.hd',
797
- 'uvvi' => 'image/vnd.dece.graphic',
798
- 'uvvm' => 'video/vnd.dece.mobile',
799
- 'uvvp' => 'video/vnd.dece.pd',
800
- 'uvvs' => 'video/vnd.dece.sd',
801
- 'uvvt' => 'application/vnd.dece.ttml+xml',
802
- 'uvvu' => 'video/vnd.uvvu.mp4',
803
- 'uvvv' => 'video/vnd.dece.video',
804
- 'uvvx' => 'application/vnd.dece.unspecified',
805
- 'uvx' => 'application/vnd.dece.unspecified',
806
- 'vcd' => 'application/x-cdlink',
807
- 'vcf' => 'text/x-vcard',
808
- 'vcg' => 'application/vnd.groove-vcard',
809
- 'vcs' => 'text/x-vcalendar',
810
- 'vcx' => 'application/vnd.vcx',
811
- 'vis' => 'application/vnd.visionary',
812
- 'viv' => 'video/vnd.vivo',
813
- 'vor' => 'application/vnd.stardivision.writer',
814
- 'vox' => 'application/x-authorware-bin',
815
- 'vrml' => 'model/vrml',
816
- 'vsd' => 'application/vnd.visio',
817
- 'vsf' => 'application/vnd.vsf',
818
- 'vss' => 'application/vnd.visio',
819
- 'vst' => 'application/vnd.visio',
820
- 'vsw' => 'application/vnd.visio',
821
- 'vtu' => 'model/vnd.vtu',
822
- 'vxml' => 'application/voicexml+xml',
823
- 'w3d' => 'application/x-director',
824
- 'wad' => 'application/x-doom',
825
- 'wav' => 'audio/x-wav',
826
- 'wax' => 'audio/x-ms-wax',
827
- 'wbmp' => 'image/vnd.wap.wbmp',
828
- 'wbs' => 'application/vnd.criticaltools.wbs+xml',
829
- 'wbxml' => 'application/vnd.wap.wbxml',
830
- 'wcm' => 'application/vnd.ms-works',
831
- 'wdb' => 'application/vnd.ms-works',
832
- 'weba' => 'audio/webm',
833
- 'webm' => 'video/webm',
834
- 'webp' => 'image/webp',
835
- 'wg' => 'application/vnd.pmi.widget',
836
- 'wgt' => 'application/widget',
837
- 'wks' => 'application/vnd.ms-works',
838
- 'wm' => 'video/x-ms-wm',
839
- 'wma' => 'audio/x-ms-wma',
840
- 'wmd' => 'application/x-ms-wmd',
841
- 'wmf' => 'application/x-msmetafile',
842
- 'wml' => 'text/vnd.wap.wml',
843
- 'wmlc' => 'application/vnd.wap.wmlc',
844
- 'wmls' => 'text/vnd.wap.wmlscript',
845
- 'wmlsc' => 'application/vnd.wap.wmlscriptc',
846
- 'wmv' => 'video/x-ms-wmv',
847
- 'wmx' => 'video/x-ms-wmx',
848
- 'wmz' => 'application/x-ms-wmz',
849
- 'woff' => 'application/x-font-woff',
850
- 'wpd' => 'application/vnd.wordperfect',
851
- 'wpl' => 'application/vnd.ms-wpl',
852
- 'wps' => 'application/vnd.ms-works',
853
- 'wqd' => 'application/vnd.wqd',
854
- 'wri' => 'application/x-mswrite',
855
- 'wrl' => 'model/vrml',
856
- 'wsdl' => 'application/wsdl+xml',
857
- 'wspolicy' => 'application/wspolicy+xml',
858
- 'wtb' => 'application/vnd.webturbo',
859
- 'wvx' => 'video/x-ms-wvx',
860
- 'x32' => 'application/x-authorware-bin',
861
- 'x3d' => 'application/vnd.hzn-3d-crossword',
862
- 'xap' => 'application/x-silverlight-app',
863
- 'xar' => 'application/vnd.xara',
864
- 'xbap' => 'application/x-ms-xbap',
865
- 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
866
- 'xbm' => 'image/x-xbitmap',
867
- 'xdf' => 'application/xcap-diff+xml',
868
- 'xdm' => 'application/vnd.syncml.dm+xml',
869
- 'xdp' => 'application/vnd.adobe.xdp+xml',
870
- 'xdssc' => 'application/dssc+xml',
871
- 'xdw' => 'application/vnd.fujixerox.docuworks',
872
- 'xenc' => 'application/xenc+xml',
873
- 'xer' => 'application/patch-ops-error+xml',
874
- 'xfdf' => 'application/vnd.adobe.xfdf',
875
- 'xfdl' => 'application/vnd.xfdl',
876
- 'xht' => 'application/xhtml+xml',
877
- 'xhtml' => 'application/xhtml+xml',
878
- 'xhvml' => 'application/xv+xml',
879
- 'xif' => 'image/vnd.xiff',
880
- 'xla' => 'application/vnd.ms-excel',
881
- 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12',
882
- 'xlc' => 'application/vnd.ms-excel',
883
- 'xlm' => 'application/vnd.ms-excel',
884
- 'xls' => 'application/vnd.ms-excel',
885
- 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
886
- 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12',
887
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
888
- 'xlt' => 'application/vnd.ms-excel',
889
- 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12',
890
- 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
891
- 'xlw' => 'application/vnd.ms-excel',
892
- 'xml' => 'application/xml',
893
- 'xo' => 'application/vnd.olpc-sugar',
894
- 'xop' => 'application/xop+xml',
895
- 'xpi' => 'application/x-xpinstall',
896
- 'xpm' => 'image/x-xpixmap',
897
- 'xpr' => 'application/vnd.is-xpr',
898
- 'xps' => 'application/vnd.ms-xpsdocument',
899
- 'xpw' => 'application/vnd.intercon.formnet',
900
- 'xpx' => 'application/vnd.intercon.formnet',
901
- 'xsl' => 'application/xml',
902
- 'xslt' => 'application/xslt+xml',
903
- 'xsm' => 'application/vnd.syncml+xml',
904
- 'xspf' => 'application/xspf+xml',
905
- 'xul' => 'application/vnd.mozilla.xul+xml',
906
- 'xvm' => 'application/xv+xml',
907
- 'xvml' => 'application/xv+xml',
908
- 'xwd' => 'image/x-xwindowdump',
909
- 'xyz' => 'chemical/x-xyz',
910
- 'yaml' => 'text/yaml',
911
- 'yang' => 'application/yang',
912
- 'yin' => 'application/yin+xml',
913
- 'yml' => 'text/yaml',
914
- 'zaz' => 'application/vnd.zzazz.deck+xml',
915
- 'zip' => 'application/zip',
916
- 'zir' => 'application/vnd.zul',
917
- 'zirz' => 'application/vnd.zul',
918
- 'zmm' => 'application/vnd.handheld-entertainment+xml'
919
- );
920
-
921
- /**
922
- * Get a singleton instance of the class
923
- *
924
- * @return self
925
- * @codeCoverageIgnore
926
- */
927
- public static function getInstance()
928
- {
929
- if (!self::$instance) {
930
- self::$instance = new self();
931
- }
932
-
933
- return self::$instance;
934
- }
935
-
936
- /**
937
- * Get a mimetype value from a file extension
938
- *
939
- * @param string $extension File extension
940
- *
941
- * @return string|null
942
- *
943
- */
944
- public function fromExtension($extension)
945
- {
946
- $extension = strtolower($extension);
947
-
948
- return isset($this->mimetypes[$extension]) ? $this->mimetypes[$extension] : null;
949
- }
950
-
951
- /**
952
- * Get a mimetype from a filename
953
- *
954
- * @param string $filename Filename to generate a mimetype from
955
- *
956
- * @return string|null
957
- */
958
- public function fromFilename($filename)
959
- {
960
- return $this->fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
961
- }
962
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\QueryAggregator;
4
-
5
- use Guzzle\Http\QueryString;
6
-
7
- /**
8
- * Aggregates nested query string variables using commas
9
- */
10
- class CommaAggregator implements QueryAggregatorInterface
11
- {
12
- public function aggregate($key, $value, QueryString $query)
13
- {
14
- if ($query->isUrlEncoding()) {
15
- return array($query->encodeValue($key) => implode(',', array_map(array($query, 'encodeValue'), $value)));
16
- } else {
17
- return array($key => implode(',', $value));
18
- }
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\QueryAggregator;
4
-
5
- use Guzzle\Http\QueryString;
6
-
7
- /**
8
- * Does not aggregate nested query string values and allows duplicates in the resulting array
9
- *
10
- * Example: http://test.com?q=1&q=2
11
- */
12
- class DuplicateAggregator implements QueryAggregatorInterface
13
- {
14
- public function aggregate($key, $value, QueryString $query)
15
- {
16
- if ($query->isUrlEncoding()) {
17
- return array($query->encodeValue($key) => array_map(array($query, 'encodeValue'), $value));
18
- } else {
19
- return array($key => $value);
20
- }
21
- }
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\QueryAggregator;
4
-
5
- use Guzzle\Http\QueryString;
6
-
7
- /**
8
- * Aggregates nested query string variables using PHP style []
9
- */
10
- class PhpAggregator implements QueryAggregatorInterface
11
- {
12
- public function aggregate($key, $value, QueryString $query)
13
- {
14
- $ret = array();
15
-
16
- foreach ($value as $k => $v) {
17
- $k = "{$key}[{$k}]";
18
- if (is_array($v)) {
19
- $ret = array_merge($ret, self::aggregate($k, $v, $query));
20
- } else {
21
- $ret[$query->encodeValue($k)] = $query->encodeValue($v);
22
- }
23
- }
24
-
25
- return $ret;
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http\QueryAggregator;
4
-
5
- use Guzzle\Http\QueryString;
6
-
7
- /**
8
- * Interface used for aggregating nested query string variables into a flattened array of key value pairs
9
- */
10
- interface QueryAggregatorInterface
11
- {
12
- /**
13
- * Aggregate multi-valued parameters into a flattened associative array
14
- *
15
- * @param string $key The name of the query string parameter
16
- * @param array $value The values of the parameter
17
- * @param QueryString $query The query string that is being aggregated
18
- *
19
- * @return array Returns an array of the combined values
20
- */
21
- public function aggregate($key, $value, QueryString $query);
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/QueryString.php DELETED
@@ -1,276 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Collection;
6
- use Guzzle\Http\QueryAggregator\DuplicateAggregator;
7
- use Guzzle\Http\QueryAggregator\QueryAggregatorInterface;
8
- use Guzzle\Http\QueryAggregator\PhpAggregator;
9
-
10
- /**
11
- * Query string object to handle managing query string parameters and aggregating those parameters together as a string.
12
- */
13
- class QueryString extends Collection
14
- {
15
- /** @var string Used to URL encode with rawurlencode */
16
- const RFC_3986 = 'RFC 3986';
17
-
18
- /** @var string Used to encode with urlencode */
19
- const FORM_URLENCODED = 'application/x-www-form-urlencoded';
20
-
21
- /** @var string Constant used to create blank query string values (e.g. ?foo) */
22
- const BLANK = "_guzzle_blank_";
23
-
24
- /** @var string The query string field separator (e.g. '&') */
25
- protected $fieldSeparator = '&';
26
-
27
- /** @var string The query string value separator (e.g. '=') */
28
- protected $valueSeparator = '=';
29
-
30
- /** @var bool URL encode fields and values */
31
- protected $urlEncode = 'RFC 3986';
32
-
33
- /** @var QueryAggregatorInterface */
34
- protected $aggregator;
35
-
36
- /** @var array Cached PHP aggregator */
37
- private static $defaultAggregator = null;
38
-
39
- /**
40
- * Parse a query string into a QueryString object
41
- *
42
- * @param string $query Query string to parse
43
- *
44
- * @return self
45
- */
46
- public static function fromString($query)
47
- {
48
- $q = new static();
49
- if ($query === '') {
50
- return $q;
51
- }
52
-
53
- $foundDuplicates = $foundPhpStyle = false;
54
-
55
- foreach (explode('&', $query) as $kvp) {
56
- $parts = explode('=', $kvp, 2);
57
- $key = rawurldecode($parts[0]);
58
- if ($paramIsPhpStyleArray = substr($key, -2) == '[]') {
59
- $foundPhpStyle = true;
60
- $key = substr($key, 0, -2);
61
- }
62
- if (isset($parts[1])) {
63
- $value = rawurldecode(str_replace('+', '%20', $parts[1]));
64
- if (isset($q[$key])) {
65
- $q->add($key, $value);
66
- $foundDuplicates = true;
67
- } elseif ($paramIsPhpStyleArray) {
68
- $q[$key] = array($value);
69
- } else {
70
- $q[$key] = $value;
71
- }
72
- } else {
73
- $q->add($key, self::BLANK);
74
- }
75
- }
76
-
77
- // Use the duplicate aggregator if duplicates were found and not using PHP style arrays
78
- if ($foundDuplicates && !$foundPhpStyle) {
79
- $q->setAggregator(new DuplicateAggregator());
80
- }
81
-
82
- return $q;
83
- }
84
-
85
- /**
86
- * Convert the query string parameters to a query string string
87
- *
88
- * @return string
89
- */
90
- public function __toString()
91
- {
92
- if (!$this->data) {
93
- return '';
94
- }
95
-
96
- $queryString = '';
97
-
98
- foreach ($this->prepareData($this->data) as $name => $value) {
99
- foreach ((array) $value as $v) {
100
- if ($queryString) {
101
- $queryString .= $this->fieldSeparator;
102
- }
103
- $queryString .= $name;
104
- if ($v !== self::BLANK) {
105
- $queryString .= $this->valueSeparator . $v;
106
- }
107
- }
108
- }
109
-
110
- return $queryString;
111
- }
112
-
113
- /**
114
- * Get the query string field separator
115
- *
116
- * @return string
117
- */
118
- public function getFieldSeparator()
119
- {
120
- return $this->fieldSeparator;
121
- }
122
-
123
- /**
124
- * Get the query string value separator
125
- *
126
- * @return string
127
- */
128
- public function getValueSeparator()
129
- {
130
- return $this->valueSeparator;
131
- }
132
-
133
- /**
134
- * Returns the type of URL encoding used by the query string
135
- *
136
- * One of: false, "RFC 3986", or "application/x-www-form-urlencoded"
137
- *
138
- * @return bool|string
139
- */
140
- public function getUrlEncoding()
141
- {
142
- return $this->urlEncode;
143
- }
144
-
145
- /**
146
- * Returns true or false if using URL encoding
147
- *
148
- * @return bool
149
- */
150
- public function isUrlEncoding()
151
- {
152
- return $this->urlEncode !== false;
153
- }
154
-
155
- /**
156
- * Provide a function for combining multi-valued query string parameters into a single or multiple fields
157
- *
158
- * @param null|QueryAggregatorInterface $aggregator Pass in a QueryAggregatorInterface object to handle converting
159
- * deeply nested query string variables into a flattened array.
160
- * Pass null to use the default PHP style aggregator. For legacy
161
- * reasons, this function accepts a callable that must accepts a
162
- * $key, $value, and query object.
163
- * @return self
164
- * @see \Guzzle\Http\QueryString::aggregateUsingComma()
165
- */
166
- public function setAggregator(QueryAggregatorInterface $aggregator = null)
167
- {
168
- // Use the default aggregator if none was set
169
- if (!$aggregator) {
170
- if (!self::$defaultAggregator) {
171
- self::$defaultAggregator = new PhpAggregator();
172
- }
173
- $aggregator = self::$defaultAggregator;
174
- }
175
-
176
- $this->aggregator = $aggregator;
177
-
178
- return $this;
179
- }
180
-
181
- /**
182
- * Set whether or not field names and values should be rawurlencoded
183
- *
184
- * @param bool|string $encode Set to TRUE to use RFC 3986 encoding (rawurlencode), false to disable encoding, or
185
- * form_urlencoding to use application/x-www-form-urlencoded encoding (urlencode)
186
- * @return self
187
- */
188
- public function useUrlEncoding($encode)
189
- {
190
- $this->urlEncode = ($encode === true) ? self::RFC_3986 : $encode;
191
-
192
- return $this;
193
- }
194
-
195
- /**
196
- * Set the query string separator
197
- *
198
- * @param string $separator The query string separator that will separate fields
199
- *
200
- * @return self
201
- */
202
- public function setFieldSeparator($separator)
203
- {
204
- $this->fieldSeparator = $separator;
205
-
206
- return $this;
207
- }
208
-
209
- /**
210
- * Set the query string value separator
211
- *
212
- * @param string $separator The query string separator that will separate values from fields
213
- *
214
- * @return self
215
- */
216
- public function setValueSeparator($separator)
217
- {
218
- $this->valueSeparator = $separator;
219
-
220
- return $this;
221
- }
222
-
223
- /**
224
- * Returns an array of url encoded field names and values
225
- *
226
- * @return array
227
- */
228
- public function urlEncode()
229
- {
230
- return $this->prepareData($this->data);
231
- }
232
-
233
- /**
234
- * URL encodes a value based on the url encoding type of the query string object
235
- *
236
- * @param string $value Value to encode
237
- *
238
- * @return string
239
- */
240
- public function encodeValue($value)
241
- {
242
- if ($this->urlEncode == self::RFC_3986) {
243
- return rawurlencode($value);
244
- } elseif ($this->urlEncode == self::FORM_URLENCODED) {
245
- return urlencode($value);
246
- } else {
247
- return (string) $value;
248
- }
249
- }
250
-
251
- /**
252
- * Url encode parameter data and convert nested query strings into a flattened hash.
253
- *
254
- * @param array $data The data to encode
255
- *
256
- * @return array Returns an array of encoded values and keys
257
- */
258
- protected function prepareData(array $data)
259
- {
260
- // If no aggregator is present then set the default
261
- if (!$this->aggregator) {
262
- $this->setAggregator(null);
263
- }
264
-
265
- $temp = array();
266
- foreach ($data as $key => $value) {
267
- if (is_array($value)) {
268
- $temp = array_merge($temp, $this->aggregator->aggregate($key, $value, $this));
269
- } else {
270
- $temp[$this->encodeValue($key)] = $this->encodeValue($value);
271
- }
272
- }
273
-
274
- return $temp;
275
- }
276
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php DELETED
@@ -1,105 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- /**
6
- * EntityBody decorator used to return only a subset of an entity body
7
- */
8
- class ReadLimitEntityBody extends AbstractEntityBodyDecorator
9
- {
10
- /** @var int Limit the number of bytes that can be read */
11
- protected $limit;
12
-
13
- /** @var int Offset to start reading from */
14
- protected $offset;
15
-
16
- /**
17
- * @param EntityBodyInterface $body Body to wrap
18
- * @param int $limit Total number of bytes to allow to be read from the stream
19
- * @param int $offset Position to seek to before reading (only works on seekable streams)
20
- */
21
- public function __construct(EntityBodyInterface $body, $limit, $offset = 0)
22
- {
23
- parent::__construct($body);
24
- $this->setLimit($limit)->setOffset($offset);
25
- }
26
-
27
- /**
28
- * Returns only a subset of the decorated entity body when cast as a string
29
- * {@inheritdoc}
30
- */
31
- public function __toString()
32
- {
33
- return substr((string) $this->body, $this->offset, $this->limit) ?: '';
34
- }
35
-
36
- public function isConsumed()
37
- {
38
- return (($this->offset + $this->limit) - $this->body->ftell()) <= 0;
39
- }
40
-
41
- /**
42
- * Returns the Content-Length of the limited subset of data
43
- * {@inheritdoc}
44
- */
45
- public function getContentLength()
46
- {
47
- $length = $this->body->getContentLength();
48
-
49
- return $length === false
50
- ? $this->limit
51
- : min($this->limit, min($length, $this->offset + $this->limit) - $this->offset);
52
- }
53
-
54
- /**
55
- * Allow for a bounded seek on the read limited entity body
56
- * {@inheritdoc}
57
- */
58
- public function seek($offset, $whence = SEEK_SET)
59
- {
60
- return $whence === SEEK_SET
61
- ? $this->body->seek(max($this->offset, min($this->offset + $this->limit, $offset)))
62
- : false;
63
- }
64
-
65
- /**
66
- * Set the offset to start limiting from
67
- *
68
- * @param int $offset Offset to seek to and begin byte limiting from
69
- *
70
- * @return self
71
- */
72
- public function setOffset($offset)
73
- {
74
- $this->body->seek($offset);
75
- $this->offset = $offset;
76
-
77
- return $this;
78
- }
79
-
80
- /**
81
- * Set the limit of bytes that the decorator allows to be read from the stream
82
- *
83
- * @param int $limit Total number of bytes to allow to be read from the stream
84
- *
85
- * @return self
86
- */
87
- public function setLimit($limit)
88
- {
89
- $this->limit = $limit;
90
-
91
- return $this;
92
- }
93
-
94
- public function read($length)
95
- {
96
- // Check if the current position is less than the total allowed bytes + original offset
97
- $remaining = ($this->offset + $this->limit) - $this->body->ftell();
98
- if ($remaining > 0) {
99
- // Only return the amount of requested data, ensuring that the byte limit is not exceeded
100
- return $this->body->read(min($remaining, $length));
101
- } else {
102
- return false;
103
- }
104
- }
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php DELETED
@@ -1,250 +0,0 @@
1
- <?php
2
-
3
- namespace Guzzle\Http;
4
-
5
- use Guzzle\Common\Event;
6
- use Guzzle\Http\Exception\BadResponseException;
7
- use Guzzle\Http\Url;
8
- use Guzzle\Http\Message\Response;
9
- use Guzzle\Http\Message\RequestInterface;
10
- use Guzzle\Http\Message\RequestFactory;
11
- use Guzzle\Http\Message\EntityEnclosingRequestInterface;
12
- use Guzzle\Http\Exception\TooManyRedirectsException;
13
- use Guzzle\Http\Exception\CouldNotRewindStreamException;
14
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15
-
16
- /**
17
- * Plugin to implement HTTP redirects. Can redirect like a web browser or using strict RFC 2616 compliance
18
- */
19
- class RedirectPlugin implements EventSubscriberInterface
20
- {
21
- const REDIRECT_COUNT = 'redirect.count';
22
- const MAX_REDIRECTS = 'redirect.max';
23
- const STRICT_REDIRECTS = 'redirect.strict';
24
- const PARENT_REQUEST = 'redirect.parent_request';
25
- const DISABLE = 'redirect.disable';
26
-
27
- /**
28
- * @var int Default number of redirects allowed when no setting is supplied by a request
29
- */
30
- protected $defaultMaxRedirects = 5;
31
-
32
- public static function getSubscribedEvents()
33
- {
34
- return array(
35
- 'request.sent' => array('onRequestSent', 100),
36
- 'request.clone' => 'cleanupRequest',
37
- 'request.before_send' => 'cleanupRequest'
38
- );
39
- }
40
-
41
- /**
42
- * Clean up the parameters of a request when it is cloned
43
- *
44
- * @param Event $event Event emitted
45
- */
46
- public function cleanupRequest(Event $event)
47
- {
48
- $params = $event['request']->getParams();
49
- unset($params[self::REDIRECT_COUNT]);
50
- unset($params[self::PARENT_REQUEST]);
51
- }
52
-
53
- /**
54
- * Called when a request receives a redirect response
55
- *
56
- * @param Event $event Event emitted
57
- */
58
- public function onRequestSent(Event $event)
59
- {
60
- $response = $event['response'];
61
- $request = $event['request'];
62
-
63
- // Only act on redirect requests with Location headers
64
- if (!$response || $request->getParams()->get(self::DISABLE)) {
65
- return;
66
- }
67
-
68
- // Trace the original request based on parameter history
69
- $original = $this->getOriginalRequest($request);
70
-
71
- // Terminating condition to set the effective response on the original request
72
- if (!$response->isRedirect() || !$response->hasHeader('Location')) {
73
- if ($request !== $original) {
74
- // This is a terminating redirect response, so set it on the original request
75
- $response->getParams()->set(self::REDIRECT_COUNT, $original->getParams()->get(self::REDIRECT_COUNT));
76
- $original->setResponse($response);
77
- $response->setEffectiveUrl($request->getUrl());
78
- }
79
- return;
80
- }
81
-
82
- $this->sendRedirectRequest($original, $request, $response);
83
- }
84
-
85
- /**
86
- * Get the original request that initiated a series of redirects
87
- *
88
- * @param RequestInterface $request Request to get the original request from
89
- *
90
- * @return RequestInterface
91
- */
92
- protected function getOriginalRequest(RequestInterface $request)
93
- {
94
- $original = $request;
95
- // The number of redirects is held on the original request, so determine which request that is
96
- while ($parent = $original->getParams()->get(self::PARENT_REQUEST)) {
97
- $original = $parent;
98
- }
99
-
100
- return $original;
101
- }
102
-
103
- /**
104
- * Create a redirect request for a specific request object
105
- *
106
- * Takes into account strict RFC compliant redirection (e.g. redirect POST with POST) vs doing what most clients do
107
- * (e.g. redirect POST with GET).
108
- *
109
- * @param RequestInterface $request Request being redirected
110
- * @param RequestInterface $original Original request
111
- * @param int $statusCode Status code of the redirect
112
- * @param string $location Location header of the redirect
113
- *
114
- * @return RequestInterface Returns a new redirect request
115
- * @throws CouldNotRewindStreamException If the body needs to be rewound but cannot
116
- */
117
- protected function createRedirectRequest(
118
- RequestInterface $request,
119
- $statusCode,
120
- $location,
121
- RequestInterface $original
122
- ) {
123
- $redirectRequest = null;
124
- $strict = $original->getParams()->get(self::STRICT_REDIRECTS);
125
-
126
- // Switch method to GET for 303 redirects. 301 and 302 redirects also switch to GET unless we are forcing RFC
127
- // compliance to emulate what most browsers do. NOTE: IE only switches methods on 301/302 when coming from a POST.
128
- if ($request instanceof EntityEnclosingRequestInterface && ($statusCode == 303 || (!$strict && $statusCode <= 302))) {
129
- $redirectRequest = RequestFactory::getInstance()->cloneRequestWithMethod($request, 'GET');
130
- } else {
131
- $redirectRequest = clone $request;
132
- }
133
-
134
- $redirectRequest->setIsRedirect(true);
135
- // Always use the same response body when redirecting
136
- $redirectRequest->setResponseBody($request->getResponseBody());
137
-
138
- $location = Url::factory($location);
139
- // If the location is not absolute, then combine it with the original URL
140
- if (!$location->isAbsolute()) {
141
- $originalUrl = $redirectRequest->getUrl(true);
142
- // Remove query string parameters and just take what is present on the redirect Location header
143
- $originalUrl->getQuery()->clear();
144
- $location = $originalUrl->combine((string) $location, true);
145
- }
146
-
147
- $redirectRequest->setUrl($location);
148
-
149
- // Add the parent request to the request before it sends (make sure it's before the onRequestClone event too)
150
- $redirectRequest->getEventDispatcher()->addListener(
151
- 'request.before_send',
152
- $func = function ($e) use (&$func, $request, $redirectRequest) {
153
- $redirectRequest->getEventDispatcher()->removeListener('request.before_send', $func);
154
- $e['request']->getParams()->set(RedirectPlugin::PARENT_REQUEST, $request);
155
- }
156
- );
157
-
158
- // Rewind the entity body of the request if needed
159
- if ($redirectRequest instanceof EntityEnclosingRequestInterface && $redirectRequest->getBody()) {
160
- $body = $redirectRequest->getBody();
161
- // Only rewind the body if some of it has been read already, and throw an exception if the rewind fails
162
- if ($body->ftell() && !$body->rewind()) {
163
- throw new CouldNotRewindStreamException(
164
- 'Unable to rewind the non-seekable entity body of the request after redirecting. cURL probably '
165
- . 'sent part of body before the redirect occurred. Try adding acustom rewind function using on the '
166
- . 'entity body of the request using setRewindFunction().'
167
- );
168
- }
169
- }
170
-
171
- return $redirectRequest;
172
- }
173
-
174
- /**
175
- * Prepare the request for redirection and enforce the maximum number of allowed redirects per client
176
- *
177
- * @param RequestInterface $original Original request
178
- * @param RequestInterface $request Request to prepare and validate
179
- * @param Response $response The current response
180
- *
181
- * @return RequestInterface
182
- */
183
- protected function prepareRedirection(RequestInterface $original, RequestInterface $request, Response $response)
184
- {
185
- $params = $original->getParams();
186
- // This is a new redirect, so increment the redirect counter
187
- $current = $params[self::REDIRECT_COUNT] + 1;
188
- $params[self::REDIRECT_COUNT] = $current;
189
- // Use a provided maximum value or default to a max redirect count of 5
190
- $max = isset($params[self::MAX_REDIRECTS]) ? $params[self::MAX_REDIRECTS] : $this->defaultMaxRedirects;
191
-
192
- // Throw an exception if the redirect count is exceeded
193
- if ($current > $max) {
194
- $this->throwTooManyRedirectsException($original, $max);
195
- return false;
196
- } else {
197
- // Create a redirect request based on the redirect rules set on the request
198
- return $this->createRedirectRequest(
199
- $request,
200
- $response->getStatusCode(),
201
- trim($response->getLocation()),
202
- $original
203
- );
204
- }
205
- }
206
-
207
- /**
208
- * Send a redirect request and handle any errors
209
- *
210
- * @param RequestInterface $original The originating request
211
- * @param RequestInterface $request The current request being redirected
212
- * @param Response $response The response of the current request
213
- *
214
- * @throws BadResponseException|\Exception
215
- */
216
- protected function sendRedirectRequest(RequestInterface $original, RequestInterface $request, Response $response)
217
- {
218
- // Validate and create a redirect request based on the original request and current response
219
- if ($redirectRequest = $this->prepareRedirection($original, $request, $response)) {
220
- try {
221
- $redirectRequest->send();
222
- } catch (BadResponseException $e) {
223
- $e->getResponse();
224
- if (!$e->getResponse()) {
225
- throw $e;
226
- }
227
- }
228
- }
229
- }
230
-
231
- /**
232
- * Throw a too many redirects exception for a request
233
- *
234
- * @param RequestInterface $original Request
235
- * @param int $max Max allowed redirects
236
- *
237
- * @throws TooManyRedirectsException when too many redirects have been issued
238
- */
239
- protected function throwTooManyRedirectsException(RequestInterface $original, $max)
240
- {
241
- $original->getEventDispatcher()->addListener(
242
- 'request.complete',
243
- $func = function ($e) use (&$func, $original, $max) {
244
- $original->getEventDispatcher()->removeListener('request.complete', $func);
245
- $str = "{$max} redirects were issued for this request:\n" . $e['request']->getRawHeaders();
246
- throw new TooManyRedirectsException($str);
247
- }
248
- );
249
- }
250
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem DELETED
@@ -1,3554 +0,0 @@
1
- ##
2
- ## ca-bundle.crt -- Bundle of CA Root Certificates
3
- ##
4
- ## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012
5
- ##
6
- ## This is a bundle of X.509 certificates of public Certificate Authorities
7
- ## (CA). These were automatically extracted from Mozilla's root certificates
8
- ## file (certdata.txt). This file can be found in the mozilla source tree:
9
- ## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
10
- ##
11
- ## It contains the certificates in PEM format and therefore
12
- ## can be directly used with curl / libcurl / php_curl, or with
13
- ## an Apache+mod_ssl webserver for SSL client authentication.
14
- ## Just configure this file as the SSLCACertificateFile.
15
- ##
16
-
17
- # @(#) $RCSfile: certdata.txt,v $ $Revision: 1.87 $ $Date: 2012/12/29 16:32:45 $
18
-
19
- GTE CyberTrust Global Root
20
- ==========================
21
- -----BEGIN CERTIFICATE-----
22
- MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg
23
- Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG
24
- A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz
25
- MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL
26
- Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0
27
- IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u
28
- sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql
29
- HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID
30
- AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW
31
- M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF
32
- NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
33
- -----END CERTIFICATE-----
34
-
35
- Thawte Server CA
36
- ================
37
- -----BEGIN CERTIFICATE-----
38
- MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
39
- DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs
40
- dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE
41
- AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j
42
- b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV
43
- BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u
44
- c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG
45
- A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0
46
- ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl
47
- /Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7
48
- 1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR
49
- MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J
50
- GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ
51
- GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc=
52
- -----END CERTIFICATE-----
53
-
54
- Thawte Premium Server CA
55
- ========================
56
- -----BEGIN CERTIFICATE-----
57
- MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT
58
- DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs
59
- dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE
60
- AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl
61
- ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT
62
- AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
63
- VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2
64
- aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZ
65
- cHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2
66
- aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIh
67
- Udib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/
68
- qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAm
69
- SCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf
70
- 8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t
71
- UCemDaYj+bvLpgcUQg==
72
- -----END CERTIFICATE-----
73
-
74
- Equifax Secure CA
75
- =================
76
- -----BEGIN CERTIFICATE-----
77
- MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE
78
- ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
79
- MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT
80
- B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB
81
- nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR
82
- fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW
83
- 8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG
84
- A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE
85
- CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG
86
- A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS
87
- spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB
88
- Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
89
- zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
90
- BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
91
- 70+sB3c4
92
- -----END CERTIFICATE-----
93
-
94
- Digital Signature Trust Co. Global CA 1
95
- =======================================
96
- -----BEGIN CERTIFICATE-----
97
- MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
98
- ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy
99
- MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
100
- IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA
101
- A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE
102
- NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i
103
- o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
104
- BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
105
- dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
106
- IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY
107
- MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM
108
- BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
109
- ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq
110
- kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4
111
- RbyhkwS7hp86W0N6w4pl
112
- -----END CERTIFICATE-----
113
-
114
- Digital Signature Trust Co. Global CA 3
115
- =======================================
116
- -----BEGIN CERTIFICATE-----
117
- MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
118
- ChMbRGlnaXRhbCBTaWduYXR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
- Verisign Class 3 Public Primary Certification Authority
135
- =======================================================
136
- -----BEGIN CERTIFICATE-----
137
- MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
138
- FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
139
- IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
140
- XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
141
- IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
142
- A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
143
- f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
144
- hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
145
- TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
146
- WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
147
- Tqj/ZA1k
148
- -----END CERTIFICATE-----
149
-
150
- Verisign Class 3 Public Primary Certification Authority - G2
151
- ============================================================
152
- -----BEGIN CERTIFICATE-----
153
- MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
154
- MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
155
- eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
156
- biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
157
- dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
158
- MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
159
- eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
160
- biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
161
- dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
162
- FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
163
- lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
164
- MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
165
- 1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
166
- Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
167
- -----END CERTIFICATE-----
168
-
169
- GlobalSign Root CA
170
- ==================
171
- -----BEGIN CERTIFICATE-----
172
- MIIDdTCCA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PAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
186
- hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
187
- X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
188
- -----END CERTIFICATE-----
189
-
190
- GlobalSign Root CA - R2
191
- =======================
192
- -----BEGIN CERTIFICATE-----
193
- MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
194
- YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
195
- bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
196
- aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
197
- bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
198
- ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
199
- s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
200
- S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
201
- TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
202
- ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
203
- FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
204
- YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
205
- BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
206
- 9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
207
- 01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
208
- 9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
209
- TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
210
- -----END CERTIFICATE-----
211
-
212
- ValiCert Class 1 VA
213
- ===================
214
- -----BEGIN CERTIFICATE-----
215
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp
216
- b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
217
- YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
218
- bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIy
219
- MjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
220
- d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEg
221
- UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
222
- LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
223
- A4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIi
224
- GQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCm
225
- DuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwG
226
- lN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkX
227
- icnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nP
228
- Orf1LXLI
229
- -----END CERTIFICATE-----
230
-
231
- ValiCert Class 2 VA
232
- ===================
233
- -----BEGIN CERTIFICATE-----
234
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp
235
- b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
236
- YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
237
- bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw
238
- MTk1NFoXDTE5MDYyNjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
239
- d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIg
240
- UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
241
- LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
242
- A4GNADCBiQKBgQDOOnHK5avIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVC
243
- CSRrCl6zfN1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7Rf
244
- ZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9vUJSZ
245
- SWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTuIYEZoDJJKPTEjlbV
246
- UjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8
247
- W9ViH0Pd
248
- -----END CERTIFICATE-----
249
-
250
- RSA Root Certificate 1
251
- ======================
252
- -----BEGIN CERTIFICATE-----
253
- MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp
254
- b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
255
- YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
256
- bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw
257
- MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
258
- d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg
259
- UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
260
- LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
261
- A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td
262
- 3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H
263
- BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs
264
- 3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF
265
- V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r
266
- on+jjBXu
267
- -----END CERTIFICATE-----
268
-
269
- Verisign Class 3 Public Primary Certification Authority - G3
270
- ============================================================
271
- -----BEGIN CERTIFICATE-----
272
- MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
273
- UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
274
- cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
275
- IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVib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xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
290
- t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
291
- -----END CERTIFICATE-----
292
-
293
- Verisign Class 4 Public Primary Certification Authority - G3
294
- ============================================================
295
- -----BEGIN CERTIFICATE-----
296
- MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
297
- UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
298
- cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
299
- IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
300
- dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
301
- CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
302
- dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
303
- cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
304
- Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
305
- ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
306
- tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
307
- 8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
308
- Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
309
- Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
310
- j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
311
- mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
312
- fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
313
- RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
314
- UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
315
- -----END CERTIFICATE-----
316
-
317
- Entrust.net Secure Server CA
318
- ============================
319
- -----BEGIN CERTIFICATE-----
320
- MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV
321
- BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg
322
- cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl
323
- ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv
324
- cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQ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
- HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
339
- BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN
340
- Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9
341
- n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
342
- -----END CERTIFICATE-----
343
-
344
- Entrust.net Premium 2048 Secure Server CA
345
- =========================================
346
- -----BEGIN CERTIFICATE-----
347
- MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
348
- ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
349
- bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
350
- BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
351
- NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
352
- d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
353
- MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
354
- ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
355
- MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL
356
- Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr
357
- hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW
358
- nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi
359
- VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo3QwcjARBglghkgBhvhC
360
- AQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGAvtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdER
361
- gL7YibkIozH5oSQJFrlwMB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0B
362
- AQUFAAOCAQEAWUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
363
- oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcS
364
- o8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z
365
- 2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjX
366
- OP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ==
367
- -----END CERTIFICATE-----
368
-
369
- Baltimore CyberTrust Root
370
- =========================
371
- -----BEGIN CERTIFICATE-----
372
- MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
373
- ChMJQmF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auQrz4wlHrQMz2nZQ/1/I6eYs9H
387
- RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
388
- -----END CERTIFICATE-----
389
-
390
- Equifax Secure Global eBusiness CA
391
- ==================================
392
- -----BEGIN CERTIFICATE-----
393
- MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
394
- RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp
395
- bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx
396
- HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds
397
- b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV
398
- PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN
399
- qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn
400
- hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j
401
- BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs
402
- MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN
403
- I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY
404
- NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
405
- -----END CERTIFICATE-----
406
-
407
- Equifax Secure eBusiness CA 1
408
- =============================
409
- -----BEGIN CERTIFICATE-----
410
- MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
411
- RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB
412
- LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE
413
- ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz
414
- IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ
415
- 1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a
416
- IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk
417
- MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW
418
- Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF
419
- AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5
420
- lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+
421
- KpYrtWKmpj29f5JZzVoqgrI3eQ==
422
- -----END CERTIFICATE-----
423
-
424
- Equifax Secure eBusiness CA 2
425
- =============================
426
- -----BEG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5Lia
440
- 78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm
441
- V+GRMOrN
442
- -----END CERTIFICATE-----
443
-
444
- AddTrust Low-Value Services Root
445
- ================================
446
- -----BEGIN CERTIFICATE-----
447
- MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
448
- QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU
449
- cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw
450
- CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO
451
- ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB
452
- AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6
453
- 54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr
454
- oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1
455
- Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui
456
- GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w
457
- HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD
458
- AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT
459
- RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw
460
- HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt
461
- ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph
462
- iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
463
- eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr
464
- mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj
465
- ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
466
- -----END CERTIFICATE-----
467
-
468
- AddTrust External Root
469
- ======================
470
- -----BEGIN CERTIFICATE-----
471
- MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
472
- QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
473
- VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
474
- NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
475
- cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
476
- Um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5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
490
- -----END CERTIFICATE-----
491
-
492
- AddTrust Public Services Root
493
- =============================
494
- -----BEGIN CERTIFICATE-----
495
- MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
496
- QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU
497
- cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ
498
- BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5l
499
- dHdvcmsxIDAeBgNVBAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEF
500
- AAOCAQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV6tsfSlbu
501
- nyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1i
502
- d9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSG
503
- Aa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAw
504
- HM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0G
505
- A1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
506
- /zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0Ux
507
- FDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4G
508
- A1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4
509
- JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL
510
- +YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
511
- GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9
512
- Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H
513
- EufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
514
- -----END CERTIFICATE-----
515
-
516
- AddTrust Qualified Certificates Root
517
- ====================================
518
- -----BEGIN CERTIFICATE-----
519
- MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
520
- QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU
521
- cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx
522
- CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ
523
- IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG
524
- 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLf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Certification Authority
541
- ====================================
542
- -----BEGIN CERTIFICATE-----
543
- MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
544
- BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
545
- b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
546
- A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
547
- MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu
548
- MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu
549
- Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v
550
- dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
551
- ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz
552
- A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww
553
- Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68
554
- j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN
555
- rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw
556
- DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1
557
- MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH
558
- hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
559
- A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM
560
- Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
561
- v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
562
- W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
563
- tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
564
- -----END CERTIFICATE-----
565
-
566
- RSA Security 2048 v3
567
- ====================
568
- -----BEGIN CERTIFICATE-----
569
- MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6MRkwFwYDVQQK
570
- ExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJpdHkgMjA0OCBWMzAeFw0wMTAy
571
- MjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAXBgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAb
572
- BgNVBAsTFFJTQSBTZWN1cml0eSAyMDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
573
- AQEAt49VcdKA3XtpeafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7
574
- Jylg/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGlwSMiuLgb
575
- WhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnhAMFRD0xS+ARaqn1y07iH
576
- KrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP
577
- +Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpuAWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/
578
- MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4E
579
- FgQUB8NRMKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYcHnmY
580
- v/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/Zb5gEydxiKRz44Rj
581
- 0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+f00/FGj1EVDVwfSQpQgdMWD/YIwj
582
- VAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVOrSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395
583
- nzIlQnQFgCi/vcEkllgVsRch6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kA
584
- pKnXwiJPZ9d37CAFYd4=
585
- -----END CERTIFICATE-----
586
-
587
- GeoTrust Global CA
588
- ==================
589
- -----BEGIN CERTIFICATE-----
590
- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
591
- Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJ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WaAocvm
605
- Mw==
606
- -----END CERTIFICATE-----
607
-
608
- GeoTrust Global CA 2
609
- ====================
610
- -----BEGIN CERTIFICATE-----
611
- MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
612
- R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw
613
- MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
614
- LjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
615
- ggEKAoIBAQDvPE1APRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/
616
- NTL8Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hLTytCOb1k
617
- LUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL5mkWRxHCJ1kDs6ZgwiFA
618
- Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b
619
- HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF
620
- MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH
621
- K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7
622
- srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh
623
- ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL
624
- OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC
625
- x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF
626
- H4z1Ir+rzoPz4iIprn2DQKi6bA==
627
- -----END CERTIFICATE-----
628
-
629
- GeoTrust Universal CA
630
- =====================
631
- -----BEGIN CERTIFICATE-----
632
- MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
633
- R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
634
- MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
635
- Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
636
- ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
637
- JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
638
- RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
639
- 7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
640
- 8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
641
- qnJNk22CDtucvc+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JbAiXfKM9fJP/P6EU
655
- p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
656
- P/rmMuGNG2+k5o7Y+SlIis5z/iw=
657
- -----END CERTIFICATE-----
658
-
659
- GeoTrust Universal CA 2
660
- =======================
661
- -----BEGIN CERTIFICATE-----
662
- MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
663
- R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
664
- MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg
665
- SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA
666
- A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0
667
- DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17
668
- j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q
669
- JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a
670
- QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2
671
- WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP
672
- 20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM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MptEm
686
- X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
687
- -----END CERTIFICATE-----
688
-
689
- America Online Root Certification Authority 1
690
- =============================================
691
- -----BEGIN CERTIFICATE-----
692
- MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
693
- QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
694
- Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG
695
- A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
696
- T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD
697
- ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG
698
- v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z
699
- DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh
700
- sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP
701
- 8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T
702
- AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z
703
- o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf
704
- GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF
705
- VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft
706
- 3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g
707
- Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
708
- sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
709
- -----END CERTIFICATE-----
710
-
711
- America Online Root Certification Authority 2
712
- =============================================
713
- -----BEGIN CERTIFICATE-----
714
- MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
715
- QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
716
- Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG
717
- A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
718
- T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQAD
719
- ggIPADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC206B89en
720
- fHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFciKtZHgVdEglZTvYYUAQv8
721
- f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2JxhP7JsowtS013wMPgwr38oE18aO6lhO
722
- qKSlG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+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2FAjgQ5ANh
736
- 1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUXOm/9riW99XJZZLF0Kjhf
737
- GEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPbAZO1XB4Y3WRayhgoPmMEEf0cjQAPuDff
738
- Z4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQlZvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuP
739
- cX/9XhmgD0uRuMRUvAawRY8mkaKO/qk=
740
- -----END CERTIFICATE-----
741
-
742
- Visa eCommerce Root
743
- ===================
744
- -----BEGIN CERTIFICATE-----
745
- MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG
746
- EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug
747
- QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2
748
- WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
749
- VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
750
- bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL
751
- F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b
752
- RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0
753
- TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI
754
- /k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs
755
- GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
756
- MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc
757
- CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW
758
- YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz
759
- zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
760
- YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
761
- 398znM/jra6O1I7mT1GvFpLgXPYHDw==
762
- -----END CERTIFICATE-----
763
-
764
- Certum Root CA
765
- ==============
766
- -----BEGIN CERTIFICATE-----
767
- MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK
768
- ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla
769
- Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u
770
- by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x
771
- wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL
772
- kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ
773
- 89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K
774
- Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P
775
- NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq
776
- hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+
777
- GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg
778
- GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/
779
- 0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS
780
- qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw==
781
- -----END CERTIFICATE-----
782
-
783
- Comodo AAA Services root
784
- ========================
785
- -----BEGIN CERTIFICATE-----
786
- MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
787
- R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
788
- TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
789
-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w8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
803
- 8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
804
- 12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
805
- -----END CERTIFICATE-----
806
-
807
- Comodo Secure Services root
808
- ===========================
809
- -----BEGIN CERTIFICATE-----
810
- MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
811
- R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
812
- TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw
813
- MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu
814
- Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi
815
- BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
816
- ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP
817
- 9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc
818
- rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC
819
- oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V
820
- p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E
821
- FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
822
- gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj
823
- YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm
824
- aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm
825
- 4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
826
- Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL
827
- DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw
828
- pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H
829
- RR3B7Hzs/Sk=
830
- -----END CERTIFICATE-----
831
-
832
- Comodo Trusted Services root
833
- ============================
834
- -----BEGIN CERTIFICATE-----
835
- MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
836
- R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
837
- TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeF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zG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxISjBc/lDb+XbDA
852
- BHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+xqFx7D+gIIxmOom0jtTYsU0l
853
- R+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/AtyjcndBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O
854
- 9y5Xt5hwXsjEeLBi
855
- -----END CERTIFICATE-----
856
-
857
- QuoVadis Root CA
858
- ================
859
- -----BEGIN CERTIFICATE-----
860
- MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
861
- ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
862
- eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
863
- MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
864
- cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
865
- EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
866
- AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
867
- J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
868
- F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
869
- YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3d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az10buYWnuul
883
- LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
884
- gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
885
- 5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
886
- 5nrQNiOKSnQ2+Q==
887
- -----END CERTIFICATE-----
888
-
889
- QuoVadis Root CA 2
890
- ==================
891
- -----BEGIN CERTIFICATE-----
892
- MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
893
- EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx
894
- ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
895
- aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC
896
- DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6
897
- XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk
898
- lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB
899
- lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy
900
- lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt
901
- 66/3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HdZ+XIWDmbA4CD/pXvk1B+TJYm5X
915
- f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
916
- 4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
917
- VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
918
- -----END CERTIFICATE-----
919
-
920
- QuoVadis Root CA 3
921
- ==================
922
- -----BEGIN CERTIFICATE-----
923
- MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
924
- EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx
925
- OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
926
- aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
927
- DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg
928
- DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij
929
- KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K
930
- DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv
931
- BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp
932
- p5ijJUMv7/FfJuGITfhebtfZFG4ZM2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/w4E6oM3kJpK27z
946
- POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
947
- Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
948
- 8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
949
- bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
950
- g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
951
- vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
952
- qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
953
- -----END CERTIFICATE-----
954
-
955
- Security Communication Root CA
956
- ==============================
957
- -----BEGIN CERTIFICATE-----
958
- MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
959
- U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
960
- HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
961
- U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
962
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
963
- 8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
964
- DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
965
- 5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
966
- DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
967
- JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
968
- DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
969
- 0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
970
- mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
971
- s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
972
- 6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
973
- FL39vmwLAw==
974
- -----END CERTIFICATE-----
975
-
976
- Sonera Class 2 Root CA
977
- ======================
978
- -----BEGIN CERTIFICATE-----
979
- MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
980
- U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
981
- NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
982
- IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
983
- /Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
984
- dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
985
- f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
986
- tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
987
- nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
988
- XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
989
- 0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
990
- cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
991
- Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
992
- EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
993
- llpwrN9M
994
- -----END CERTIFICATE-----
995
-
996
- Staat der Nederlanden Root CA
997
- =============================
998
- -----BEGIN CERTIFICATE-----
999
- MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE
1000
- ChMVU3RhYX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C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y
1014
- nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
1015
- iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
1016
- -----END CERTIFICATE-----
1017
-
1018
- TDC Internet Root CA
1019
- ====================
1020
- -----BEGIN CERTIFICATE-----
1021
- MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE
1022
- ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTAeFw0wMTA0MDUx
1023
- NjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNVBAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJu
1024
- ZXQxHTAbBgNVBAsTFFREQyBJbnRlcm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
1025
- MIIBCgKCAQEAxLhAvJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20j
1026
- xsNuZp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a0vnRrEvL
1027
- znWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc14izbSysseLlJ28TQx5yc
1028
- 5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGNeGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6
1029
- otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcDR0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZI
1030
- AYb4QgEBBAQDAgAHMGUGA1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMM
1031
- VERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxMEQ1JM
1032
- MTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3WjALBgNVHQ8EBAMC
1033
- AQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAwHQYDVR0OBBYEFGxkAcf9hW2syNqe
1034
- UAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0G
1035
- CSqGSIb3DQEBBQUAA4IBAQBOQ8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540m
1036
- gwV5dOy0uaOXwTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
1037
- 2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzb
1038
- O0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrU
1039
- Cbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l
1040
- -----END CERTIFICATE-----
1041
-
1042
- UTN DATACorp SGC Root CA
1043
- ========================
1044
- -----BEGIN CERTIFICATE-----
1045
- MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UE
1046
- BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
1047
- IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZ
1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joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0
1062
- I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXx
1063
- EZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP
1064
- DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI
1065
- -----END CERTIFICATE-----
1066
-
1067
- UTN USERFirst Hardware Root CA
1068
- ==============================
1069
- -----BEGIN CERTIFICATE-----
1070
- MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE
1071
- BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
1072
- IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd
1073
- BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgx
1074
- OTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0
1075
- eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVz
1076
- ZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3
1077
- DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlI
1078
- wrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFd
1079
- tqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8
1080
- i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjf
1081
- Pe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkw
1082
- gbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WF
1083
- lp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNF
1084
- UkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF
1085
- BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
1086
- //bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW
1087
- XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2
1088
- lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn
1089
- iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67
1090
- nfhmqA==
1091
- -----END CERTIFICATE-----
1092
-
1093
- Camerfirma Chambers of Commerce Root
1094
- ====================================
1095
- -----BEGIN CERTIFICATE-----
1096
- MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYD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c3Jvb3RAY2hh
1110
- bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD
1111
- VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
1112
- aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi
1113
- fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD
1114
- L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN
1115
- UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n
1116
- ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1
1117
- erfutGWaIZDgqtCYvDi1czyL+Nw=
1118
- -----END CERTIFICATE-----
1119
-
1120
- Camerfirma Global Chambersign Root
1121
- ==================================
1122
- -----BEGIN CERTIFICATE-----
1123
- MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
1124
- QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
1125
- ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx
1126
- NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt
1127
- YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExp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VPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y
1141
- gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ
1142
- PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4
1143
- IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes
1144
- t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
1145
- -----END CERTIFICATE-----
1146
-
1147
- NetLock Notary (Class A) Root
1148
- =============================
1149
- -----BEGIN CERTIFICATE-----
1150
- MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI
1151
- EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
1152
- dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j
1153
- ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX
1154
- DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH
1155
- EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD
1156
- VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFz
1157
- cyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSM
1158
- D7tM9Dceq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bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBh
1172
- bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sg
1173
- Q1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFp
1174
- bCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5
1175
- ayZrU3/b39/zcT0mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP
1176
- ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB
1177
- CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr
1178
- KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM
1179
- 8CgHrTwXZoi1/baI
1180
- -----END CERTIFICATE-----
1181
-
1182
- NetLock Business (Class B) Root
1183
- ===============================
1184
- -----BEGIN CERTIFICATE-----
1185
- MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT
1186
- CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
1187
- BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg
1188
- VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD
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oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA
1203
- bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl
1204
- IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2
1205
- YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj
1206
- cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM
1207
- 43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR
1208
- stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI
1209
- -----END CERTIFICATE-----
1210
-
1211
- NetLock Express (Class C) Root
1212
- ==============================
1213
- -----BEGIN CERTIFICATE-----
1214
- MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT
1215
- CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
1216
- BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD
1217
- KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ
1218
- BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
1219
- dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c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gSU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5k
1233
- IHRoZSB1c2Ugb2YgdGhpcyBjZXJ0aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQ
1234
- UyBhdmFpbGFibGUgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwg
1235
- YXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2
1236
- xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW
1237
- gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A==
1238
- -----END CERTIFICATE-----
1239
-
1240
- XRamp Global CA Root
1241
- ====================
1242
- -----BEGIN CERTIFICATE-----
1243
- MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
1244
- BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
1245
- dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
1246
- dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
1247
- HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
1248
- U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
1249
- dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
1250
- IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
1251
- foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
1252
- zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
1253
- AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry
1254
- xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
1255
- EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap
1256
- oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC
1257
- AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc
1258
- /Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
1259
- qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n
1260
- nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz
1261
- 8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=
1262
- -----END CERTIFICATE-----
1263
-
1264
- Go Daddy Class 2 CA
1265
- ===================
1266
- -----BEGIN CERTIFIC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wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
1281
- PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
1282
- I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
1283
- HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
1284
- Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
1285
- vZ8=
1286
- -----END CERTIFICATE-----
1287
-
1288
- Starfield Class 2 CA
1289
- ====================
1290
- -----BEGIN CERTIFICATE-----
1291
- MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
1292
- U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
1293
- Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
1294
- MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
1295
- A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
1296
- SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
1297
- bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
1298
- JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
1299
- epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
1300
- F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
1301
- MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
1302
- hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
1303
- bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
1304
- QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
1305
- afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
1306
- PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
1307
- xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
1308
- KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
1309
- QBFGmh95DmK/D5fs4C8fF5Q=
1310
- -----END CERTIFICATE-----
1311
-
1312
- StartCom Certification Authority
1313
- ================================
1314
- -----BEGIN CERTIFICATE-----
1315
- MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
1316
- U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGl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Ysd6AgXm
1343
- vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk
1344
- fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3
1345
- fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ
1346
- EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
1347
- yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl
1348
- 1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/
1349
- lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro
1350
- g14=
1351
- -----END CERTIFICATE-----
1352
-
1353
- Taiwan GRCA
1354
- ===========
1355
- -----BEGIN CERTIFICATE-----
1356
- MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
1357
- EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
1358
- DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
1359
- dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
1360
- ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
1361
- w8XRIePaJD9IK/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0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU
1375
- D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz
1376
- DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
1377
- Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
1378
- 7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
1379
- CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
1380
- +fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
1381
- -----END CERTIFICATE-----
1382
-
1383
- Firmaprofesional Root CA
1384
- ========================
1385
- -----BEGIN CERTIFICATE-----
1386
- MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT
1387
- GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp
1388
- Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA
1389
- ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTEL
1390
- MAkGA1UEBhMCRVMxIjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMT
1391
- OUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2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h4k0460tQtcsm9MracEpqoeJ5quGnM/b9Sh/22WA=
1406
- -----END CERTIFICATE-----
1407
-
1408
- Wells Fargo Root CA
1409
- ===================
1410
- -----BEGIN CERTIFICATE-----
1411
- MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxFDASBgNV
1412
- BAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhv
1413
- cml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN
1414
- MDAxMDExMTY0MTI4WhcNMjEwMTE0MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dl
1415
- bGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEv
1416
- MC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
1417
- SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n135zHCLielTWi5MbqNQ1mX
1418
- x3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHESxP9cMIlrCL1dQu3U+SlK93OvRw6esP3
1419
- E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4OJgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5
1420
- OEL8pahbSCOz6+MlsoCultQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4j
1421
- sNtlAHCEAQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMBAAGj
1422
- YTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcBCzAyMDAGCCsGAQUF
1423
- BwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRwb2xpY3kwDQYJKoZIhvcNAQEFBQAD
1424
- ggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrv
1425
- m+0fazbuSCUlFLZWohDo7qd/0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0R
1426
- OhPs7fpvcmR7nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx
1427
- x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ33ZwmVxwQ023
1428
- tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s=
1429
- -----END CERTIFICATE-----
1430
-
1431
- Swisscom Root CA 1
1432
- ==================
1433
- -----BEGIN CERTIFICATE-----
1434
- MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQG
1435
- EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy
1436
- dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4
1437
- MTgyMjA2MjBaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln
1438
- aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIIC
1439
- IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9m2BtRsiM
1440
- MW8Xw/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HgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H
1454
- VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl
1455
- vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl
1456
- OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3
1457
- 1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq
1458
- nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy
1459
- x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW
1460
- NY6E0F/6MBr1mmz0DlP5OlvRHA==
1461
- -----END CERTIFICATE-----
1462
-
1463
- DigiCert Assured ID Root CA
1464
- ===========================
1465
- -----BEGIN CERTIFICATE-----
1466
- MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
1467
- EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
1468
- IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
1469
- MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
1470
- ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
1471
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
1472
- 9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
1473
- UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
1474
- /lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
1475
- oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
1476
- GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
1477
- 66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
1478
- hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
1479
- EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
1480
- SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
1481
- 8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
1482
- +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
1483
- -----END CERTIFICATE-----
1484
-
1485
- DigiCert Global Root CA
1486
- =======================
1487
- -----BEGIN CERTIFICATE-----
1488
- MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZH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P0jmP6P6fbtGbfYmbW0W5BjfIt
1502
- tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
1503
- UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
1504
- CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
1505
- -----END CERTIFICATE-----
1506
-
1507
- DigiCert High Assurance EV Root CA
1508
- ==================================
1509
- -----BEGIN CERTIFICATE-----
1510
- MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
1511
- EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
1512
- KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
1513
- MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
1514
- MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
1515
- Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
1516
- Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
1517
- OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
1518
- MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
1519
- NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
1520
- h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
1521
- Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
1522
- JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
1523
- V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
1524
- myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
1525
- mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
1526
- vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
1527
- -----END CERTIFICATE-----
1528
-
1529
- Certplus Class 2 Primary CA
1530
- ===========================
1531
- -----BEGIN CERTIFICATE-----
1532
- MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE
1533
- BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN
1534
- OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy
1535
- dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
1536
- ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR
1537
- 5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ
1538
- Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO
1539
- YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e
1540
- e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME
1541
- CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ
1542
- YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t
1543
- L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD
1544
- P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R
1545
- TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+
1546
- 7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW
1547
- //1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
1548
- l7+ijrRU
1549
- -----END CERTIFICATE-----
1550
-
1551
- DST Root CA X3
1552
- ==============
1553
- -----BEGIN CERTIFICATE-----
1554
- MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmG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CCZAA62RjYJsWvIjJEubS
1568
- fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
1569
- -----END CERTIFICATE-----
1570
-
1571
- DST ACES CA X6
1572
- ==============
1573
- -----BEGIN CERTIFICATE-----
1574
- MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG
1575
- EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT
1576
- MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha
1577
- MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE
1578
- CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC
1579
- AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI
1580
- DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa
1581
- pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow
1582
- GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy
1583
- MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud
1584
- EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu
1585
- Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy
1586
- dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU
1587
- CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2
1588
- 5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t
1589
- Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
1590
- nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs
1591
- vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3
1592
- oKfN5XozNmr6mis=
1593
- -----END CERTIFICATE-----
1594
-
1595
- TURKTRUST Certificate Services Provider Root 1
1596
- ==============================================
1597
- -----BEGIN CERTIFICATE-----
1598
- MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF
1599
- bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP
1600
- MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0
1601
- acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx
1602
- MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg
1603
-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TIFICATE-----
1617
-
1618
- TURKTRUST Certificate Services Provider Root 2
1619
- ==============================================
1620
- -----BEGIN CERTIFICATE-----
1621
- MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF
1622
- bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP
1623
- MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg
1624
- QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN
1625
- MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr
1626
- dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEPMA0G
1627
- A1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls
1628
- acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwggEiMA0G
1629
- CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqe
1630
- LCDe2JAOCtFp0if7qnefJ1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKI
1631
- x+XlZEdhR3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJQv2g
1632
- QrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGXJHpsmxcPbe9TmJEr
1633
- 5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1pzpwACPI2/z7woQ8arBT9pmAPAgMB
1634
- AAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58SFq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8G
1635
- A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/ntt
1636
- Rbj2hWyfIvwqECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
1637
- Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFzgw2lGh1uEpJ+
1638
- hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P
1639
- 9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5
1640
- UrbnBEI=
1641
- -----END CERTIFICATE-----
1642
-
1643
- SwissSign Gold CA - G2
1644
- ======================
1645
- -----BEGIN CERTIFICATE-----
1646
- MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
1647
- EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
1648
- MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp
1649
- c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B
1650
- AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq
1651
- t2/876LQwB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IxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
1665
- Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
1666
- Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
1667
- mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
1668
- vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
1669
- KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
1670
- NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
1671
- viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
1672
- -----END CERTIFICATE-----
1673
-
1674
- SwissSign Silver CA - G2
1675
- ========================
1676
- -----BEGIN CERTIFICATE-----
1677
- MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
1678
- BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
1679
- DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
1680
- aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
1681
- 9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVx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csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
1696
- 3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
1697
- /uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
1698
- DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
1699
- e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
1700
- WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
1701
- DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
1702
- DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
1703
- -----END CERTIFICATE-----
1704
-
1705
- GeoTrust Primary Certification Authority
1706
- ========================================
1707
- -----BEGIN CERTIFICATE-----
1708
- MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
1709
- EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
1710
- ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
1711
- CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
1712
- cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
1713
- CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
1714
- b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
1715
- nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
1716
- RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
1717
- tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
1718
- AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI
1719
- hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K
1720
- Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN
1721
- NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa
1722
- Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
1723
- 1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
1724
- -----END CERTIFICATE-----
1725
-
1726
- thawte Primary Root CA
1727
- ======================
1728
- -----BEGIN CERTIFICATE-----
1729
- MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1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w0BAQUF
1743
- AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
1744
- uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
1745
- xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
1746
- jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
1747
- z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
1748
- -----END CERTIFICATE-----
1749
-
1750
- VeriSign Class 3 Public Primary Certification Authority - G5
1751
- ============================================================
1752
- -----BEGIN CERTIFICATE-----
1753
- MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
1754
- BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
1755
- ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
1756
- IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
1757
- ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
1758
- yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
1759
- biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
1760
- dXRob3JpemVkIHVzZSBvbmx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1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
1774
- ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
1775
- -----END CERTIFICATE-----
1776
-
1777
- SecureTrust CA
1778
- ==============
1779
- -----BEGIN CERTIFICATE-----
1780
- MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
1781
- EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
1782
- dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
1783
- BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
1784
- ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
1785
- OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
1786
- DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
1787
- GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
1788
- 01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
1789
- ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
1790
- BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
1791
- aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
1792
- KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
1793
- SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
1794
- mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
1795
- nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
1796
- 3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
1797
- -----END CERTIFICATE-----
1798
-
1799
- Secure Global CA
1800
- ================
1801
- -----BEGIN CERTIFICATE-----
1802
- MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
1803
- EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH
1804
- bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg
1805
- MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg
1806
- Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx
1807
- YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ
1808
- bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g
1809
- 8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
1810
- HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
1811
- 0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
1812
- EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
1813
- oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
1814
- MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
1815
- OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
1816
- CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
1817
- 3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
1818
- f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
1819
- -----END CERTIFICATE-----
1820
-
1821
- COMODO Certification Authority
1822
- ==============================
1823
- -----BEGIN CERTIFICATE-----
1824
- MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
1825
- BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3R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FSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
1839
- OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
1840
- RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
1841
- IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
1842
- +8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
1843
- -----END CERTIFICATE-----
1844
-
1845
- Network Solutions Certificate Authority
1846
- =======================================
1847
- -----BEGIN CERTIFICATE-----
1848
- MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
1849
- EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
1850
- IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
1851
- MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
1852
- MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
1853
- CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
1854
- jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
1855
- aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
1856
- crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
1857
- /Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
1858
- AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
1859
- BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
1860
- bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
1861
- A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
1862
- 4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
1863
- GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
1864
- wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
1865
- ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
1866
- -----END CERTIFICATE-----
1867
-
1868
- WellsSecure Public Root Certificate Authority
1869
- =============================================
1870
- -----BEGIN CERTIFICATE-----
1871
- MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM
1872
- F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw
1873
- NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0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DC1XZWxsc1NlY3VyZSBQdWJsaWMg
1887
- Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI
1888
- K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0
1889
- bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj
1890
- qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es
1891
- E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ
1892
- tylv2G0xffX8oRAHh84vWdw+WNs=
1893
- -----END CERTIFICATE-----
1894
-
1895
- COMODO ECC Certification Authority
1896
- ==================================
1897
- -----BEGIN CERTIFICATE-----
1898
- MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
1899
- R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
1900
- ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
1901
- dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
1902
- GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
1903
- Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
1904
- b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQ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2
1922
- TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW
1923
- So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy
1924
- HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd
1925
- frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ
1926
- tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB
1927
- egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC
1928
- iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK
1929
- q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q
1930
- MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
1931
- Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI
1932
- lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF
1933
- 0mBWWg==
1934
- -----END CERTIFICATE-----
1935
-
1936
- Security Communication EV RootCA1
1937
- =================================
1938
- -----BEGIN CERTIFICATE-----
1939
- MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
1940
- U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F75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW
1954
- T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
1955
- -----END CERTIFICATE-----
1956
-
1957
- OISTE WISeKey Global Root GA CA
1958
- ===============================
1959
- -----BEGIN CERTIFICATE-----
1960
- MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
1961
- BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
1962
- A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
1963
- bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
1964
- VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
1965
- IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
1966
- IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
1967
- Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
1968
- Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
1969
- d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
1970
- /yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
1971
- LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
1972
- AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
1973
- KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
1974
- MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
1975
- +vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
1976
- hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
1977
- okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
1978
- -----END CERTIFICATE-----
1979
-
1980
- Microsec e-Szigno Root CA
1981
- =========================
1982
- -----BEGIN CERTIFICATE-----
1983
- MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE
1984
- BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL
1985
- EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0
1986
- MDYxMjI4NDRaFw0xNzA0MDYxMjI4NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVz
1987
- dDEWMBQGA1UEChMNTWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMT
1988
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lJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
2015
- 86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfRhUZLphK3dehK
2016
- yVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/MPMMNz7UwiiAc7EBt51alhQB
2017
- S6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
2018
- -----END CERTIFICATE-----
2019
-
2020
- Certigna
2021
- ========
2022
- -----BEGIN CERTIFICATE-----
2023
- MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
2024
- EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
2025
- MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
2026
- Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
2027
- XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
2028
- GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
2029
- ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
2030
- DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
2031
- Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
2032
- tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
2033
- BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
2034
- SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
2035
- hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
2036
- ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
2037
- PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
2038
- 1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
2039
- WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
2040
- -----END CERTIFICATE-----
2041
-
2042
- AC Ra\xC3\xADz Certic\xC3\xA1mara S.A.
2043
- ======================================
2044
- -----BEGIN CERTIFICATE-----
2045
- MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNVBAYT
2046
- AkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRpZmljYWNpw7NuIERpZ2l0YWwg
2047
- LSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwaQUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4w
2048
- HhcNMDYxMTI3MjA0NjI5WhcNMzAwNDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+
2049
- U29jaWVkYWQgQ2FtZXJhbCB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0aWNhbWFyYS5jb20vZHBjLzBaBggrBgEF
2063
- BQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW507WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2Ug
2064
- cHVlZGVuIGVuY29udHJhciBlbiBsYSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEf
2065
- AygPU3zmpFmps4p6xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuX
2066
- EpBcunvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/Jre7Ir5v
2067
- /zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dpezy4ydV/NgIlqmjCMRW3
2068
- MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42gzmRkBDI8ck1fj+404HGIGQatlDCIaR4
2069
- 3NAvO2STdPCWkPHv+wlaNECW8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wk
2070
- eZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f
2071
- /RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5h
2072
- RqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU
2073
- Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ==
2074
- -----END CERTIFICATE-----
2075
-
2076
- TC TrustCenter Class 2 CA II
2077
- ============================
2078
- -----BEGIN CERTIFICATE-----
2079
- MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1U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VzdENlbnRlciUyMENsYXNzJTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i
2094
- SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
2095
- TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G
2096
- dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ
2097
- KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj
2098
- TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP
2099
- JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk
2100
- vQ==
2101
- -----END CERTIFICATE-----
2102
-
2103
- TC TrustCenter Class 3 CA II
2104
- ============================
2105
- -----BEGIN CERTIFICATE-----
2106
- MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC
2107
- REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy
2108
- IENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYw
2109
- MTEyMTQ0MTU3WhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1
2110
- c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UE
2111
- AxMcVEM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otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9
2125
- IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal
2126
- 092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc
2127
- 5A==
2128
- -----END CERTIFICATE-----
2129
-
2130
- TC TrustCenter Universal CA I
2131
- =============================
2132
- -----BEGIN CERTIFICATE-----
2133
- MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC
2134
- REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy
2135
- IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN
2136
- MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg
2137
- VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYw
2138
- JAYDVQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcNAQEBBQAD
2139
- ggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSRJJZ4Hgmgm5qVSkr1YnwC
2140
- qMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3TfCZdzHd55yx4Oagmcw6iXSVphU9VDprv
2141
- xrlE4Vc93x9UIuVvZaozhDrzznq+VZeujRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtw
2142
- ag+1m7Z3W0hZneTvWq3zwZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9O
2143
- gdwZu5GQfezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYDVR0j
2144
- BBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
2145
- AYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0GCSqGSIb3DQEBBQUAA4IBAQAo0uCG
2146
- 1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X17caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/Cy
2147
- vwbZ71q+s2IhtNerNXxTPqYn8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3
2148
- ghUJGooWMNjsydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
2149
- ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/2TYcuiUaUj0a
2150
- 7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
2151
- -----END CERTIFICATE-----
2152
-
2153
- Deutsche Telekom Root CA 2
2154
- ==========================
2155
- -----BEGIN CERTIFICATE-----
2156
- MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
2157
- RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG
2158
- A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5
2159
- MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G
2160
- A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS
2161
- b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5
2162
- bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI
2163
- KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY
2164
- AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK
2165
- Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV
2166
- jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV
2167
- HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr
2168
- E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy
2169
- zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
2170
- rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
2171
- dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
2172
- Cm26OWMohpLzGITY+9HPBVZkVw==
2173
- -----END CERTIFICATE-----
2174
-
2175
- ComSign Secured CA
2176
- ==================
2177
- -----BEGIN CERTIFICAT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3wo3a
2191
- BijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtCdsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtp
2192
- FhpFfTMDZflScZAmlaxMDPWLkz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP
2193
- 51qJThRv4zdLhfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz
2194
- OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw==
2195
- -----END CERTIFICATE-----
2196
-
2197
- Cybertrust Global Root
2198
- ======================
2199
- -----BEGIN CERTIFICATE-----
2200
- MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
2201
- ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
2202
- MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
2203
- ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
2204
- +Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
2205
- 0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
2206
- AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
2207
- 89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
2208
- 8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
2209
- BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
2210
- MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
2211
- A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
2212
- lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
2213
- 5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
2214
- hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
2215
- X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
2216
- WL1WMRJOEcgh4LMRkWXbtKaIOM5V
2217
- -----END CERTIFICATE-----
2218
-
2219
- ePKI Root Certification Authority
2220
- =================================
2221
- -----BEGIN CERTIFICATE-----
2222
- MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
2223
- EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
2224
- Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
2225
- MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
2226
- MCgGA1UECww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GoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
2240
- KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
2241
- xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
2242
- NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
2243
- GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
2244
- xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
2245
- gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
2246
- sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
2247
- BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
2248
- -----END CERTIFICATE-----
2249
-
2250
- T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3
2251
- =============================================================================================================================
2252
- -----BEGIN CERTIFICATE-----
2253
- MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH
2254
- DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q
2255
- aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEF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K/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
2269
- hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd
2270
- BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
2271
- MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4
2272
- N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT
2273
- y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh
2274
- LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M
2275
- dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI=
2276
- -----END CERTIFICATE-----
2277
-
2278
- Buypass Class 2 CA 1
2279
- ====================
2280
- -----BEGIN CERTIFICATE-----
2281
- MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
2282
- QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2
2283
- MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh
2284
- c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI
2285
- hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M
2286
- cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83
2287
- 0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4
2288
- 0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R
2289
- uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC
2290
- MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P
2291
- AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLPgcIV
2292
- 1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+DKhQ7SLHrQVMdvvt
2293
- 7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKuBctN518fV4bVIJwo+28TOPX2EZL2
2294
- fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w
2295
- wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
2296
- -----END CERTIFICATE-----
2297
-
2298
- Buypass Class 3 CA 1
2299
- ====================
2300
- -----BEGIN CERTIFICATE-----
2301
- MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
2302
- QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMyBDQSAxMB4XDTA1
2303
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
-
2318
- EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1
2319
- ==========================================================================
2320
- -----BEGIN CERTIFICATE-----
2321
- MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF
2322
- bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg
2323
- QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe
2324
- Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p
2325
- ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt
2326
- IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG
2327
- SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by
2328
- X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b
2329
- gmmkTPiab+ci2hC6X5L8GCcKqKpE+i4stPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfr
2330
- eYteIAbTdgtsApWjluTLdlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZ
2331
- TqNGFav4c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8UmTDGy
2332
- Y5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z+kI2sSX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346
- Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9
2347
- AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
2348
- -----END CERTIFICATE-----
2349
-
2350
- certSIGN ROOT CA
2351
- ================
2352
- -----BEGIN CERTIFICATE-----
2353
- MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD
2354
- VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa
2355
- Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE
2356
- CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I
2357
- JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH
2358
- rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2
2359
- ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD
2360
- 0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943
2361
- AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
2362
- Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
2363
- AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
2364
- SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
2365
- x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
2366
- vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
2367
- TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
2368
- -----END CERTIFICATE-----
2369
-
2370
- CNNIC ROOT
2371
- ==========
2372
- -----BEGIN CERTIFICATE-----
2373
- MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJDTjEOMAwGA1UE
2374
- ChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2MDcwOTE0WhcNMjcwNDE2MDcw
2375
- OTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1Qw
2376
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzD
2377
- o+/hn7E7SIX1mlwhIhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tiz
2378
- VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT
2379
- VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or
2380
- czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK
2381
- y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC
2382
- wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S
2383
- lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5
2384
- Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM
2385
- O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8
2386
- BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2
2387
- G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m
2388
- mxE=
2389
- -----END CERTIFICATE-----
2390
-
2391
- ApplicationCA - Japanese Government
2392
- ===================================
2393
- -----BEGIN CERTIFICATE-----
2394
- MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT
2395
- SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw
2396
- MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl
2397
- cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
2398
- CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4
2399
- fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN
2400
- wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE
2401
- jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu
2402
- nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU
2403
- WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV
2404
- BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD
2405
- vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs
2406
- o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g
2407
- /DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD
2408
- io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW
2409
- dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
2410
- rosot4LKGAfmt1t06SAZf7IbiVQ=
2411
- -----END CERTIFICATE-----
2412
-
2413
- GeoTrust Primary Certification Authority - G3
2414
- =============================================
2415
- -----BEGIN CERTIFICATE-----
2416
- MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
2417
- BhMCVVMxFjAUBgNVBAoTDUdlb1RydX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hhc9f5joWJ7w5elShKKiePEI4ufIbE
2431
- Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
2432
- AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
2433
- t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
2434
- -----END CERTIFICATE-----
2435
-
2436
- thawte Primary Root CA - G2
2437
- ===========================
2438
- -----BEGIN CERTIFICATE-----
2439
- MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBgg