Documentation

Router

This class is responsible for registering routes and resolving them.

Tags
category

Routing

author

Brad Cimbura hpz937@gmail.com

license

http://opensource.org/licenses/mit-license.php MIT License

link
https://git.hpz.pw/hpz937/billReminder

Table of Contents

Properties

$routes  : mixed

Methods

register()  : void
Register a route with the router
resolve()  : mixed
Resolve a route

Properties

$routes

protected mixed $routes = []

Methods

register()

Register a route with the router

public register(string $method, string $path, mixed $action) : void
Parameters
$method : string

HTTP method

$path : string

URI path

$action : mixed

Action to take when route is resolved

resolve()

Resolve a route

public resolve(string $method, string $uri) : mixed
Parameters
$method : string

HTTP method

$uri : string

URI path


        
On this page

Search results