AutoRouter.php
system/Router/AutoRouter.php
1 class
9 methods
class AutoRouter
Router for Auto-Routing
__construct
(/**
* List of CLI routes that do not contain '*' routes.
*
* @var array<string, (Closure(mixed...): (ResponseInterface|string|void))|string> [routeKey => handler]
*/
private readonly array $cliRoutes, /**
* Default namespace for controllers.
*/
private readonly string $defaultNamespace, /**
* The name of the controller class.
*/
private string $controller, /**
* The name of the method to use.
*/
private string $method, /**
* Whether dashes in URI's should be converted
* to underscores when determining method names.
*/
private bool $translateURIDashes, )
getRoute
(string $uri, string $httpVerb)
setTranslateURIDashes
(bool $val = false)
scanControllers
(array $segments)
isValidSegment
(string $segment)
setDirectory
(?string $dir = null, bool $append = false, bool $validate = true)
directory
()
controllerName
()
methodName
()