1 | <?php declare(strict_types=1); |
||
9 | class BlockType implements BlockTypeInterface |
||
10 | { |
||
11 | /** @var string */ |
||
12 | private $name; |
||
13 | /** @var AttributeInterface[] */ |
||
14 | private $attributes = []; |
||
15 | |||
16 | public function __construct(string $name, AttributeInterface ...$attributes) |
||
21 | |||
22 | /** |
||
23 | * @return AttributeInterface[] |
||
24 | */ |
||
25 | public function getAttributes(): array |
||
29 | |||
30 | /** |
||
31 | * @throws UnknownAttributeException |
||
32 | */ |
||
33 | public function getAttribute(string $name): AttributeInterface |
||
42 | |||
43 | public function getName(): string |
||
47 | |||
48 | /** |
||
49 | * @param string[] $values |
||
50 | * @throws UnknownAttributeException |
||
51 | * @throws MissingAttributeException |
||
52 | */ |
||
53 | public function validateAttributeValues(array $values): void |
||
59 | |||
60 | /** |
||
61 | * @throws UnknownAttributeException |
||
62 | */ |
||
63 | public function validateAttributeValue(string $name, ?string $value): void |
||
67 | } |
||
68 |