This commit is contained in:
2023-04-16 01:24:30 +08:00
parent bf9b84563e
commit 91af6b3a5f
68 changed files with 115 additions and 79 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace Kiri\Router\Constrict;
enum RequestMethod
{
case REQUEST_POST;
case REQUEST_GET;
case REQUEST_HEAD;
case REQUEST_OPTIONS;
case REQUEST_DELETE;
case REQUEST_PUT;
/**
* @return string
*/
public function getString(): string
{
return match ($this) {
self::REQUEST_POST => 'POST',
self::REQUEST_GET => 'GET',
self::REQUEST_HEAD => 'HEAD',
self::REQUEST_OPTIONS => 'OPTIONS',
self::REQUEST_DELETE => 'DELETE',
self::REQUEST_PUT => 'PUT'
};
}
}