PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/SampleApplication/ColdBox3/model/form/Enquiry.cfc

http://github.com/bobsilverberg/ValidateThisColdBoxPlugin
ColdFusion CFScript | 69 lines | 52 code | 16 blank | 1 comment | 0 complexity | edfd2414af0d29bae3c893dfd3c81039 MD5 | raw file
 1<cfcomponent output="false" hint="I am a non-persisted Enquiry object written with tags">
 2	
 3	<!---
 4	------------------------------------------------------------
 5	constructor
 6	------------------------------------------------------------
 7	--->
 8
 9	<cfset instance = {}>
10
11	<cffunction name="init" returntype="Enquiry" output="false">
12		<cfscript>
13		// set defaults
14		setFirstname('');
15		setLastname('');
16		setEmail('');
17		setMessage('');
18		
19		return this;
20		</cfscript>
21	</cffunction>
22
23	<!---
24	------------------------------------------------------------
25	public
26	------------------------------------------------------------
27	--->
28
29	<!--- getters --->
30	<cffunction name="getEmail" returntype="string" output="false">
31		<cfreturn instance.email>
32	</cffunction>
33	
34	<cffunction name="getFirstname" returntype="string" output="false">
35		<cfreturn instance.firstname>
36	</cffunction>
37	
38	<cffunction name="getLastname" returntype="string" output="false">
39		<cfreturn instance.lastname>
40	</cffunction>
41
42	<cffunction name="getMessage" returntype="string" output="false">
43		<cfreturn instance.message>
44	</cffunction>	
45
46	<!--- setters --->
47	
48	<cffunction name="setEmail" returntype="void" output="false">
49		<cfargument name="email" required="true">
50		<cfset instance.email = arguments.email>
51	</cffunction>
52	
53	<cffunction name="setFirstname" returntype="void" output="false">
54		<cfargument name="firstname" required="true">
55		<cfset instance.firstname = arguments.firstname>
56	</cffunction>
57	
58	<cffunction name="setLastname" returntype="void" output="false">
59		<cfargument name="lastname" required="true">
60		<cfset instance.lastname = arguments.lastname>
61	</cffunction>
62	
63	<cffunction name="setMessage" returntype="void" output="false">
64		<cfargument name="message" required="true">
65		<cfset instance.message = arguments.message>
66	</cffunction>
67
68</cfcomponent>
69