1 | <?php |
||
9 | class ExprMessage implements MessageInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var OptionsInterface |
||
13 | */ |
||
14 | private $options; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $query; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $queryType; |
||
25 | |||
26 | /** |
||
27 | * @param int $queryType |
||
28 | * @param string $query |
||
29 | * @param OptionsInterface $options |
||
30 | */ |
||
31 | 2 | public function __construct(int $queryType = null, string $query = '', OptionsInterface $options = null) |
|
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function getQueryType(): int |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function setCommand(int $queryType): MessageInterface |
||
50 | { |
||
51 | $this->queryType = $queryType; |
||
52 | |||
53 | return $this; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | public function setQuery($query): MessageInterface |
||
60 | { |
||
61 | $this->query = (string) $query; |
||
62 | |||
63 | return $this; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | 1 | public function getOptions(): OptionsInterface |
|
73 | |||
74 | /** |
||
75 | * @inheritdoc |
||
76 | */ |
||
77 | 2 | public function setOptions(OptionsInterface $options): MessageInterface |
|
83 | |||
84 | /** |
||
85 | * @inheritdoc |
||
86 | */ |
||
87 | 1 | public function toArray(): array |
|
95 | |||
96 | /** |
||
97 | * @return array |
||
98 | */ |
||
99 | 1 | public function jsonSerialize(): array |
|
103 | } |
||
104 |