Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'aws/aws-sdk-php/src/S3/BatchDelete.php')
-rw-r--r--aws/aws-sdk-php/src/S3/BatchDelete.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/aws/aws-sdk-php/src/S3/BatchDelete.php b/aws/aws-sdk-php/src/S3/BatchDelete.php
index 5ee6a192..92439115 100644
--- a/aws/aws-sdk-php/src/S3/BatchDelete.php
+++ b/aws/aws-sdk-php/src/S3/BatchDelete.php
@@ -76,7 +76,7 @@ class BatchDelete implements PromisorInterface
}
}
}
- return $promises ? Promise\all($promises) : null;
+ return $promises ? Promise\Utils::all($promises) : null;
});
};
@@ -100,7 +100,7 @@ class BatchDelete implements PromisorInterface
array $options = []
) {
$fn = function (BatchDelete $that) use ($iter) {
- return Promise\coroutine(function () use ($that, $iter) {
+ return Promise\Coroutine::of(function () use ($that, $iter) {
foreach ($iter as $obj) {
if ($promise = $that->enqueue($obj)) {
yield $promise;
@@ -112,6 +112,9 @@ class BatchDelete implements PromisorInterface
return new self($client, $bucket, $fn, $options);
}
+ /**
+ * @return PromiseInterface
+ */
public function promise()
{
if (!$this->cachedPromise) {
@@ -225,12 +228,12 @@ class BatchDelete implements PromisorInterface
// When done, ensure cleanup and that any remaining are processed.
return $promise->then(
function () use ($cleanup) {
- return Promise\promise_for($this->flushQueue())
+ return Promise\Create::promiseFor($this->flushQueue())
->then($cleanup);
},
function ($reason) use ($cleanup) {
$cleanup();
- return Promise\rejection_for($reason);
+ return Promise\Create::rejectionFor($reason);
}
);
}