close
Warning:
PreferencesModule failed with TracError: Unable to instantiate component <class 'trac.prefs.web_ui.AdvancedPreferencePanel'> (super(type, obj): obj (type AdvancedPreferencePanel) is not an instance or subtype of type (Markup).)
|
Last change
on this file since ff873dc was 01a620f, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago |
|
Removed submodules for php externals and use composer to provide them and versioned them afterwards
|
-
Property mode
set to
100644
|
|
File size:
961 bytes
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | namespace GuzzleHttp\Promise\Tests;
|
|---|
| 3 |
|
|---|
| 4 | use GuzzleHttp\Promise\Promise;
|
|---|
| 5 | use GuzzleHttp\Promise\PromiseInterface;
|
|---|
| 6 |
|
|---|
| 7 | class NotPromiseInstance extends Thennable implements PromiseInterface
|
|---|
| 8 | {
|
|---|
| 9 | private $nextPromise = null;
|
|---|
| 10 |
|
|---|
| 11 | public function __construct()
|
|---|
| 12 | {
|
|---|
| 13 | $this->nextPromise = new Promise();
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | public function then(callable $res = null, callable $rej = null)
|
|---|
| 17 | {
|
|---|
| 18 | return $this->nextPromise->then($res, $rej);
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | public function otherwise(callable $onRejected)
|
|---|
| 22 | {
|
|---|
| 23 | return $this->then($onRejected);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | public function resolve($value)
|
|---|
| 27 | {
|
|---|
| 28 | $this->nextPromise->resolve($value);
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | public function reject($reason)
|
|---|
| 32 | {
|
|---|
| 33 | $this->nextPromise->reject($reason);
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | public function wait($unwrap = true, $defaultResolution = null)
|
|---|
| 37 | {
|
|---|
| 38 |
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | public function cancel()
|
|---|
| 42 | {
|
|---|
| 43 |
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | public function getState()
|
|---|
| 47 | {
|
|---|
| 48 | return $this->nextPromise->getState();
|
|---|
| 49 | }
|
|---|
| 50 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.
Download in other formats: