M Public | 1.0.x - 1.x.x

On This Page

Extendable Structure Path

Mosaic uses Fusion's built-in extension logic to handle config files, defined in the fusion.json metadata as follows:

{
    "id": "valvoid/mosaic",
    "structure": {
        "/configs": "extendable"
    }
}

Note

Relative directories in the metadata structure are abstract paths, as they may not correspond to an actual directory on disk, as in Mosaic.

To register your custom config files, map your structure path to Mosaic's exposed extendable path in your fusion.json metadata. For example, using a directory also named configs:

{
    "structure": {
        "/configs": ":valvoid/mosaic/configs"
    }
}

Alternatively, map individual files:

{
    "structure": {
        "/configs/mosaic.php": ":valvoid/mosaic/configs"
    }
}

Directory Organization

Mosaic recursively loops through directories mapped via structure metadata, loading all files and subdirectories in alphabetical order. For example, the custom configs directory mapped above could have the following content:

  • subdirectory
    • config.php
  • config.php

This results in the following load order:

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