Last active
August 29, 2015 14:01
-
-
Save MJDDesign/0690964d2428b0fa1686 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 | |
--- ----------- | |
--- | |
--- author: Matthew | |
--- date: 5/4/14 | |
---> | |
<cfcomponent displayname="Application" output="true" hint="Handle the application."> | |
<cfset THIS.Name = "AppCFC" /> | |
<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 ) /> | |
<cfset THIS.SessionManagement = true /> | |
<cfset THIS.SetClientCookies = false /> | |
<cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false" hint=""> | |
<cfset application.url ="http://url.domain.com"> | |
<cfset application.datasource ="datasource"> | |
<cfset application.smtp ="emailserver.domain.com"> | |
<cfreturn true /> | |
</cffunction> | |
<cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint=""> | |
<cfset session.variable = "string"> | |
<cfreturn /> | |
</cffunction> | |
<cffunction name="OnRequestStart" access="public" returntype="boolean" output="false" hint=""> | |
<cfargument name="TargetPage" type="string" required="true"/> | |
<cfreturn true /> | |
</cffunction> | |
<cffunction name="OnRequest" access="public" returntype="void" output="true" hint=""> | |
<cfargument name="TargetPage" type="string" required="true"/> | |
<cfinclude template="#ARGUMENTS.TargetPage#" /> | |
<cfreturn /> | |
</cffunction> | |
<cffunction name="OnRequestEnd" access="public" returntype="void" output="true" hint=""> | |
<cfreturn /> | |
</cffunction> | |
<cffunction name="OnSessionEnd" access="public" returntype="void" output="false" hint=""> | |
<cfargument name="SessionScope" type="struct" required="true"/> | |
<cfargument name="ApplicationScope" type="struct" required="false" default="#StructNew()#"/> | |
<cfreturn /> | |
</cffunction> | |
<cffunction name="OnApplicationEnd" access="public" returntype="void" output="false" hint=""> | |
<cfargument name="ApplicationScope" type="struct" required="false" default="#StructNew()#"/> | |
<cfreturn /> | |
</cffunction> | |
<cffunction name="OnError" access="public" returntype="void" output="true" hint=""> | |
<cfargument name="Exception" type="any" required="true"/> | |
<cfargument name="EventName" type="string" required="false" default=""/> | |
<cfmail to="toemail@mjddesignconcepts.com" from="fromemail@mjddesignconcepts.com" subject="[ERROR]" type="html"> | |
<cfdump var="#EventName#"> | |
<cfdump var="#Exception#"> | |
</cfmail> | |
<cfreturn /> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment