-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.cfc
More file actions
89 lines (85 loc) · 3.35 KB
/
Application.cfc
File metadata and controls
89 lines (85 loc) · 3.35 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<cfcomponent extends="org.corfield.framework" output="false">
<cfscript>
variables.framework = {
reloadApplicationOnEveryRequest = false,
// whether to force generation of SES URLs:
generateSES = true,
// whether to omit /index.cfm in SES URLs:
SESOmitIndex = true,
// location used to find layouts / views:
base = getDirectoryFromPath( CGI.SCRIPT_NAME ),
// either CGI.SCRIPT_NAME or a specified base URL path:
baseURL = CGI.SCRIPT_NAME,
// list of (partial) paths that FW/1 should not handle:
unhandledPaths = '/devFinder,/demo,/blog',
// set this to true to cache the results of fileExists for performance:
cacheFileExists = true
};
/*
variables.framework = {
// the name of the URL variable:
action = 'action',
// whether or not to use subsystems:
usingSubsystems = false,
// default subsystem name (if usingSubsystems == true):
defaultSubsystem = 'home',
// default section name:
defaultSection = 'main',
// default item name:
defaultItem = 'default',
// if using subsystems, the delimiter between the subsystem and the action:
subsystemDelimiter = ':',
// if using subsystems, the name of the subsystem containing the global layouts:
siteWideLayoutSubsystem = 'common',
// the default when no action is specified:
home = defaultSubsystem & ':' & defaultSection & '.' & defaultItem,
-- or --
home = defaultSection & '.' & defaultItem,
// the default error action when an exception is thrown:
error = defaultSubsystem & ':' & defaultSection & '.error',
-- or --
error = defaultSection & '.error',
// the URL variable to reload the controller/service cache:
reload = 'reload',
// the value of the reload variable that authorizes the reload:
password = 'true',
// debugging flag to force reload of cache on each request:
reloadApplicationOnEveryRequest = false,
// whether to force generation of SES URLs:
generateSES = false,
// whether to omit /index.cfm in SES URLs:
SESOmitIndex = false,
// location used to find layouts / views:
base = getDirectoryFromPath( CGI.SCRIPT_NAME ),
// either CGI.SCRIPT_NAME or a specified base URL path:
baseURL = 'useCgiScriptName',
// location used to find controllers / services:
cfcbase = essentially base with / replaced by .
// whether FW/1 implicit service call should be suppressed:
suppressImplicitService = true,
// list of file extensions that FW/1 should not handle:
unhandledExtensions = 'cfc',
// list of (partial) paths that FW/1 should not handle:
unhandledPaths = '/flex2gateway',
// flash scope magic key and how many concurrent requests are supported:
preserveKeyURLKey = 'fw1pk',
maxNumContextsPreserved = 10,
// set this to true to cache the results of fileExists for performance:
cacheFileExists = false,
// change this if you need multiple FW/1 applications in a single CFML application:
applicationKey = 'org.corfield.framework'
};
*/
function setupApplication()
{
initFile = expandPath("./config.ini");
Application.assetsDir = getProfileString(initFile, "assets", "linkedDir");
Application.jsDir = getProfileString(initFile, "assets", "jsDir");
Application.cssDir = getProfileString(initFile, "assets", "cssDir");
}
</cfscript>
<cffunction name="setupRequest">
<!--- use setupRequest to do initialization per request --->
<cfset request.context.startTime = getTickCount() />
</cffunction>
</cfcomponent>