-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApplication.cfc
55 lines (48 loc) · 1.88 KB
/
Application.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<cfcomponent extends="coldbox.system.Coldbox" output="false">
<cfsetting enablecfoutputonly="yes">
<!--- APPLICATION CFC PROPERTIES --->
<cfset this.name = "Stand4SA" & hash(getCurrentTemplatePath())>
<cfset this.sessionManagement = true>
<cfset this.sessionTimeout = createTimeSpan(0,0,30,0)>
<cfset this.setClientCookies = true>
<cfset this.ormEnabled = true />
<cfset this.ormSettings = {
datasource: "stand4sa",
dialect: "MySQL",
dbcreate: "dropcreate",
flushAtRequestEnd = false,
autoManageSession = false,
eventHandling = true,
eventHandler = "coldbox.system.orm.hibernate.WBEventHandler"
} />
<!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP --->
<cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())>
<!--- The web server mapping to this application. Used for remote purposes or static purposes --->
<cfset COLDBOX_APP_MAPPING = "">
<!--- COLDBOX PROPERTIES --->
<cfset COLDBOX_CONFIG_FILE = "">
<!--- COLDBOX APPLICATION KEY OVERRIDE --->
<cfset COLDBOX_APP_KEY = "">
<!--- on Application Start --->
<cffunction name="onApplicationStart" returnType="boolean" output="false">
<cfscript>
//Load ColdBox
loadColdBox();
return true;
</cfscript>
</cffunction>
<!--- on Request Start --->
<cffunction name="onRequestStart" returnType="boolean" output="true">
<!--- ************************************************************* --->
<cfargument name="targetPage" type="string" required="true" />
<!--- ************************************************************* --->
<!--- Reload Checks --->
<cfset reloadChecks()>
<!--- Process A ColdBox Request Only --->
<cfif findNoCase('index.cfm', listLast(arguments.targetPage, '/'))>
<cfset processColdBoxRequest()>
</cfif>
<!--- WHATEVER YOU WANT BELOW --->
<cfreturn true>
</cffunction>
</cfcomponent>