Permalink
Browse files

Working on breaking the project into components each with its own com…

…poser.json file
  • Loading branch information...
mtdowling committed Sep 6, 2012
1 parent 95e1a46 commit 4c12cc079f88eed135f875f74686d046ae939ec2
Showing with 1,003 additions and 634 deletions.
  1. +20 −1 composer.json
  2. +1 −1 src/Guzzle/{Common → }/Batch/AbstractBatchDecorator.php
  3. +2 −2 src/Guzzle/{Common → }/Batch/Batch.php
  4. +3 −3 src/Guzzle/{Common → }/Batch/BatchBuilder.php
  5. +3 −1 src/Guzzle/{Common → }/Batch/BatchClosureDivisor.php
  6. +2 −2 src/Guzzle/{Common → }/Batch/BatchClosureTransfer.php
  7. +5 −4 src/Guzzle/{Service/Command → Batch}/BatchCommandTransfer.php
  8. +1 −1 src/Guzzle/{Common → }/Batch/BatchDivisorInterface.php
  9. +1 −1 src/Guzzle/{Common → }/Batch/BatchInterface.php
  10. +4 −4 src/Guzzle/{Http → Batch}/BatchRequestTransfer.php
  11. +1 −1 src/Guzzle/{Common → }/Batch/BatchSizeDivisor.php
  12. +1 −1 src/Guzzle/{Common → }/Batch/BatchTransferInterface.php
  13. +4 −4 src/Guzzle/{Common → Batch}/Exception/BatchTransferException.php
  14. +2 −2 src/Guzzle/{Common → }/Batch/ExceptionBufferingBatch.php
  15. +1 −1 src/Guzzle/{Common → }/Batch/FlushingBatch.php
  16. +1 −1 src/Guzzle/{Common → }/Batch/HistoryBatch.php
  17. +1 −1 src/Guzzle/{Common → }/Batch/NotifyingBatch.php
  18. +27 −0 src/Guzzle/Batch/composer.json
  19. +1 −1 src/Guzzle/{Common → }/Cache/AbstractCacheAdapter.php
  20. +4 −2 src/Guzzle/{Common → }/Cache/CacheAdapterFactory.php
  21. +5 −6 src/Guzzle/{Common → }/Cache/CacheAdapterInterface.php
  22. +4 −5 src/Guzzle/{Common → }/Cache/ClosureCacheAdapter.php
  23. +1 −1 src/Guzzle/{Common → }/Cache/DoctrineCacheAdapter.php
  24. +1 −1 src/Guzzle/{Common → }/Cache/NullCacheAdapter.php
  25. +1 −1 src/Guzzle/{Common → }/Cache/Zf1CacheAdapter.php
  26. +6 −7 src/Guzzle/{Common → }/Cache/Zf2CacheAdapter.php
  27. +23 −0 src/Guzzle/Cache/composer.json
  28. +29 −0 src/Guzzle/Common/Collection.php
  29. +0 −2 src/Guzzle/Common/Exception/BadMethodCallException.php
  30. +0 −2 src/Guzzle/Common/Exception/ExceptionCollection.php
  31. +1 −1 src/Guzzle/Common/{ → Exception}/GuzzleException.php
  32. +0 −2 src/Guzzle/Common/Exception/InvalidArgumentException.php
  33. +0 −2 src/Guzzle/Common/Exception/RuntimeException.php
  34. +0 −2 src/Guzzle/Common/Exception/UnexpectedValueException.php
  35. +1 −2 src/Guzzle/Common/composer.json
  36. +1 −1 src/Guzzle/Http/EntityBody.php
  37. +1 −1 src/Guzzle/Http/EntityBodyInterface.php
  38. +2 −2 src/Guzzle/Http/{ → Exception}/HttpException.php
  39. +0 −1 src/Guzzle/Http/Exception/RequestException.php
  40. +11 −2 src/Guzzle/Http/composer.json
  41. +1 −1 src/Guzzle/{Common → }/Inflection/Inflector.php
  42. +1 −1 src/Guzzle/{Common → }/Inflection/InflectorInterface.php
  43. +1 −1 src/Guzzle/{Common → }/Inflection/MemoizingInflector.php
  44. +1 −1 src/Guzzle/{Common → }/Inflection/PreComputedInflector.php
  45. +22 −0 src/Guzzle/Inflection/composer.json
  46. +4 −2 src/Guzzle/Iterator/FilterIterator.php
  47. +4 −2 src/Guzzle/Iterator/MapIterator.php
  48. +5 −5 src/Guzzle/Iterator/composer.json
  49. +1 −1 src/Guzzle/{Common → }/Log/AbstractLogAdapter.php
  50. +1 −3 src/Guzzle/{Common → }/Log/ArrayLogAdapter.php
  51. +2 −4 src/Guzzle/{Common → }/Log/ClosureLogAdapter.php
  52. +1 −1 src/Guzzle/{Common → }/Log/LogAdapterInterface.php
  53. +1 −1 src/Guzzle/{Common → }/Log/MonologLogAdapter.php
  54. +1 −1 src/Guzzle/{Common → }/Log/Zf1LogAdapter.php
  55. +1 −1 src/Guzzle/{Common → }/Log/Zf2LogAdapter.php
  56. +22 −0 src/Guzzle/Log/composer.json
  57. +1 −1 src/Guzzle/{Http/Plugin → Plugin/Async}/AsyncPlugin.php
  58. +23 −0 src/Guzzle/Plugin/Async/composer.json
  59. +3 −3 src/Guzzle/{Http/Plugin/ExponentialBackoffLogger.php → Plugin/Backoff/BackoffLogger.php}
  60. +1 −1 src/Guzzle/{Http/Plugin → Plugin/Backoff}/ExponentialBackoffPlugin.php
  61. +24 −0 src/Guzzle/Plugin/Backoff/composer.json
  62. +2 −2 src/Guzzle/{Http/Plugin → Plugin/Cache}/CachePlugin.php
  63. +24 −0 src/Guzzle/Plugin/Cache/composer.json
  64. +1 −1 src/Guzzle/{Http/Plugin → Plugin/Cookie}/CookiePlugin.php
  65. +23 −0 src/Guzzle/Plugin/Cookie/composer.json
  66. +1 −1 src/Guzzle/{Http/Plugin → Plugin/CurlAuth}/CurlAuthPlugin.php
  67. +23 −0 src/Guzzle/Plugin/CurlAuth/composer.json
  68. +1 −1 src/Guzzle/{Http/Plugin → Plugin/History}/HistoryPlugin.php
  69. +23 −0 src/Guzzle/Plugin/History/composer.json
  70. +2 −2 src/Guzzle/{Http/Plugin → Plugin/Log}/LogPlugin.php
  71. +24 −0 src/Guzzle/Plugin/Log/composer.json
  72. +1 −1 src/Guzzle/{Http/Plugin → Plugin/Md5Validator}/Md5ValidatorPlugin.php
  73. +23 −0 src/Guzzle/Plugin/Md5Validator/composer.json
  74. +1 −1 src/Guzzle/{Http/Plugin → Plugin/Mock}/MockPlugin.php
  75. +23 −0 src/Guzzle/Plugin/Mock/composer.json
  76. +2 −3 src/Guzzle/{Http/Plugin → Plugin/Oauth}/OauthPlugin.php
  77. +23 −0 src/Guzzle/Plugin/Oauth/composer.json
  78. +39 −0 src/Guzzle/Plugin/composer.json
  79. +2 −2 src/Guzzle/Service/Client.php
  80. +1 −1 src/Guzzle/Service/ClientInterface.php
  81. +2 −2 src/Guzzle/Service/Command/Factory/ConcreteClassFactory.php
  82. +1 −1 src/Guzzle/Service/Command/Factory/ServiceDescriptionFactory.php
  83. +1 −1 src/Guzzle/Service/Description/ApiCommand.php
  84. +3 −1 src/Guzzle/Service/Exception/InconsistentClientTransferException.php
  85. +5 −25 src/Guzzle/Service/Inspector.php
  86. +3 −3 src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php
  87. +2 −2 src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php
  88. +26 −0 src/Guzzle/Service/composer.json
  89. +1 −1 src/Guzzle/{Common → Stream}/Stream.php
  90. +1 −1 src/Guzzle/{Common → Stream}/StreamInterface.php
  91. +23 −0 src/Guzzle/Stream/composer.json
  92. +1 −1 src/Guzzle/{Common → }/Validation/AbstractConstraint.php
  93. +1 −1 src/Guzzle/{Common → }/Validation/AbstractType.php
  94. +1 −1 src/Guzzle/{Common → }/Validation/AnyMatch.php
  95. +1 −1 src/Guzzle/{Common → }/Validation/Blank.php
  96. +1 −1 src/Guzzle/{Common → }/Validation/Bool.php
  97. +1 −1 src/Guzzle/{Common → }/Validation/Choice.php
  98. +1 −1 src/Guzzle/{Common → }/Validation/ConstraintInterface.php
  99. +1 −1 src/Guzzle/{Common → }/Validation/Ctype.php
  100. +1 −1 src/Guzzle/{Common → }/Validation/Email.php
  101. +1 −1 src/Guzzle/{Common → }/Validation/Ip.php
  102. +1 −1 src/Guzzle/{Common → }/Validation/IsInstanceOf.php
  103. +1 −1 src/Guzzle/{Common → }/Validation/NotBlank.php
  104. +1 −1 src/Guzzle/{Common → }/Validation/Numeric.php
  105. +1 −1 src/Guzzle/{Common → }/Validation/Regex.php
  106. +1 −1 src/Guzzle/{Common → }/Validation/String.php
  107. +1 −1 src/Guzzle/{Common → }/Validation/Type.php
  108. +1 −1 src/Guzzle/{Common → }/Validation/Url.php
  109. +26 −0 src/Guzzle/Validation/composer.json
  110. +7 −7 tests/Guzzle/Tests/{Common → }/Batch/AbstractBatchDecoratorTest.php
  111. +12 −12 tests/Guzzle/Tests/{Common → }/Batch/BatchBuilderTest.php
  112. +3 −3 tests/Guzzle/Tests/{Common → }/Batch/BatchClosureDivisorTest.php
  113. +4 −4 tests/Guzzle/Tests/{Common → }/Batch/BatchClosureTransferTest.php
  114. +3 −3 tests/Guzzle/Tests/{Service/Command → Batch}/BatchCommandTransferTest.php
  115. +2 −2 tests/Guzzle/Tests/{Http → Batch}/BatchRequestTransferTest.php
  116. +3 −3 tests/Guzzle/Tests/{Common → }/Batch/BatchSizeDivisorTest.php
  117. +6 −6 tests/Guzzle/Tests/{Common → }/Batch/BatchTest.php
  118. +6 −6 tests/Guzzle/Tests/{Common → }/Batch/ExceptionBufferingBatchTest.php
  119. +6 −6 tests/Guzzle/Tests/{Common → }/Batch/FlushingBatchTest.php
  120. +6 −6 tests/Guzzle/Tests/{Common → }/Batch/HistoryBatchTest.php
  121. +9 −9 tests/Guzzle/Tests/{Common → }/Batch/NotifyingBatchTest.php
  122. +18 −18 tests/Guzzle/Tests/{Common → }/Cache/CacheAdapterFactoryTest.php
  123. +8 −8 tests/Guzzle/Tests/{Common → }/Cache/CacheAdapterTest.php
  124. +9 −9 tests/Guzzle/Tests/{Common → }/Cache/ClosureCacheAdapterTest.php
  125. +2 −2 tests/Guzzle/Tests/{Common → }/Cache/NullCacheAdapterTest.php
  126. +3 −3 tests/Guzzle/Tests/{Common → }/Cache/Zf1CacheAdapterTest.php
  127. +7 −7 tests/Guzzle/Tests/{Common → }/Cache/Zf2CacheAdapterTest.php
  128. +28 −0 tests/Guzzle/Tests/Common/CollectionTest.php
  129. +3 −3 tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php
  130. +1 −1 tests/Guzzle/Tests/GuzzleTestCase.php
  131. +3 −3 tests/Guzzle/Tests/Http/ClientTest.php
  132. +2 −2 tests/Guzzle/Tests/Http/Curl/CurlMultiTest.php
  133. +1 −1 tests/Guzzle/Tests/Http/Message/RequestTest.php
  134. +3 −3 tests/Guzzle/Tests/{Common → }/Inflection/InflectorTest.php
  135. +5 −5 tests/Guzzle/Tests/{Common → }/Inflection/MemoizingInflectorTest.php
  136. +6 −6 tests/Guzzle/Tests/{Common → }/Inflection/PreComputedInflectorTest.php
  137. +2 −4 tests/Guzzle/Tests/{Common → }/Log/ArrayLogAdapterTest.php
  138. +5 −6 tests/Guzzle/Tests/{Common → }/Log/ClosureLogAdapterTest.php
  139. +3 −8 tests/Guzzle/Tests/{Common → }/Log/MonologLogAdapterTest.php
  140. 0 tests/Guzzle/Tests/{Common → }/Log/Zend_Log.php
  141. +5 −11 tests/Guzzle/Tests/{Common → }/Log/Zf1LogAdapterTest.php
  142. +3 −9 tests/Guzzle/Tests/{Common → }/Log/Zf2LogAdapterTest.php
  143. +5 −17 tests/Guzzle/Tests/{Http/Plugin → Plugin/Async}/AsyncPluginTest.php
  144. +7 −7 ...uzzle/Tests/{Http/Plugin/ExponentialBackoffLoggerTest.php → Plugin/Backoff/BackoffLoggerTest.php}
  145. +26 −26 tests/Guzzle/Tests/{Http/Plugin → Plugin/Backoff}/ExponentialBackoffTest.php
  146. +26 −26 tests/Guzzle/Tests/{Http/Plugin → Plugin/Cache}/CachePluginTest.php
  147. +3 −3 tests/Guzzle/Tests/{Http/Plugin → Plugin/Cookie}/CookiePluginTest.php
  148. +3 −3 tests/Guzzle/Tests/{Http/Plugin → Plugin/CurlAuth}/CurlAuthPluginTest.php
  149. +5 −28 tests/Guzzle/Tests/{Http/Plugin → Plugin/History}/HistoryPluginTest.php
  150. +5 −9 tests/Guzzle/Tests/{Http/Plugin → Plugin/Log}/LogPluginTest.php
  151. +3 −3 tests/Guzzle/Tests/{Http/Plugin → Plugin/Md5Validator}/Md5ValidatorPluginTest.php
  152. +5 −47 tests/Guzzle/Tests/{Http/Plugin → Plugin/Mock}/MockPluginTest.php
  153. +4 −4 tests/Guzzle/Tests/{Http/Plugin → Plugin/Oauth}/OauthPluginTest.php
  154. +1 −1 tests/Guzzle/Tests/Service/AbstractFactoryTest.php
  155. +5 −5 tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php
  156. +3 −3 tests/Guzzle/Tests/Service/ClientTest.php
  157. +1 −1 tests/Guzzle/Tests/Service/Command/CommandTest.php
  158. +1 −1 tests/Guzzle/Tests/Service/Command/Factory/ServiceDescriptionFactoryTest.php
  159. +1 −1 tests/Guzzle/Tests/Service/Description/ArrayDescriptionBuilderTest.php
  160. +1 −28 tests/Guzzle/Tests/Service/InspectorTest.php
  161. +20 −20 tests/Guzzle/Tests/{Common → Stream}/StreamTest.php
  162. +4 −4 tests/Guzzle/Tests/{Common → }/Validation/AnyMatchTest.php
  163. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/BlankTest.php
  164. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/BoolTest.php
  165. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/ChoiceTest.php
  166. +5 −5 tests/Guzzle/Tests/{Common → }/Validation/CtypeTest.php
  167. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/EmailTest.php
  168. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/IpTest.php
  169. +5 −5 tests/Guzzle/Tests/{Common → }/Validation/IsInstanceOfTest.php
  170. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/NotBlankTest.php
  171. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/NumericTest.php
  172. +4 −4 tests/Guzzle/Tests/{Common → }/Validation/RegexTest.php
  173. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/StringTest.php
  174. +5 −5 tests/Guzzle/Tests/{Common → }/Validation/TypeTest.php
  175. +3 −3 tests/Guzzle/Tests/{Common → }/Validation/UrlTest.php
  176. +1 −1 tests/Guzzle/Tests/{Common → }/Validation/Validation.php
View
@@ -19,9 +19,28 @@
],
"replace": {
+ "guzzle/batch": "self.version",
+ "guzzle/cache": "self.version",
"guzzle/common": "self.version",
"guzzle/http": "self.version",
- "guzzle/parser": "self.version"
+ "guzzle/inflection": "self.version",
+ "guzzle/iterator": "self.version",
+ "guzzle/log": "self.version",
+ "guzzle/parser": "self.version",
+ "guzzle/plugin": "self.version",
+ "guzzle/plugin-async": "self.version",
+ "guzzle/plugin-backoff": "self.version",
+ "guzzle/plugin-cache": "self.version",
+ "guzzle/plugin-cookie": "self.version",
+ "guzzle/plugin-curlauth": "self.version",
+ "guzzle/plugin-history": "self.version",
+ "guzzle/plugin-log": "self.version",
+ "guzzle/plugin-md5validator": "self.version",
+ "guzzle/plugin-mock": "self.version",
+ "guzzle/plugin-oauth": "self.version",
+ "guzzle/service": "self.version",
+ "guzzle/stream": "self.version",
+ "guzzle/validation": "self.version"
},
"require": {
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* Abstract decorator used when decorating a BatchInterface
@@ -1,8 +1,8 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
-use Guzzle\Common\Exception\BatchTransferException;
+use Guzzle\Batch\Exception\BatchTransferException;
/**
* Default batch implementation used to convert queued items into smaller
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
use Guzzle\Common\Exception\InvalidArgumentException;
use Guzzle\Common\Exception\RuntimeException;
@@ -44,8 +44,8 @@ class BatchBuilder
* @var array of Mapped transfer strategies by handle name
*/
protected static $mapping = array(
- 'request' => 'Guzzle\Http\BatchRequestTransfer',
- 'command' => 'Guzzle\Service\Command\BatchCommandTransfer'
+ 'request' => 'Guzzle\Batch\BatchRequestTransfer',
+ 'command' => 'Guzzle\Batch\BatchCommandTransfer'
);
/**
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
use Guzzle\Common\Exception\InvalidArgumentException;
@@ -24,6 +24,8 @@ class BatchClosureDivisor implements BatchDivisorInterface
* must accept an \SplQueue and return an array of
* arrays containing the divided items
* @param mixed $context Optional context to pass to the batch divisor
+ *
+ * @throws InvalidArgumentException if the callable is not callable
*/
public function __construct($callable, $context = null)
{
@@ -1,12 +1,12 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
use Guzzle\Common\Exception\InvalidArgumentException;
/**
* Batch transfer strategy where transfer logic can be defined via a Closure.
- * This class is to be used with {@see Guzzle\Common\Batch\BatchInterface}
+ * This class is to be used with {@see Guzzle\Batch\BatchInterface}
*/
class BatchClosureTransfer implements BatchTransferInterface
{
@@ -1,15 +1,16 @@
<?php
-namespace Guzzle\Service\Command;
+namespace Guzzle\Batch;
-use Guzzle\Common\Batch\BatchTransferInterface;
-use Guzzle\Common\Batch\BatchDivisorInterface;
+use Guzzle\Batch\BatchTransferInterface;
+use Guzzle\Batch\BatchDivisorInterface;
use Guzzle\Common\Exception\InvalidArgumentException;
+use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Exception\InconsistentClientTransferException;
/**
* Efficiently transfers multiple commands in parallel per client
- * This class is to be used with {@see Guzzle\Common\Batch\BatchInterface}
+ * This class is to be used with {@see Guzzle\Batch\BatchInterface}
*/
class BatchCommandTransfer implements BatchTransferInterface, BatchDivisorInterface
{
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* Interface used for dividing a queue of items into an array of batches
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* Interface for efficiently transferring items in a queue using batches
@@ -1,15 +1,15 @@
<?php
-namespace Guzzle\Http;
+namespace Guzzle\Batch;
-use Guzzle\Common\Batch\BatchTransferInterface;
-use Guzzle\Common\Batch\BatchDivisorInterface;
+use Guzzle\Batch\BatchTransferInterface;
+use Guzzle\Batch\BatchDivisorInterface;
use Guzzle\Common\Exception\InvalidArgumentException;
use Guzzle\Http\Message\RequestInterface;
/**
* Batch transfer strategy used to efficiently transfer a batch of requests.
- * This class is to be used with {@see Guzzle\Common\Batch\BatchInterface}
+ * This class is to be used with {@see Guzzle\Batch\BatchInterface}
*/
class BatchRequestTransfer implements BatchTransferInterface, BatchDivisorInterface
{
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* Divides batches into smaller batches under a certain size
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* Interface used for transferring batches of items
@@ -1,10 +1,10 @@
<?php
-namespace Guzzle\Common\Exception;
+namespace Guzzle\Batch\Exception;
-use Guzzle\Common\GuzzleException;
-use Guzzle\Common\Batch\BatchTransferInterface as TransferStrategy;
-use Guzzle\Common\Batch\BatchDivisorInterface as DivisorStrategy;
+use Guzzle\Common\Exception\GuzzleException;
+use Guzzle\Batch\BatchTransferInterface as TransferStrategy;
+use Guzzle\Batch\BatchDivisorInterface as DivisorStrategy;
/**
* Exception thrown during a batch transfer
@@ -1,8 +1,8 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
-use Guzzle\Common\Exception\BatchTransferException;
+use Guzzle\Batch\Exception\BatchTransferException;
/**
* BatchInterface decorator used to buffer exceptions encountered during a
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* BatchInterface decorator used to add automatic flushing of the queue when the
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
/**
* BatchInterface decorator used to keep a history of items that were added to
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Batch;
+namespace Guzzle\Batch;
use Guzzle\Common\Exception\InvalidArgumentException;
@@ -0,0 +1,27 @@
+{
+ "name": "guzzle/batch",
+ "type": "component",
+ "description": "Guzzle batch component for batching requests, commands, or custom transfers",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": ["batch", "HTTP", "REST", "guzzle"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.2",
+ "guzzle/common": "self.version"
+ },
+ "autoload": {
+ "psr-0": { "Guzzle\\Batch": "" }
+ },
+ "suggest": {
+ "guzzle/http": "self.version",
+ "guzzle/service": "self.version"
+ },
+ "target-dir": "Guzzle/Batch"
+}
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
/**
* Abstract cache adapter
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
use Guzzle\Common\FromConfigInterface;
use Guzzle\Common\Exception\InvalidArgumentException;
@@ -19,6 +19,7 @@ class CacheAdapterFactory implements FromConfigInterface
* @param array $config Array of configuration options
*
* @return CacheAdapterInterface
+ * @throws InvalidArgumentException
*/
public static function factory($config = array())
{
@@ -27,7 +28,7 @@ public static function factory($config = array())
}
if (!isset($config['cache.adapter']) && !isset($config['cache.provider'])) {
- $config['cache.adapter'] = 'Guzzle\\Common\\Cache\\NullCacheAdapter';
+ $config['cache.adapter'] = 'Guzzle\Cache\NullCacheAdapter';
$config['cache.provider'] = null;
} else {
// Validate that the options are valid
@@ -67,6 +68,7 @@ public static function factory($config = array())
* @param array $args Arguments for the class constructor
*
* @return mixed
+ * @throws RuntimeException
*/
protected static function createObject($className, array $args = null)
{
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
/**
* Interface for cache adapters.
@@ -44,11 +44,10 @@ public function fetch($id, array $options = null);
/**
* Puts data into the cache.
*
- * @param string $id The cache id.
- * @param string $data The cache entry/data.
- * @param int $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry. Set to null to
- * give an infinite lifetime.
- * @param array $options Array of cache adapter options
+ * @param string $id The cache id
+ * @param string $data The cache entry/data
+ * @param int|bool $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry
+ * @param array $options Array of cache adapter options
*
* @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
*/
@@ -1,8 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
-
-use Guzzle\Common\Exception\InvalidArgumentException;
+namespace Guzzle\Cache;
/**
* Cache adapter that defers to closures for implementation
@@ -25,14 +23,15 @@ class ClosureCacheAdapter implements CacheAdapterInterface
* - fetch: Callable that accepts an $id and $options argument
* - save: Callable that accepts an $id, $data, $lifeTime, and
* $options argument
+ *
+ * @throws \InvalidArgumentException if the callable is not callable
*/
public function __construct(array $callables)
{
// Validate each key to ensure it exists and is callable
foreach (array('contains', 'delete', 'fetch', 'save') as $key) {
if (!array_key_exists($key, $callables) || !is_callable($callables[$key])) {
- throw new InvalidArgumentException(
- "callables must contain a callable $key key");
+ throw new \InvalidArgumentException("callables must contain a callable {$key} key");
}
}
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
use Doctrine\Common\Cache\Cache;
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
use Doctrine\Common\Cache\Cache;
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
/**
* Zend Framework 1 cache adapter
@@ -1,6 +1,6 @@
<?php
-namespace Guzzle\Common\Cache;
+namespace Guzzle\Cache;
use Zend\Cache\Storage\Adapter\AdapterInterface;
@@ -17,12 +17,11 @@ class Zf2CacheAdapter extends AbstractCacheAdapter
protected $defaultOptions = array();
/**
- * @param AdapterInterface $cache Zend Framework 2 cache adapter
- * @param array $options Hash of default options for each cache method.
- * Can contain for 'contains', 'delete', 'fetch',
- * and 'save'. Each key must map to an
- * associative array of options to merge into the
- * options argument passed into each respective call.
+ * @param AdapterInterface $cache Zend Framework 2 cache adapter
+ * @param array $defaultOptions Hash of default options for each cache method. Can contain for
+ * 'contains', 'delete', 'fetch', and 'save'. Each key must map to an
+ * associative array of options to merge into the options argument passed
+ * into each respective call.
*/
public function __construct(AdapterInterface $cache, array $defaultOptions = array())
{
Oops, something went wrong.

0 comments on commit 4c12cc0

Please sign in to comment.