golden hour
/home/doctorbruno/public_html/doc-noc.org/wp-content/plugins/updraftplus/vendor/aws/aws-sdk-php/src
⬆️ Go Up
Upload
File/Folder
Size
Actions
AbstractConfigurationProvider.php
4.46 KB
Del
OK
Api
-
Del
OK
Arn
-
Del
OK
AwsClient.php
17.59 KB
Del
OK
AwsClientInterface.php
5.4 KB
Del
OK
AwsClientTrait.php
2.67 KB
Del
OK
CacheInterface.php
755 B
Del
OK
ClientResolver.php
43.37 KB
Del
OK
ClientSideMonitoring
-
Del
OK
Command.php
1.39 KB
Del
OK
CommandInterface.php
946 B
Del
OK
CommandPool.php
5.2 KB
Del
OK
ConfigurationProviderInterface.php
246 B
Del
OK
Credentials
-
Del
OK
DefaultsMode
-
Del
OK
DoctrineCacheAdapter.php
989 B
Del
OK
Endpoint
-
Del
OK
EndpointDiscovery
-
Del
OK
EndpointParameterMiddleware.php
2.73 KB
Del
OK
Exception
-
Del
OK
Handler
-
Del
OK
HandlerList.php
13.24 KB
Del
OK
HasDataTrait.php
1.46 KB
Del
OK
HasMonitoringEventsTrait.php
869 B
Del
OK
HashInterface.php
531 B
Del
OK
HashingStream.php
1.5 KB
Del
OK
History.php
3.9 KB
Del
OK
Iam
-
Del
OK
IdempotencyTokenMiddleware.php
3.69 KB
Del
OK
InputValidationMiddleware.php
2.44 KB
Del
OK
JsonCompiler.php
478 B
Del
OK
Keyspaces
-
Del
OK
LruArrayCache.php
2.22 KB
Del
OK
Middleware.php
12.77 KB
Del
OK
MockHandler.php
4.05 KB
Del
OK
MonitoringEventsInterface.php
742 B
Del
OK
MultiRegionClient.php
7.75 KB
Del
OK
Multipart
-
Del
OK
PhpHash.php
1.81 KB
Del
OK
PresignUrlMiddleware.php
4.18 KB
Del
OK
Psr16CacheAdapter.php
572 B
Del
OK
PsrCacheAdapter.php
742 B
Del
OK
ResponseContainerInterface.php
246 B
Del
OK
Result.php
1.14 KB
Del
OK
ResultInterface.php
1.34 KB
Del
OK
ResultPaginator.php
5.24 KB
Del
OK
Retry
-
Del
OK
RetryMiddleware.php
8.47 KB
Del
OK
RetryMiddlewareV2.php
11.67 KB
Del
OK
S3
-
Del
OK
Sdk.php
52.08 KB
Del
OK
Signature
-
Del
OK
StreamRequestPayloadMiddleware.php
2.57 KB
Del
OK
TraceMiddleware.php
12.25 KB
Del
OK
Waiter.php
8.33 KB
Del
OK
WrappedHttpHandler.php
6.97 KB
Del
OK
data
-
Del
OK
functions.php
13.58 KB
Del
OK
Edit: MockHandler.php
<?php namespace Aws; use Aws\Exception\AwsException; use GuzzleHttp\Promise; use GuzzleHttp\Promise\RejectedPromise; use Psr\Http\Message\RequestInterface; use Exception; /** * Returns promises that are rejected or fulfilled using a queue of * Aws\ResultInterface and Aws\Exception\AwsException objects. */ class MockHandler implements \Countable { private $queue; private $lastCommand; private $lastRequest; private $onFulfilled; private $onRejected; /** * The passed in value must be an array of {@see Aws\ResultInterface} or * {@see AwsException} objects that acts as a queue of results or * exceptions to return each time the handler is invoked. * * @param array $resultOrQueue * @param callable $onFulfilled Callback to invoke when the return value is fulfilled. * @param callable $onRejected Callback to invoke when the return value is rejected. */ public function __construct( array $resultOrQueue = [], callable $onFulfilled = null, callable $onRejected = null ) { $this->onFulfilled = $onFulfilled; $this->onRejected = $onRejected; if ($resultOrQueue) { call_user_func_array([$this, 'append'], $resultOrQueue); } } /** * Adds one or more variadic ResultInterface or AwsException objects to the * queue. */ public function append() { foreach (func_get_args() as $value) { if ($value instanceof ResultInterface || $value instanceof Exception || is_callable($value) ) { $this->queue[] = $value; } else { throw new \InvalidArgumentException('Expected an Aws\ResultInterface or Exception.'); } } } /** * Adds one or more \Exception or \Throwable to the queue */ public function appendException() { foreach (func_get_args() as $value) { if ($value instanceof \Exception || $value instanceof \Throwable) { $this->queue[] = $value; } else { throw new \InvalidArgumentException('Expected an \Exception or \Throwable.'); } } } public function __invoke( CommandInterface $command, RequestInterface $request ) { if (!$this->queue) { $last = $this->lastCommand ? ' The last command sent was ' . $this->lastCommand->getName() . '.' : ''; throw new \RuntimeException('Mock queue is empty. Trying to send a ' . $command->getName() . ' command failed.' . $last); } $this->lastCommand = $command; $this->lastRequest = $request; $result = array_shift($this->queue); if (is_callable($result)) { $result = $result($command, $request); } if ($result instanceof \Exception) { $result = new RejectedPromise($result); } else { // Add an effective URI and statusCode if not present. $meta = $result['@metadata']; if (!isset($meta['effectiveUri'])) { $meta['effectiveUri'] = (string) $request->getUri(); } if (!isset($meta['statusCode'])) { $meta['statusCode'] = 200; } $result['@metadata'] = $meta; $result = Promise\Create::promiseFor($result); } $result->then($this->onFulfilled, $this->onRejected); return $result; } /** * Get the last received request. * * @return RequestInterface */ public function getLastRequest() { return $this->lastRequest; } /** * Get the last received command. * * @return CommandInterface */ public function getLastCommand() { return $this->lastCommand; } /** * Returns the number of remaining items in the queue. * * @return int */ #[\ReturnTypeWillChange] public function count() { return count($this->queue); } }
Save