Skip to content

Instantly share code, notes, and snippets.

@boughtonp
Created November 17, 2012 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save boughtonp/f27056ae9bf96afc42e1 to your computer and use it in GitHub Desktop.
Save boughtonp/f27056ae9bf96afc42e1 to your computer and use it in GitHub Desktop.
Modified FB skeleton Application.cfc
<cfcomponent output="false">
<!---
sample Application.cfc for ColdFusion MX 7 and later compatible systems
--->
<!--- set application name based on the directory path --->
<cfset this.name = getCurrentTemplatePath() />
<!--- enable debugging --->
<cfset FUSEBOX_PARAMETERS.debug = true />
<!--- force the directory in which we start to ensure CFC initialization works: --->
<cfset FUSEBOX_CALLER_PATH = getDirectoryFromPath(getCurrentTemplatePath()) />
<!---
if you define any onXxxYyy() handler methods, remember to start by calling
super.onXxxYyy(argumentCollection=arguments)
so that Fusebox's own methods are executed before yours
--->
<cfscript>
This.Mappings = {"FuseboxMapping":expandPath('../../../fusebox5')}
function onApplicationStart()
{
application.fb = createObject("component","FuseboxMapping.Application").bleed(variables);
application.fb.onApplicationStart(ArgumentCollection=Arguments);
}
function onRequestStart()
{
application.fb.onRequestStart(ArgumentCollection=Arguments);
}
function onRequest()
{
application.fb.onRequest(ArgumentCollection=Arguments);
}
function onRequestEnd()
{
application.fb.onRequestEnd(ArgumentCollection=Arguments);
}
function onError()
{
application.fb.onError(ArgumentCollection=Arguments);
}
</cfscript>
</cfcomponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment