PageRenderTime 16ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/cacheManagement/examples/util/SessionManager.cfc

http://coldfusioncachemanager.googlecode.com/
ColdFusion CFScript | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | 1d6dd8c813b4fdf3dbaca11bf3927e6f MD5 | raw file
 1<cfcomponent output="false">
 2    
 3    <cffunction name="init" access="public" returntype="SessionManager" output="false">
 4        <cfreturn this />
 5    </cffunction>
 6    
 7    <cffunction name="setValue" access="public" returntype="void" output="false">
 8        <cfargument name="name" type="String" required="true" />
 9        <cfargument name="value" type="Any" required="true" />
10        <cfset setVariable( 'session.#arguments.name#', arguments.value ) />
11    </cffunction>
12    
13    <cffunction name="getValue" access="public" returntype="Any" output="false">
14        <cfargument name="name" type="String" required="true" />
15		<cfreturn session[ arguments.name ] />
16    </cffunction>
17    
18    <cffunction name="exists" access="public" returntype="boolean" output="false">
19        <cfargument name="name" type="String" required="true" />
20        <cfreturn structKeyExists( session, arguments.name )/>
21    </cffunction>
22
23</cfcomponent>