We also provide an interface to create objects that adhere to our injector interface: wirebox.system.ioc.IInjector
.
Please note that you DO NOT need to add the implements
to your code. We actually highly suggest you don't. There are many issues with interfaces yet in multiple CFML engines. So we do runtime checks for it, instead at compile time.
Then these objects can be used as parent injectors, which are great for legacy factories or creating hierarchies according to your specs. All you have to do is implement the following interface:
Once you create this CFC that implements this interface then you can call on the injector's setParent()
method and you are ready to roll.