__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
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.
*
* @see https://promisesaplus.com/
*/
interface PromiseInterface
{
public const PENDING = 'pending';
public const FULFILLED = 'fulfilled';
public 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.
*/
public function then(
callable $onFulfilled = null,
callable $onRejected = null
): PromiseInterface;
/**
* 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.
*/
public function otherwise(callable $onRejected): PromiseInterface;
/**
* 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.
*/
public function getState(): string;
/**
* Resolve the promise with the given value.
*
* @param mixed $value
*
* @throws \RuntimeException if the promise is already resolved.
*/
public function resolve($value): void;
/**
* Reject the promise with the given reason.
*
* @param mixed $reason
*
* @throws \RuntimeException if the promise is already resolved.
*/
public function reject($reason): void;
/**
* Cancels the promise if possible.
*
* @see https://github.com/promises-aplus/cancellation-spec/issues/7
*/
public function cancel(): void;
/**
* 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.
*
* @return mixed
*
* @throws \LogicException if the promise has no wait function or if the
* promise does not settle after waiting.
*/
public function wait(bool $unwrap = true);
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AggregateException.php | File | 413 B | 0777 |
|
| CancellationException.php | File | 209 B | 0777 |
|
| Coroutine.php | File | 4.06 KB | 0777 |
|
| Create.php | File | 1.96 KB | 0777 |
|
| Each.php | File | 2.6 KB | 0777 |
|
| EachPromise.php | File | 7.42 KB | 0777 |
|
| FulfilledPromise.php | File | 2 KB | 0777 |
|
| Is.php | File | 941 B | 0777 |
|
| Promise.php | File | 8.75 KB | 0777 |
|
| PromiseInterface.php | File | 2.76 KB | 0777 |
|
| PromisorInterface.php | File | 249 B | 0777 |
|
| RejectedPromise.php | File | 2.21 KB | 0777 |
|
| RejectionException.php | File | 1.21 KB | 0777 |
|
| TaskQueue.php | File | 1.97 KB | 0777 |
|
| TaskQueueInterface.php | File | 450 B | 0777 |
|
| Utils.php | File | 8.18 KB | 0777 |
|