1 | <?php |
||
24 | class EnumValuesAsArrayTwigExtension extends AbstractEnumTwigExtension |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function getFunctions(): array |
||
36 | |||
37 | /** |
||
38 | * @param string $enumType |
||
39 | * |
||
40 | * @throws EnumTypeIsNotRegisteredException |
||
41 | * @throws NoRegisteredEnumTypesException |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | public function getEnumValuesAsArray(string $enumType): array |
||
49 | |||
50 | /** |
||
51 | * @param string $enumType |
||
52 | * |
||
53 | * @throws EnumTypeIsNotRegisteredException |
||
54 | * @throws NoRegisteredEnumTypesException |
||
55 | * |
||
56 | * @return array |
||
57 | */ |
||
58 | public function getReadableEnumValuesAsArray(string $enumType): array |
||
62 | |||
63 | /** |
||
64 | * @param string $enumType |
||
65 | * @param string $staticMethodName |
||
66 | * |
||
67 | * @throws EnumTypeIsNotRegisteredException |
||
68 | * @throws NoRegisteredEnumTypesException |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | private function callEnumTypeStaticMethod(string $enumType, string $staticMethodName): array |
||
82 | } |
||
83 |