Package Registry (registry.yml)

Every page has a file located at /etc/<PACKAGE>/registry.yml which contains various items that are generally global in scope, but assigned to the specific package. This is done so when its packaged and published to the repository, all the items within global scope are included as well. These items include views, HTTP controllers, external files, routes, and so on.

Generally this file is automatically generated via the various CLI commands, and you never need to touch it, although there is no issue with manually modifying it as necessary. The below table lists all possible sections within this file.

Key Description
views One dimensional array of all views created for the package, relative to the /views/html/ directory and without any file extension.
http_controllers One dimensional array of any HTTP controllers created that are located within the /src/HttpControllers/ directory, and are relative to the directory without any file extension.
routes Associative array and is the same format as the /boot/routes.yml file that the HTTP Router uses. Defines any routes that should be added to /boot/routes.yml upon package installation.
themes Associative array defining which themes to change various areas to (eg. admin, members, public). The keys are the area to change, and the value is the alias of the theme (ie. directory within /views/themes/).
ext_files One dimensional array listing all external files / directories to include within the package, relative to the installation directory.
require_apex Associative array of all Apex package dependancies. Keys are the package name and the values are the package version which can either be a version number, or "latest" or "dev".
require_composer Associative array of all Composer package dependancies. Keys are the name of the Composer package, and the value is the version.
user_types Any custom user types that are included with this package. See below for details.

User Types

The registry supports a user_types section which only applies if you are creating new user types within the package that extend the ArmorUser class. Each element within this section has a key being the alias of the user type (eg. admin, user, client) while the value is an associative array with the below keys:

  • table - Table table name that holds the users.
  • class - The fully qualified class name of the class for this user that extends the ArmorUser class.

For example:

user_types:

  admin:
    table: admin
    class: App\\Webapp\\Admin