coldbox.system.core.dynamic

Class MixerUtil

railo-context.Component
        extended by coldbox.system.core.dynamic.MixerUtil
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

    A utility object that provides runtime mixins

    Constructor Summary
    init()
          Constructor.
    Method Summary
    any exposeMixin(any method, [any newName=''])
         Exposes a private function publicly.
    any getPropertyMixin(any name, [any scope='variables'], [any default])
         gets a property.
    void includeitMixin(any template)
         Facade for cfinclude.
    void injectMixin(any name, any UDF)
         Injects a method into the CFC.
    void injectPropertyMixin(any propertyName, any propertyValue, [any scope='variables'])
         injects a property into the passed scope.
    any invokerMixin(any method, [any argCollection], [any argList])
         Calls private/packaged/public methods.
    any methodProxy()
         a method proxy.
    void populatePropertyMixin(any propertyName, any propertyValue, [any scope='variables'])
         Populates a property if it exists.
    void removeMixin(string UDFName)
         Removes a method in a CFC.
    void removePropertyMixin(any propertyName, [any scope='variables'])
         removes a property from the cfc used.
    void start(any CFC)
         Start method injection set -> Injects: includeitMixin,injectMixin,removeMixin,invokerMixin,injectPropertyMixin,removePropertyMixin,getPropertyMixin,populatePropertyMixin.
    void stop(any CFC)
         stop injection block.
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Method Detail

    exposeMixin

    public any exposeMixin(any method, [any newName=''])

    Exposes a private function publicly

    Parameters:
    method
    newName

    getPropertyMixin

    public any getPropertyMixin(any name, [any scope='variables'], [any default])

    gets a property

    Parameters:
    name - The name of the property to inject.
    scope - The scope to which inject the property to.
    default - Default value to return

    includeitMixin

    public void includeitMixin(any template)

    Facade for cfinclude

    Parameters:
    template

    injectMixin

    public void injectMixin(any name, any UDF)

    Injects a method into the CFC

    Parameters:
    name - The name to inject the UDF as
    UDF - UDF to inject

    injectPropertyMixin

    public void injectPropertyMixin(any propertyName, any propertyValue, [any scope='variables'])

    injects a property into the passed scope

    Parameters:
    propertyName - The name of the property to inject.
    propertyValue - The value of the property to inject
    scope - The scope to which inject the property to.

    invokerMixin

    public any invokerMixin(any method, [any argCollection], [any argList])

    Calls private/packaged/public methods

    Parameters:
    method - Name of the private method to call
    argCollection - Can be called with an argument collection struct
    argList - Can be called with an argument list, for simple values only: ex: 'object=logger,number=1'

    methodProxy

    public any methodProxy()

    a method proxy


    populatePropertyMixin

    public void populatePropertyMixin(any propertyName, any propertyValue, [any scope='variables'])

    Populates a property if it exists

    Parameters:
    propertyName - The name of the property to inject.
    propertyValue - The value of the property to inject
    scope - The scope to which inject the property to.

    removeMixin

    public void removeMixin(string UDFName)

    Removes a method in a CFC

    Parameters:
    UDFName - Name of the UDF to be removed

    removePropertyMixin

    public void removePropertyMixin(any propertyName, [any scope='variables'])

    removes a property from the cfc used.

    Parameters:
    propertyName - The name of the property to remove.
    scope - The scope to which inject the property to.

    start

    public void start(any CFC)

    Start method injection set -> Injects: includeitMixin,injectMixin,removeMixin,invokerMixin,injectPropertyMixin,removePropertyMixin,getPropertyMixin,populatePropertyMixin

    Parameters:
    CFC - The cfc to mixin

    stop

    public void stop(any CFC)

    stop injection block. Removes mixed in methods.

    Parameters:
    CFC - The cfc to inject the method into