1 | <?php |
||
15 | class AsyncClient |
||
16 | { |
||
17 | protected $transport; |
||
18 | |||
19 | public function __construct(LoopInterface $loop, string $token, array $options = [], Transport $transport = null) |
||
20 | { |
||
21 | if (!($transport instanceof Transport)) { |
||
22 | $settings = [ |
||
23 | 'resource_namespace' => 'Async', |
||
24 | ] + ApiSettings::transportOptionsWithToken($token) + $options; |
||
25 | $transport = Factory::create($loop, $settings); |
||
26 | } |
||
27 | $this->transport = $transport; |
||
28 | } |
||
29 | |||
30 | public function projects(): ObservableInterface |
||
40 | |||
41 | public function project(string $repository): PromiseInterface |
||
47 | } |
||
48 |