WireBox
Overview
You can access any dependencies your component may have using WireBox, ColdBox's robust dependency injection framework.
This is a great way to keep your business logic out of your components.
You can achieve this by defining a CFC property in your component and using inject.
CBWIRE uses WireBox internally to load your components. Any lifecycle methods fired by WireBox are available to you.
Getting Instances
You can use getInstance() to access a dependency from within your actions.
Here is the method signature for getInstance():
Documentation
Learn about the full capabilities of WireBox at https://wirebox.ortusbooks.com/.
Last updated