1 | <?php declare(strict_types = 1); |
||
15 | abstract class Parameter implements Element |
||
16 | { |
||
17 | use VisiteeMixin; |
||
18 | |||
19 | const IN_BODY = 'body'; |
||
20 | const IN_PATH = 'path'; |
||
21 | const IN_QUERY = 'query'; |
||
22 | const IN_HEADER = 'header'; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $collectionFormat; |
||
33 | |||
34 | /** |
||
35 | * @var Schema |
||
36 | */ |
||
37 | protected $schema; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | protected $required = false; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $in; |
||
48 | |||
49 | /** |
||
50 | * @var string|null |
||
51 | */ |
||
52 | protected $enum; |
||
53 | |||
54 | /** |
||
55 | * @var string|null |
||
56 | */ |
||
57 | protected $pattern; |
||
58 | |||
59 | /** |
||
60 | * @return string|null |
||
61 | */ |
||
62 | public function getEnum() |
||
66 | |||
67 | /** |
||
68 | * @return string|null |
||
69 | */ |
||
70 | public function getPattern() |
||
74 | |||
75 | /** |
||
76 | * @return string|null |
||
77 | */ |
||
78 | public function getCollectionFormat() |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getIn(): string |
||
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function isRequired(): bool |
||
98 | |||
99 | /** |
||
100 | * @return Schema |
||
101 | */ |
||
102 | public function getSchema(): Schema |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getName(): string |
||
114 | |||
115 | /** |
||
116 | * @param string $location |
||
117 | * |
||
118 | * @return bool |
||
119 | */ |
||
120 | public function isIn(string $location): bool |
||
124 | } |
||
125 |