frootbox / mvc
Frootbox MVC Framework
0.13.5
2026-07-25 08:11 UTC
Requires
- php: >=8.3
- doctrine/annotations: ^1
- frootbox/config: ^1
- frootbox/db: ^1
- frootbox/exceptions: ^0
- frootbox/http: ^0
- php-di/php-di: ^6
- twig/twig: ^3
This package is auto-updated.
Last update: 2026-07-25 08:11:36 UTC
README
Dispatcher options
Dispatcher options are passed as the second constructor argument:
$dispatcher = new \Frootbox\MVC\Dispatcher( container: $container, options: [ 'namespace' => 'App', 'cachepath' => __DIR__ . '/../var/cache/', 'baseDir' => '/admin', 'loginController' => 'Authentication', 'loginAction' => 'login', ], );
| Option | Default | Description |
|---|---|---|
namespace |
null |
Root namespace containing the application's Controller namespace. |
cachepath |
null |
Base path for the generated controller cache. The path should include a trailing directory separator. |
baseDir |
null |
Base directory to remove from the incoming request path. |
loginController |
Session |
Controller used for unauthenticated requests to private actions. Nested controllers may be written with / or \ separators. |
loginAction |
login |
Action used for unauthenticated requests to private actions. |
If loginController or loginAction is omitted or empty, the dispatcher retains its existing Session/login behavior. Requests accepting application/json are not dispatched to this target and still result in an access-denied exception.