@@ 9-32 (lines=24) @@ | ||
6 | ||
7 | use Aweapi\Openapi\Collection; |
|
8 | ||
9 | final class ParameterCollection extends Collection |
|
10 | { |
|
11 | private $items = []; |
|
12 | ||
13 | public function __construct(iterable $items = []) |
|
14 | { |
|
15 | foreach ($items as $item) { |
|
16 | $this->addItem($item); |
|
17 | } |
|
18 | } |
|
19 | ||
20 | /** |
|
21 | * @return array<int, Parameter> |
|
22 | */ |
|
23 | public function getItems(): array |
|
24 | { |
|
25 | return $this->items; |
|
26 | } |
|
27 | ||
28 | private function addItem(Parameter $item): void |
|
29 | { |
|
30 | $this->items[] = $item; |
|
31 | } |
|
32 | } |
|
33 |
@@ 9-32 (lines=24) @@ | ||
6 | ||
7 | use Aweapi\Openapi\Collection; |
|
8 | ||
9 | final class SecurityRequirementCollection extends Collection |
|
10 | { |
|
11 | private $items = []; |
|
12 | ||
13 | public function __construct(iterable $items = []) |
|
14 | { |
|
15 | foreach ($items as $item) { |
|
16 | $this->addItem($item); |
|
17 | } |
|
18 | } |
|
19 | ||
20 | /** |
|
21 | * @return array<int, SecurityRequirement> |
|
22 | */ |
|
23 | public function getItems(): array |
|
24 | { |
|
25 | return $this->items; |
|
26 | } |
|
27 | ||
28 | private function addItem(SecurityRequirement $item): void |
|
29 | { |
|
30 | $this->items[] = $item; |
|
31 | } |
|
32 | } |
|
33 |
@@ 9-32 (lines=24) @@ | ||
6 | ||
7 | use Aweapi\Openapi\Collection; |
|
8 | ||
9 | final class ServerCollection extends Collection |
|
10 | { |
|
11 | private $items = []; |
|
12 | ||
13 | public function __construct(iterable $items = []) |
|
14 | { |
|
15 | foreach ($items as $item) { |
|
16 | $this->addItem($item); |
|
17 | } |
|
18 | } |
|
19 | ||
20 | /** |
|
21 | * @return array<int, Server> |
|
22 | */ |
|
23 | public function getItems(): array |
|
24 | { |
|
25 | return $this->items; |
|
26 | } |
|
27 | ||
28 | private function addItem(Server $item): void |
|
29 | { |
|
30 | $this->items[] = $item; |
|
31 | } |
|
32 | } |
|
33 |
@@ 9-32 (lines=24) @@ | ||
6 | ||
7 | use Aweapi\Openapi\Collection; |
|
8 | ||
9 | final class TagCollection extends Collection |
|
10 | { |
|
11 | private $items = []; |
|
12 | ||
13 | public function __construct(iterable $items = []) |
|
14 | { |
|
15 | foreach ($items as $item) { |
|
16 | $this->addItem($item); |
|
17 | } |
|
18 | } |
|
19 | ||
20 | /** |
|
21 | * @return array<int, Tag> |
|
22 | */ |
|
23 | public function getItems(): array |
|
24 | { |
|
25 | return $this->items; |
|
26 | } |
|
27 | ||
28 | private function addItem(Tag $item): void |
|
29 | { |
|
30 | $this->items[] = $item; |
|
31 | } |
|
32 | } |
|
33 |