ModuleConfig.cfc
file in the root of the module. This CFC is automatically created and its settings extracted when the module is loaded. It has lifecycle methods like onLoad()
and onUnLoad()
that will be called automatically if they exist. This CFC will also be loaded up as an interceptor, so any method names that match interception points will be registered. Read more about module configuration here.models
folder and WireBox will automatically map them as [email protected]
so they can easily be injected into any other model, interceptor, or command CFC.commands
folder inside your module. Any CFCs there will automatically be registered when the module is loaded, and will be available in the help
command, as well as tab-completion, etc. To create namespace commands, create extra sub folders inside the commands
folder that match the name of the namespace. Read more about command configuration here​interceptors
folder. Interceptors are not loaded automatically though. You'll need to reference the component path in your ModuleConfig.cfc
. The path that points to the interceptors folder can be resolved in your config file as #moduleMapping#.interceptors.MyInterceptorName
. Read more about interceptor configuration here​box.json
and it will automatically be installed for you inside your modules
folder.