diff options
Diffstat (limited to 'src/Controller/ControllerResolverInterface.php')
| -rw-r--r-- | src/Controller/ControllerResolverInterface.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Controller/ControllerResolverInterface.php b/src/Controller/ControllerResolverInterface.php new file mode 100644 index 0000000..3b4ea48 --- /dev/null +++ b/src/Controller/ControllerResolverInterface.php @@ -0,0 +1,17 @@ +<?php + +declare(strict_types=1); + +namespace BrettParson\MiniRoute\Controller; + +/** + * Resolves a class name to an object instance. + * + * Used for both controllers and middleware. Applications provide an + * implementation backed by their own dependency container or plain + * construction, keeping the kernel independent of any specific wiring. + */ +interface ControllerResolverInterface +{ + public function resolve(string $class): object; +} |
