Docs

RouterMapMethods trait


Definition

Namespace: DafCore
Phar: DafCore.phar

this trait is add to the parnet class shortcuts to the router map functions.
the function just passing the parameters to the router functions.
if you want more info about the router map functions see the Router : class

Methods

function Get(string $path, ...$callbacks) : void
Pass the parameters to the Router
Add a GET route to the route list.
function Post(string $path, ...$callbacks) : void
Pass the parameters to the Router->Get
Add a POST route to the route list.
function Put(string $path, ...$callbacks) : void
Pass the parameters to the Router->Put
Add a PUT route to the route list.
function Delete(string $path, ...$callbacks) : void
Pass the parameters to the Router->Delete
Add a Delete route to the route list.
function SetBasePath(string $path) : void
Pass the parameters to the Router->SetBasePath
Set the prefix for all the next routes.