1 | <?php declare(strict_types=1); |
||
5 | abstract class AbstractParams |
||
6 | { |
||
7 | // locations |
||
8 | const QUERY = 'query'; |
||
9 | const HEADER = 'header'; |
||
10 | const URL = 'url'; |
||
11 | const JSON = 'json'; |
||
12 | const RAW = 'raw'; |
||
13 | |||
14 | // types |
||
15 | const STRING_TYPE = "string"; |
||
16 | const BOOL_TYPE = "boolean"; |
||
17 | const BOOLEAN_TYPE = self::BOOL_TYPE; |
||
18 | const OBJECT_TYPE = "object"; |
||
19 | const ARRAY_TYPE = "array"; |
||
20 | const NULL_TYPE = "NULL"; |
||
21 | const INT_TYPE = 'integer'; |
||
22 | const INTEGER_TYPE = self::INT_TYPE; |
||
23 | |||
24 | public static function isSupportedLocation(string $val): bool |
||
25 | { |
||
26 | return in_array($val, [self::QUERY, self::HEADER, self::URL, self::JSON, self::RAW]); |
||
27 | } |
||
28 | |||
29 | public function limit(): array |
||
40 | |||
41 | public function marker(): array |
||
53 | |||
54 | public function id(string $type): array |
||
62 | |||
63 | public function idPath(): array |
||
71 | |||
72 | public function name(string $resource): array |
||
80 | |||
81 | |||
82 | public function sortDir(): array |
||
91 | |||
92 | public function sortKey(): array |
||
100 | |||
101 | public function allTenants(): array |
||
110 | } |
||
111 |