App
class App extends App (View source)
Properties
| protected | $namespacePrefix | from App | |
| protected | $pathPrefix | from App | |
| protected | $filters | from App | |
| protected | $scopes | 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
Details
static string|null
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 106
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 138
exec()
Executes the route callback corresponding to the path,
otherwise executes system/errors.php.
in
App at line 229
array
routes()
Get routes from current scope and parents
in
App at line 240
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 250
static bool
down()
Put the application into maintenance mode
in
App at line 260
static bool
up()
Bring the application out of maintenance mode
in
App at line 265
__get($name)
No description
in
App at line 270
__set($name, $value)
No description