class Router (View source)

Methods

__construct(Loader $config, Collection $collection)

Router constructor.

Collection
getCollection()

No description

get(string $path, callable|array $cb)

get, route de type GET ou bien retourne les variable ajoutés dans Bow

post(string $path, callable $cb)

post, route de type POST

any(string $path, callable $cb)

any, route de tout type GET|POST|DELETE|PUT|OPTIONS|PATCH

delete(string $path, callable $cb)

delete, route de tout type DELETE

put(string $path, callable $cb)

put, route de tout type PUT

patch(string $path, callable $cb)

patch, route de tout type PATCH

options(string $path, callable $cb)

patch, route de tout type PATCH

match(array $methods, string $path, callable $cb = null)

match, route de tout type de method

group(string $prefix, callable $cb)

mount, ajoute un branchement.

Details

__construct(Loader $config, Collection $collection)

Router constructor.

Parameters

Loader $config
Collection $collection

Collection getCollection()

No description

Return Value

Collection

Route get(string $path, callable|array $cb)

get, route de type GET ou bien retourne les variable ajoutés dans Bow

Parameters

string $path
callable|array $cb

Return Value

Route

Route post(string $path, callable $cb)

post, route de type POST

Parameters

string $path
callable $cb

Return Value

Route

any(string $path, callable $cb)

any, route de tout type GET|POST|DELETE|PUT|OPTIONS|PATCH

Parameters

string $path
callable $cb

Route delete(string $path, callable $cb)

delete, route de tout type DELETE

Parameters

string $path
callable $cb

Return Value

Route

Route put(string $path, callable $cb)

put, route de tout type PUT

Parameters

string $path
callable $cb

Return Value

Route

Route patch(string $path, callable $cb)

patch, route de tout type PATCH

Parameters

string $path
callable $cb

Return Value

Route

Route options(string $path, callable $cb)

patch, route de tout type PATCH

Parameters

string $path
callable $cb

Return Value

Route

match(array $methods, string $path, callable $cb = null)

match, route de tout type de method

Parameters

array $methods
string $path
callable $cb

Router group(string $prefix, callable $cb)

mount, ajoute un branchement.

Parameters

string $prefix
callable $cb

Return Value

Router