source: externals/php/vendor/guzzlehttp/promises/tests/Thennable.php@ b858e6f

Last change on this file since b858e6f 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
Line 
1<?php
2namespace GuzzleHttp\Promise\Tests;
3
4use GuzzleHttp\Promise\Promise;
5
6class 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.