Created
April 24, 2017 11:20
-
-
Save wagstaffj/24862d6c29e4c449257760cb8074ab9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.cfc | |
component extends=framework.one { | |
this.ormenabled = true; | |
this.datasource = "store"; | |
this.ormSettings.dbCreate = "dropcreate"; | |
this.ormSettings.logsql = true; | |
this.ormSettings.dialect = "Oracle10g"; | |
variables.framework.reloadApplicationOnEveryRequest = true; | |
variables.framework.diEngine = "aop1"; | |
//variables.framework.diConfig = { interceptors = [ { beanName = "storeService", interceptorName = "StoreInterceptor", methods = "*" } ] }; | |
//variables.framework.diConfig.interceptors = [ { beanName = "storeService", interceptorName = "StoreInterceptor" } ]; | |
variables.framework.usingSubsystems = true; | |
variables.framework.defaultSubsystem = "public"; | |
variables.framework.generateSES = true; | |
this.sessionManagement = true; | |
this.invokeImplicitAccessor = true; | |
public void function setupApplication(){ | |
getbeanfactory().intercept("store","StoreInterceptor","*"); | |
if ( StructKeyExists(url, "reload")){ | |
ormReload(); | |
applicationstop(); | |
} | |
} | |
public void function setupRequest(){ | |
request.jslib = []; | |
request.jsscript = []; | |
} | |
public void function setupSession(){ | |
if ( !StructKeyExists(session,"cart")) | |
session.cart = variables.getbeanfactory().getBean('cartBean'); | |
} | |
} | |
models/interceptors/StoreInterceptor.cfc | |
component accessors="true" | |
{ | |
property framework; | |
function before(target, methodname, args){ | |
getFramework().frameworkTrace("xxxxxxxxxxxx inside interceptor before xxxxxxxxxxxx", arguments); | |
writedump(arguments); | |
abort; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment