Application
classe Application étends Router (Voir la source)
Propriétés
protected array | $error_code | Define the functions related to an http code executed if this code is up |
depuis Router |
protected array | $middlewares | Define the global middleware |
depuis Router |
protected string | $prefix | Define the routing prefix |
depuis Router |
protected string | $special_method | depuis Router | |
protected array | $current | Method Http current. |
depuis Router |
protected bool | $auto_csrf | Define the auto csrf check status. |
depuis Router |
static protected array | $routes | Route collection. |
depuis Router |
Méthodes
Set auto CSRF status Note: Disable only you run on test env
Allows to associate a global middleware on an route
Match route de tout type de method
Get container
Launcher of the application
Allows you to enable writing the X-Powered-By header in the answer of the inquiry.
Make the REST API base on route and ressource controller.
Abort application
Détails
dans
Router à la ligne 97
setBaseRoute(string $base_route)
Set the base route
dans
Router à la ligne 108
setAutoCsrf(bool $auto_csrf)
Set auto CSRF status Note: Disable only you run on test env
dans
Router à la ligne 121
Router
prefix(string $prefix, callable $cb)
Add a prefix on the roads
dans
Router à la ligne 148
Router
middleware(array $middlewares)
Allows to associate a global middleware on an route
dans
Router à la ligne 171
route(array $definition)
Route mapper
dans
Router à la ligne 220
Router
any(string $path, callable|string|array $cb)
Add a route for
GET, POST, DELETE, PUT, OPTIONS, PATCH
dans
Router à la ligne 236
Route
get(string $path, callable|string|array $cb)
Add a GET route
dans
Router à la ligne 248
Route
post(string $path, callable|string|array $cb)
Add a POST route
dans
Router à la ligne 270
Route
delete(string $path, callable|string|array $cb)
Add a DELETE route
dans
Router à la ligne 282
Route
put(string $path, callable|string|array $cb)
Add a PUT route
dans
Router à la ligne 294
Route
patch(string $path, callable|string|array $cb)
Add a PATCH route
dans
Router à la ligne 306
Route
options(string $path, callable $cb)
Add a OPTIONS route
dans
Router à la ligne 319
Router
code(int $code, callable $cb)
Launch a callback function for each HTTP error code.
When the define code match with response code.
dans
Router à la ligne 334
Router
match(array $methods, string $path, callable|string|array $cb)
Match route de tout type de method
dans
Router à la ligne 403
protected string
getSpecialMethod()
Retrieve the define special method
dans
Router à la ligne 413
protected bool
hasSpecialMethod()
Check user define the special method
dans
Router à la ligne 423
array
getRoutes()
Get the route collection
Capsule
getContainer()
Get container
void
bind(Loader $config)
Configuration Association
static Application
make(Request $request, Response $response)
Build the application
mixed
send()
Launcher of the application
void
disablePoweredByMention()
Allows you to enable writing the X-Powered-By header in the answer of the inquiry.
Application
rest(string $url, string|array $controller_name, array $where = [])
Make the REST API base on route and ressource controller.
void
abort($code = 500, $message = '', array $headers = [])
Abort application
Capsule|mixed
container(null $name = null, callable $callable = null)
Build dependance
Capsule
__invoke(array ...$params)
__invoke
This point method on the container system