diff options
Diffstat (limited to 'src/Attribute/RouteAttribute.php')
| -rw-r--r-- | src/Attribute/RouteAttribute.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Attribute/RouteAttribute.php b/src/Attribute/RouteAttribute.php new file mode 100644 index 0000000..a7b0458 --- /dev/null +++ b/src/Attribute/RouteAttribute.php @@ -0,0 +1,19 @@ +<?php + +declare(strict_types=1); + +namespace BrettParson\MiniRoute\Attribute; + +/** + * Shared contract implemented by every HTTP-method route attribute + * (Get, Post, Put, Patch, Delete). + * + * The loader discovers route attributes by matching against this interface, + * so new HTTP methods can be added as attributes without touching the loader. + */ +interface RouteAttribute +{ + public function method(): string; + + public function path(): string; +} |
