aboutsummaryrefslogtreecommitdiff
path: root/src/Attribute/Put.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Attribute/Put.php')
-rw-r--r--src/Attribute/Put.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Attribute/Put.php b/src/Attribute/Put.php
new file mode 100644
index 0000000..fc08399
--- /dev/null
+++ b/src/Attribute/Put.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace BrettParson\MiniRoute\Attribute;
+
+use Attribute;
+
+#[Attribute(Attribute::TARGET_METHOD)]
+final class Put implements RouteAttribute
+{
+ public function __construct(public readonly string $path)
+ {
+ }
+
+ public function method(): string
+ {
+ return 'PUT';
+ }
+
+ public function path(): string
+ {
+ return $this->path;
+ }
+}