-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplateReflection.php
More file actions
33 lines (29 loc) · 831 Bytes
/
TemplateReflection.php
File metadata and controls
33 lines (29 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace NamelessCoder\FluidParameters\Reflection;
class TemplateReflection extends AbstractReflection
{
/**
* @var array<string, SectionReflection>
*/
private array $sectionReflections;
public function __construct(
array $parameterDefinitions,
?string $description,
string $parameterMode,
array $sectionReflections
) {
parent::__construct($parameterDefinitions, $description, $parameterMode);
$this->sectionReflections = $sectionReflections;
}
/**
* @return array<string, SectionReflection>
*/
public function getSections(): array
{
return $this->sectionReflections;
}
public function fetchSection(string $name): ?SectionReflection
{
return $this->sectionReflections[$name] ?? null;
}
}