1 | <?php declare(strict_types=1); |
||
26 | class BaseQueryParser implements BaseQueryParserInterface |
||
27 | { |
||
28 | use BaseQueryParserTrait { |
||
29 | BaseQueryParserTrait::getFields as getFieldsImpl; |
||
30 | BaseQueryParserTrait::getIncludes as getIncludesImpl; |
||
31 | BaseQueryParserTrait::getIncludePaths as getIncludePathsImpl; |
||
32 | BaseQueryParserTrait::getSorts as getSortsImpl; |
||
33 | BaseQueryParserTrait::getProfileUrls as getProfileUrlsImpl; |
||
34 | } |
||
35 | |||
36 | /** Message */ |
||
37 | public const MSG_ERR_INVALID_PARAMETER = 'Invalid Parameter.'; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private $parameters; |
||
43 | |||
44 | /** |
||
45 | * @var string[]|null |
||
46 | */ |
||
47 | private $messages; |
||
48 | |||
49 | /** |
||
50 | * @param array $parameters |
||
51 | * @param string[]|null $messages |
||
52 | */ |
||
53 | 14 | public function __construct(array $parameters = [], array $messages = null) |
|
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | 4 | public function getFields(): iterable |
|
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | 11 | public function getIncludes(): iterable |
|
73 | |||
74 | /** |
||
75 | * @inheritdoc |
||
76 | */ |
||
77 | 1 | public function getIncludePaths(): iterable |
|
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | */ |
||
85 | 2 | public function getSorts(): iterable |
|
89 | |||
90 | /** |
||
91 | * @inheritdoc |
||
92 | */ |
||
93 | 1 | public function getProfileUrls(): iterable |
|
97 | |||
98 | /** |
||
99 | * @param array $parameters |
||
100 | * |
||
101 | * @return self |
||
102 | */ |
||
103 | 14 | protected function setParameters(array $parameters): self |
|
109 | |||
110 | /** |
||
111 | * @return array |
||
112 | */ |
||
113 | 14 | protected function getParameters(): array |
|
117 | |||
118 | /** |
||
119 | * @param array $messages |
||
120 | * |
||
121 | * @return self |
||
122 | */ |
||
123 | 14 | protected function setMessages(?array $messages): self |
|
129 | |||
130 | /** |
||
131 | * @param string $message |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | 14 | protected function getMessage(string $message): string |
|
139 | } |
||
140 |