/
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/RejectedPromise.php
(1029B)
<?php namespace Http\Promise; /** * A rejected promise. * * @author Joel Wurtz <joel.wurtz@gmail.com> */ final class RejectedPromise implements Promise { /** * @var \Exception */ private $exception; /** * @param \Exception $exception */ public function __construct(\Exception $exception) { $this->exception = $exception; } /** * {@inheritdoc} */ public function then(callable $onFulfilled = null, callable $onRejected = null) { if (null === $onRejected) { return $this; } try { return new FulfilledPromise($onRejected($this->exception)); } catch (\Exception $e) { return new self($e); } } /** * {@inheritdoc} */ public function getState() { return Promise::REJECTED; } /** * {@inheritdoc} */ public function wait($unwrap = true) { if ($unwrap) { throw $this->exception; } } }
Save
cmd:
run