diff --git a/application/symfony/src/Domain/LayerManagement/LayerClassMap.php b/application/symfony/src/Domain/LayerManagement/LayerClassMap.php new file mode 100644 index 0000000..b8dac3f --- /dev/null +++ b/application/symfony/src/Domain/LayerManagement/LayerClassMap.php @@ -0,0 +1,32 @@ + AbstractSource::class, + ]; + + /** + * @param string $layer + * + * @throws NotSetException + * + * @return string + */ + public static function getClass(string $layer): string + { + if (array_key_exists($layer, self::LAYER_CLASS_MAP)) { + return self::LAYER_CLASS_MAP[$layer]; + } + throw new NotSetException('The requested layer is not mapped!'); + } +} diff --git a/application/symfony/src/Domain/LayerManagement/LayerClassMapInterface.php b/application/symfony/src/Domain/LayerManagement/LayerClassMapInterface.php new file mode 100644 index 0000000..583e34a --- /dev/null +++ b/application/symfony/src/Domain/LayerManagement/LayerClassMapInterface.php @@ -0,0 +1,16 @@ +