[ColdBox 4] module roots within interceptors

Is there anyway I can get the current ModuleRoot of the module that is being intercepted?

for example, i tried event.getCurrentModule() and it returns the module of the current event, not the module that is actually intercepting the current request.

I have two modules

call them /rootModule and /helperModule

rootModule contains the layouts

however /helperModule has an interceptor that does specific tasks such as compressing html or alike. However in order to compress I need to write to file or fetch specific data from file. Is there anyways I can get the ModuleRoot of the interceptor that is being called at that moment.

example, /helperModule/interceptor/helper.cfc with a function called preLayoutRender() which intercepts data during the rendering request. Can I get the /helperModule/'s root at this point? If so, how?

Have you checked getModuleConfig( ‘moduleName’ )? I think that’s the one. If not, it’s getModuleSettings( ‘moduleName’ ).

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

yes sadly i will most likely not know the name of the module since someone may change it or i might move the interceptor to another module or modules. It would be handle to have it detected dynamically.