Packageorg.spicefactory.parsley.core.scope
Interfacepublic interface ScopeExtensions
Implementors DefaultScopeExtensions

Registry for custom extensions added to a scope. This is primarily useful for custom configuration tags that may want to interact with a manager-type instance. Often this manager wants to operate scope-wide like some of the builtin services (e.g. MessageRouter).

Extensions can be registered globally or for a single Context only with FactoryRegistry.scopeExtensions.



Public Methods
 MethodDefined By
  
forType(type:Class):Object
Obtains the extension of the specified type.
ScopeExtensions
  
hasType(type:Class):Boolean
Indicates whether this object contains an extension of the specified type.
ScopeExtensions
Method Detail
forType()method
public function forType(type:Class):Object

Obtains the extension of the specified type. When using this method the scope must contain exactly one instance of a matching type, otherwise an Error will be thrown.

Parameters

type:Class — the type of extenstion to obtain

Returns
Object — the extension with a matching type
hasType()method 
public function hasType(type:Class):Boolean

Indicates whether this object contains an extension of the specified type.

Parameters

type:Class — the type of extension to check

Returns
Boolean — true if this object contains an extension of the specified type