Modules - flamecore/infernum GitHub Wiki
Modules are extensions that provide a controller.
Structure
A module consists of at least two files:
module.yml
containing meta informationcontroller.php
containing the controller
There are also two directories that can be used:
templates/
for views and other templatespublic/
for public files
Using Modules
Modules can be mounted with their base name or an alias. The first segment of the page path is then mapped to the mountpoint names.
Example
Our website defines this site.yml
file:
routes:
- { module: vendor/module } # auto-generated mountpoint 'module'
- { module: vendor/another-module, alias: foo } # aliased mountpoint 'foo'
The module controllers can then be accessed over the page path as follows:
module
points to modulevendor/module
foo
points to modulevendor/another-module