Extendable Structure Path
Maze uses Fusion's out-of-the-box extension logic to handle routes files,
defined in the fusion.json metadata as follows:
{
"id": "valvoid/maze",
"structure": {
"/routes": "extendable"
}
}
Note
Relative directories in the metadata structure are abstract paths, as they
may not correspond to an actual directory on disk, as in Maze.
To provide custom routes files, map the extendable path to a structure path in
your fusion.json metadata. For example, using a pathname also called
routes:
{
"structure": {
"/routes": ":valvoid/maze/routes"
}
}
Directory Organization
Maze recursively loops through directories mapped via structure metadata,
loading all files and subdirectories in alphabetical order. For example, the
custom routes directory mapped above could have the following content:
subdirectoryroutes.php
routes.php
This results in the following load order:
routes.php: loaded firstsubdirectory/routes.php: loaded after, overlaying the first