PluginProbe
WP-Stateless – Google Cloud Storage / 2.1.4
WP-Stateless – Google Cloud Storage v2.1.4
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / lib / Google / vendor / react / promise / tests / PromiseAdapter / CallbackPromiseAdapter.php

CallbackPromiseAdapter.php in WP-Stateless – Google Cloud Storage 2.1.4, at lib/Google/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php

41 lines 886 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace React\Promise\PromiseAdapter;
4
5 use React\Promise;
6
7 class CallbackPromiseAdapter implements PromiseAdapterInterface
8 {
9 private $callbacks;
10
11 public function __construct(array $callbacks)
12 {
13 $this->callbacks = $callbacks;
14 }
15
16 public function promise()
17 {
18 return call_user_func_array($this->callbacks['promise'], func_get_args());
19 }
20
21 public function resolve()
22 {
23 return call_user_func_array($this->callbacks['resolve'], func_get_args());
24 }
25
26 public function reject()
27 {
28 return call_user_func_array($this->callbacks['reject'], func_get_args());
29 }
30
31 public function notify()
32 {
33 return call_user_func_array($this->callbacks['notify'], func_get_args());
34 }
35
36 public function settle()
37 {
38 return call_user_func_array($this->callbacks['settle'], func_get_args());
39 }
40 }
41