PHP Mini Documentation

RouterInterface

PHP Mini Framework

Tags
copyright

busarm.com

license

https://github.com/Busarm/php-mini/blob/master/LICENSE (MIT License)

codeCoverageIgnore

Table of Contents

addRoute()  : self
addRoutes()  : self
createRoute()  : RouteInterface
getRoutes()  : array<string|int, RouteInterface>
isMatch()  : bool|array<string|int, mixed>
Check if path matches
process()  : array<string|int, MiddlewareInterface>
Process routing

Methods

addRoutes()

public addRoutes(array<string|int, mixed> $routes) : self
Parameters
$routes : array<string|int, mixed>
Tags
Return values
self

isMatch()

Check if path matches

public isMatch(string $path, string $route[, bool $startsWith = true ][, mixed $endsWith = true ]) : bool|array<string|int, mixed>
Parameters
$path : string

Request path

$route : string

Route to compare to

$startsWith : bool = true

path ends with route

$endsWith : mixed = true
Tags
Return values
bool|array<string|int, mixed>

        

Search results