|
Last change
on this file since 8f38d1e 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:
449 bytes
|
| Rev | Line | |
|---|
| [01a620f] | 1 | <?php
|
|---|
| 2 | namespace GuzzleHttp\Promise\Tests;
|
|---|
| 3 |
|
|---|
| 4 | use GuzzleHttp\Promise\Promise;
|
|---|
| 5 |
|
|---|
| 6 | class Thennable
|
|---|
| 7 | {
|
|---|
| 8 | private $nextPromise = null;
|
|---|
| 9 |
|
|---|
| 10 | public function __construct()
|
|---|
| 11 | {
|
|---|
| 12 | $this->nextPromise = new Promise();
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | public function then(callable $res = null, callable $rej = null)
|
|---|
| 16 | {
|
|---|
| 17 | return $this->nextPromise->then($res, $rej);
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | public function resolve($value)
|
|---|
| 21 | {
|
|---|
| 22 | $this->nextPromise->resolve($value);
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.