Fixed typo.

This commit is contained in:
Pachira 2024-03-28 20:10:21 +00:00
parent 1efb379601
commit 154d82de02
3 changed files with 8 additions and 8 deletions

View file

@ -1 +1 @@
0.2403.281959
0.2403.282010

View file

@ -1,5 +1,5 @@
<?php
// IRouterHandler.php
// IRouteHandler.php
// Created: 2024-03-28
// Updated: 2024-03-28

View file

@ -7,27 +7,27 @@ namespace Index\Http\Routing;
trait RouterTrait {
public function get(string $path, callable $handler): void {
$this->add('get', $path, $handler);
$this->add('GET', $path, $handler);
}
public function post(string $path, callable $handler): void {
$this->add('post', $path, $handler);
$this->add('POST', $path, $handler);
}
public function delete(string $path, callable $handler): void {
$this->add('delete', $path, $handler);
$this->add('DELETE', $path, $handler);
}
public function patch(string $path, callable $handler): void {
$this->add('patch', $path, $handler);
$this->add('PATCH', $path, $handler);
}
public function put(string $path, callable $handler): void {
$this->add('put', $path, $handler);
$this->add('PUT', $path, $handler);
}
public function options(string $path, callable $handler): void {
$this->add('options', $path, $handler);
$this->add('OPTIONS', $path, $handler);
}
public function register(IRouteHandler $handler): void {