coldbox.system.ioc

Interface IInjector

coldbox.system.ioc.IInjector
All Known Implementing Classes:
Injector

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- An interface that enables any CFC to act like a parent injector within WireBox.

Class Attributes:
None
Method Summary
boolean containsInstance(any name)
     Checks if this injector can locate a model instance or not.
any getInstance([any name], [any dsl], [struct initArguments], [any targetObject])
     Locates, Creates, Injects and Configures an object model instance.
any getParent()
     Get a reference to the parent injector instance, else an empty simple string meaning nothing is set.
any setParent(any<Injector> injector)
     Link a parent Injector with this injector and return itself.
any shutdown()
     Shutdown the injector gracefully by calling the shutdown events internally.

Method Detail

containsInstance

public boolean containsInstance(any name)

Checks if this injector can locate a model instance or not

Parameters:
name - The object name or alias to search for if this container can locate it or has knowledge of it

getInstance

public any getInstance([any name], [any dsl], [struct initArguments], [any targetObject])

Locates, Creates, Injects and Configures an object model instance

Parameters:
name - The mapping name or CFC instance path to try to build up
dsl - The dsl string to use to retrieve the instance model object, mutually exclusive with 'name'
initArguments - The constructor structure of arguments to passthrough when initializing the instance
targetObject - The object requesting the dependency, usually only used by DSL lookups

getParent

public any getParent()

Get a reference to the parent injector instance, else an empty simple string meaning nothing is set

Returns:
coldbox.system.ioc.Injector

setParent

public any setParent(any<Injector> injector)

Link a parent Injector with this injector and return itself

Parameters:
injector - A WireBox Injector to assign as a parent to this Injector
Returns:
IInjector

shutdown

public any shutdown()

Shutdown the injector gracefully by calling the shutdown events internally

Returns:
IInjector