-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApplication.cfc
150 lines (118 loc) · 3.79 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<cfcomponent extends="core.coreApp">
<!--- Application settings --->
<cfset this.name = "coresampleapp">
<!--- Framework settings --->
<!--- *** All settings are optional *** --->
<!---
this.mainHandler:
This is the name of the component used as the main event handler,
core will call the methods onApplicationStart, onRequestStart and onRequestEnd
on the main handler if any of them exists.
Also, if the requested event is not qualified by an event handler CFC or by a
module, it will call the event on the main handler. For example:
index.cfm?event=hello
will call the event "hello" on the main handler.
--->
<cfset this.mainHandler = "main">
<!---
this.defaultEvent:
This is the name of the event that will be called when no event is explicitly
indicated
--->
<cfset this.defaultEvent = "sayHello">
<!---
this.errorHandler:
An event to call whenever an error occurs.
--->
<cfset this.errorHandler = "">
<!---
this.restartKey:
This is an arbitrary value that can be set to force a reload of the application
upon deploy without explicitly requiring to use the resetApp flag.
Whenever this value is set to something different, a reload will be done.
--->
<cfset this.restartKey = "">
<!---
this.configDoc:
This is the name of an optional xml file to provide application settings and
to declare simple services to ba available as singletons.
--->
<cfset this.configDoc = "">
<!---
this.dirs.handlers:
Name of the directory (relative to the application root) where all handler
CFCs will be stored.
--->
<cfset this.dirs.handlers = "">
<!---
this.dirs.layouts:
Name of the directory (relative to the application root) where all layout
templates will be stored.
--->
<cfset this.dirs.layouts = "">
<!---
this.dirs.views:
Name of the directory (relative to the application root) where all view
templates will be stored.
--->
<cfset this.dirs.views = "">
<!---
this.dirs.modules:
Name of the directory (relative to the application root) where all modules
will be stored.
--->
<cfset this.dirs.modules = "">
<!---
this.paths.app:
Path to where the application lives.
--->
<cfset this.paths.app = getDirectoryFromPath(cgi.script_name)>
<!---
this.paths.core:
Path to where the Core framework lives. By default assumes that its on a
subdirectory named 'core'
--->
<cfset this.paths.core = "">
<!---
this.paths.error:
Path to a template to show whenever an error occurs.
Defaults to /path_to_core/includes/error.cfm
--->
<cfset this.paths.error = "">
<!---
this.paths.handler:
Use this to indicate an explicit path for where to locate the event handlers.
By default assumes that its on a subdirectory indicated by the
setting this.dirs.handlers
--->
<cfset this.paths.handlers = "">
<!---
this.paths.layouts:
Use this to indicate an explicit path for where to locate the layout templates.
By default assumes that its on a subdirectory indicated by the
setting this.dirs.layouts
--->
<cfset this.paths.layouts = "">
<!---
this.paths.views:
Use this to indicate an explicit path for where to locate the views templates.
By default assumes that its on a subdirectory indicated by the
setting this.dirs.views
--->
<cfset this.paths.views = "">
<!---
this.paths.modules:
Use this to indicate an explicit path for where to locate the modules.
By default assumes that its on a subdirectory indicated by the
setting this.dirs.modules
--->
<cfset this.paths.modules = "">
<!---
this.paths.config:
Use this to indicate an explicit path for where to locate the config file.
If not empty, then this setting needs to point to the actual config file,
if empty then core uses the setting this.configDoc to obtain the location
of the file.
--->
<cfset this.paths.config = "">
</cfcomponent>