1 | <?php |
||
2 | |||
3 | /** |
||
4 | * This file is part of the tarantool/client package. |
||
5 | * |
||
6 | * (c) Eugene Leonovich <[email protected]> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace App; |
||
15 | |||
16 | use Tarantool\Client\Request\CallRequest; |
||
17 | use Tarantool\Client\Request\Request; |
||
18 | |||
19 | final class LegacyCallRequest implements Request |
||
20 | { |
||
21 | private const TYPE = 6; |
||
22 | |||
23 | /** @var non-empty-array<int, string|array> */ |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
24 | private $body; |
||
25 | |||
26 | /** |
||
27 | * @param non-empty-array<int, string|array> $body |
||
0 ignored issues
–
show
|
|||
28 | */ |
||
29 | private function __construct($body) |
||
30 | { |
||
31 | $this->body = $body; |
||
32 | } |
||
33 | |||
34 | public static function fromCallRequest(CallRequest $request) : self |
||
35 | { |
||
36 | return new self($request->getBody()); |
||
37 | } |
||
38 | |||
39 | public function getType() : int |
||
40 | { |
||
41 | return self::TYPE; |
||
42 | } |
||
43 | |||
44 | public function getBody() : array |
||
45 | { |
||
46 | return $this->body; |
||
47 | } |
||
48 | } |
||
49 |