summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
commit37a0c044617de4f847acadcb52ac7574927085a8 (patch)
tree6d50f541c8d35a8ac2baaad1d929d068f47fbf01 /src
parent3604c8e0b9bb64d54cb639a001161ca0ede044e6 (diff)
Renamed router route method to make
Diffstat (limited to 'src')
-rw-r--r--src/Router.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Router.php b/src/Router.php
index 9aa3b55..34d2695 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -117,7 +117,7 @@ class Router
return $this->strategy->runRoute($call);
}
- public function route(
+ public function make(
HttpMethod $method,
string $path,
callable $handler,
@@ -137,32 +137,32 @@ class Router
public function get(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Get, $path, $handler);
+ return $this->make(HttpMethod::Get, $path, $handler);
}
public function post(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Post, $path, $handler);
+ return $this->make(HttpMethod::Post, $path, $handler);
}
public function put(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Put, $path, $handler);
+ return $this->make(HttpMethod::Put, $path, $handler);
}
public function patch(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Patch, $path, $handler);
+ return $this->make(HttpMethod::Patch, $path, $handler);
}
public function delete(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Delete, $path, $handler);
+ return $this->make(HttpMethod::Delete, $path, $handler);
}
public function any(string $path, callable $handler): RouteDefinition
{
- return $this->route(HttpMethod::Any, $path, $handler);
+ return $this->make(HttpMethod::Any, $path, $handler);
}
public function addNamedRoute(string $name, Route $route): void