App
class App extends App (View source)
Properties
| protected | $namespacePrefix | from App | |
| protected | $pathPrefix | from App | |
| protected | $filters | from App | |
| protected | $paramPatterns | from App |
Methods
Validate name and get the application configs from $_ENV with APP_ prefix key.
Validate method and callback, if valid register callable or controller for a route
Validate namespace prefix, if valid define controller prefix on scope
Validate pattern, if valid create or replace a pattern for URL slugs
Executes the route callback corresponding to the path,
otherwise executes system/errors.php.
No description
No description
No description
Details
static scalar
config(string $name)
Validate name and get the application configs from $_ENV with APP_ prefix key.
action(string|array $methods, string $path, string|callable $callback)
Validate method and callback, if valid register callable or controller for a route
setNamespace(string $prefix)
Validate namespace prefix, if valid define controller prefix on scope
in
App at line 102
useFilter(callable $callback)
Add a filter for routes in the current scope
setPattern(string $name, string $regex)
Validate pattern, if valid create or replace a pattern for URL slugs
scope(string $pattern, Closure $callback)
Validate URL pattern, if valid register a callback for isolate routes
in
App at line 172
exec()
Executes the route callback corresponding to the path,
otherwise executes system/errors.php.
in
App at line 238
array
routes()
Get routes from current scope and parents
in
App at line 249
static bool
maintenance()
Checks if the application is in maintenance mode.
Note: the result is affected by the main event when maintenance mode is active.
in
App at line 259
static bool
down()
Put the application into maintenance mode
in
App at line 269
static bool
up()
Bring the application out of maintenance mode
__get($name)
No description
__set($name, $value)
No description
__construct()
No description