ColdBox Platform Version 2.6.3

coldbox.system.plugins
Class methodInjector

WEB-INF.cftags.component
        extended by coldbox.system.frameworkSupertype
            extended by coldbox.system.plugin
                extended by coldbox.system.plugins.methodInjector

public class methodInjector
extends plugin

Method Injector plugin. It provides a nice way to mixin and remove methods from cfc's


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
 any getcontroller()
          Get controller: coldbox.system.controller
 void injectMixin(any UDF)
          injects a method into the CFC scope
 void injectPropertyMixin(string propertyName, any propertyValue, [string scope='variables'])
          injects a property into the passed scope
 any invokerMixin(string method, [struct argCollection], [string argList])
          calls private/packaged/public methods
 void populatePropertyMixin(string propertyName, any propertyValue, [string scope='variables'])
          Populates a property if it exists
 void removeMixin(string UDFName)
          removes a method in a CFC
 void removePropertyMixin(string propertyName, [string scope='variables'])
          removes a property from the cfc used.
 void setcontroller(any controller)
          Set controller
 void start(any CFC)
          start method injection set. Injects: injectMixin,removeMixin,invokerMixin,injectPropertyMixin,removePropertyMixin
 void stop(any CFC)
          stop injection block. Removes mixed in methods.
 
Methods inherited from class coldbox.system.plugin
getPluginDescription, getPluginName, getPluginVersion, getpluginPath, setPluginDescription, setPluginName, setPluginVersion
 
Methods inherited from class coldbox.system.frameworkSupertype
abort, announceInterception, dump, getColdboxOCM, getDatasource, getDebugMode, getHash, getInstance, getInterceptor, getMailSettings, getModel, getMyPlugin, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getfwLocale, htmlhead, include, includeUDF, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderView, rethrowit, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, settingExists, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)

Method Detail

getcontroller

public any getcontroller()
Get controller: coldbox.system.controller

Overrides:
getcontroller in class frameworkSupertype

injectMixin

public void injectMixin(any UDF)
injects a method into the CFC scope

Parameters:
UDF - UDF to be checked

injectPropertyMixin

public void injectPropertyMixin(string propertyName, any propertyValue, [string 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(string method, [struct argCollection], [string 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: 'plugin=logger,number=1'

populatePropertyMixin

public void populatePropertyMixin(string propertyName, any propertyValue, [string 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(string propertyName, [string 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.

setcontroller

public void setcontroller(any controller)
Set controller

Overrides:
setcontroller in class frameworkSupertype
Parameters:
controller - coldbox.system.controller

start

public void start(any CFC)
start method injection set. Injects: injectMixin,removeMixin,invokerMixin,injectPropertyMixin,removePropertyMixin

Parameters:
CFC - The cfc to inject the method into

stop

public void stop(any CFC)
stop injection block. Removes mixed in methods.

Parameters:
CFC - The cfc to inject the method into

ColdBox Platform Version 2.6.3