class NotPromiseInstance in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/NotPromiseInstance.php \GuzzleHttp\Promise\Tests\NotPromiseInstance
Hierarchy
- class \GuzzleHttp\Promise\Tests\Thennable
- class \GuzzleHttp\Promise\Tests\NotPromiseInstance implements PromiseInterface
Expanded class hierarchy of NotPromiseInstance
File
- vendor/
guzzlehttp/ promises/ tests/ NotPromiseInstance.php, line 7
Namespace
GuzzleHttp\Promise\TestsView source
class NotPromiseInstance extends Thennable implements PromiseInterface {
private $nextPromise = null;
public function __construct() {
$this->nextPromise = new Promise();
}
public function then(callable $res = null, callable $rej = null) {
return $this->nextPromise
->then($res, $rej);
}
public function otherwise(callable $onRejected) {
return $this
->then($onRejected);
}
public function resolve($value) {
$this->nextPromise
->resolve($value);
}
public function reject($reason) {
$this->nextPromise
->reject($reason);
}
public function wait($unwrap = true, $defaultResolution = null) {
}
public function cancel() {
}
public function getState() {
return $this->nextPromise
->getState();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NotPromiseInstance:: |
private | property |
Overrides Thennable:: |
|
NotPromiseInstance:: |
public | function |
Cancels the promise if possible. Overrides PromiseInterface:: |
|
NotPromiseInstance:: |
public | function |
Get the state of the promise ("pending", "rejected", or "fulfilled"). Overrides PromiseInterface:: |
|
NotPromiseInstance:: |
public | function |
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. Overrides PromiseInterface:: |
|
NotPromiseInstance:: |
public | function |
Reject the promise with the given reason. Overrides PromiseInterface:: |
|
NotPromiseInstance:: |
public | function |
Resolve the promise with the given value. Overrides Thennable:: |
|
NotPromiseInstance:: |
public | function |
Appends fulfillment and rejection handlers to the promise, and returns
a new promise resolving to the return value of the called handler. Overrides Thennable:: |
|
NotPromiseInstance:: |
public | function |
Waits until the promise completes if possible. Overrides PromiseInterface:: |
|
NotPromiseInstance:: |
public | function |
Overrides Thennable:: |
|
PromiseInterface:: |
constant | |||
PromiseInterface:: |
constant | |||
PromiseInterface:: |
constant |