search hotlink icon profile hotlink icon
Ma Public | 1.1.x - 1.x.x

On This Page

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:

  • subdirectory
    • routes.php
  • routes.php

This results in the following load order:

  • routes.php: loaded first
  • subdirectory/routes.php: loaded after, overlaying the first