summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/promises/src/PromiseInterface.php
diff options
context:
space:
mode:
authorEoleDev <EoleDev@outlook.fr>2016-04-14 16:28:25 +0200
committerEoleDev <EoleDev@outlook.fr>2016-04-14 16:28:25 +0200
commit31d2d0c158ad4daa3dde7a905f3c2e312c194f2e (patch)
tree43d761d2aec8265a22c0fdedcc365bacc10dc814 /server/vendor/guzzlehttp/promises/src/PromiseInterface.php
parent27730911d8c9253a4f5aa90450c57cdeca9d5d26 (diff)
parentb348dbc2266a3e8070a3951fb0bd8c19b852ec47 (diff)
Merge branch 'compute'
Conflicts: server/core/LibOverride/genTokenOptions.php
Diffstat (limited to 'server/vendor/guzzlehttp/promises/src/PromiseInterface.php')
-rwxr-xr-xserver/vendor/guzzlehttp/promises/src/PromiseInterface.php93
1 files changed, 0 insertions, 93 deletions
diff --git a/server/vendor/guzzlehttp/promises/src/PromiseInterface.php b/server/vendor/guzzlehttp/promises/src/PromiseInterface.php
deleted file mode 100755
index 8f5f4b9..0000000
--- a/server/vendor/guzzlehttp/promises/src/PromiseInterface.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-namespace GuzzleHttp\Promise;
-
-/**
- * A promise represents the eventual result of an asynchronous operation.
- *
- * The primary way of interacting with a promise is through its then method,
- * which registers callbacks to receive either a promise’s eventual value or
- * the reason why the promise cannot be fulfilled.
- *
- * @link https://promisesaplus.com/
- */
-interface PromiseInterface
-{
- const PENDING = 'pending';
- const FULFILLED = 'fulfilled';
- const REJECTED = 'rejected';
-
- /**
- * Appends fulfillment and rejection handlers to the promise, and returns
- * a new promise resolving to the return value of the called handler.
- *
- * @param callable $onFulfilled Invoked when the promise fulfills.
- * @param callable $onRejected Invoked when the promise is rejected.
- *
- * @return PromiseInterface
- */
- public function then(
- callable $onFulfilled = null,
- callable $onRejected = null
- );
-
- /**
- * Appends a rejection handler callback to the promise, and returns a new
- * promise resolving to the return value of the callback if it is called,
- * or to its original fulfillment value if the promise is instead
- * fulfilled.
- *
- * @param callable $onRejected Invoked when the promise is rejected.
- *
- * @return PromiseInterface
- */
- public function otherwise(callable $onRejected);
-
- /**
- * Get the state of the promise ("pending", "rejected", or "fulfilled").
- *
- * The three states can be checked against the constants defined on
- * PromiseInterface: PENDING, FULFILLED, and REJECTED.
- *
- * @return string
- */
- public function getState();
-
- /**
- * Resolve the promise with the given value.
- *
- * @param mixed $value
- * @throws \RuntimeException if the promise is already resolved.
- */
- public function resolve($value);
-
- /**
- * Reject the promise with the given reason.
- *
- * @param mixed $reason
- * @throws \RuntimeException if the promise is already resolved.
- */
- public function reject($reason);
-
- /**
- * Cancels the promise if possible.
- *
- * @link https://github.com/promises-aplus/cancellation-spec/issues/7
- */
- public function cancel();
-
- /**
- * Waits until the promise completes if possible.
- *
- * Pass $unwrap as true to unwrap the result of the promise, either
- * returning the resolved value or throwing the rejected exception.
- *
- * If the promise cannot be waited on, then the promise will be rejected.
- *
- * @param bool $unwrap
- *
- * @return mixed
- * @throws \LogicException if the promise has no wait function or if the
- * promise does not settle after waiting.
- */
- public function wait($unwrap = true);
-}