Skip to content

Instantly share code, notes, and snippets.

@evagoras
Last active September 28, 2023 16:20
Show Gist options
  • Select an option

  • Save evagoras/ac46cf3a0d305ebaa7e69f9e7cf5e405 to your computer and use it in GitHub Desktop.

Select an option

Save evagoras/ac46cf3a0d305ebaa7e69f9e7cf5e405 to your computer and use it in GitHub Desktop.
Intercepting the QB module query executor in a ColdBox application
component {
// Configure ColdBox Application
function configure(){
//Register interceptors as an array, we need order
interceptors = [
// Enable when meeded to intercept QB calls
{
class = "interceptors.qbInterceptor",
name = "qbInterceptor",
properties = {}
}
];
}
}
component extends="coldbox.system.Interceptor" alias="qbInterceptor" {
property name="interceptorService" inject="coldbox:interceptorService";
function configure() {
controller.getInterceptorService().registerInterceptor( interceptorObject = this );
}
function preQBExecute( event, interceptData = {} ) {
dump(arguments.interceptData);
abort;
}
}
@evagoras

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment