<?php namespace React\Promise; class SimpleFulfilledTestPromise implements PromiseInterface { public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null) { try { if ($onFulfilled) { $onFulfilled('foo'); } return new self(); } catch (\Throwable $exception) { return new RejectedPromise($exception); } catch (\Exception $exception) { return new RejectedPromise($exception); } } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
SimpleFulfilledTestPromise.php | File | 550 B | 0644 |
|
SimpleFulfilledTestThenable.php | File | 523 B | 0644 |
|
SimpleRejectedTestPromise.php | File | 547 B | 0644 |
|
SimpleTestCancellable.php | File | 177 B | 0644 |
|
SimpleTestCancellableThenable.php | File | 338 B | 0644 |
|