Hi folks,
Does anyone know of a way to set the access level of a cfc function when the
object is created?
Here's what I tried (this does not work):
foo.cfc ->
<cfcomponent displayname="foo">
<cffunction name="init" access="public" returntype="foo"
output="false">
<!---cfset this.bar.access = "private" /---> <!--- this
doesn't work either --->
<cfset temp = StructUpdate(this.bar, "access", "private")>
<cfreturn this />
</cffunction>
<cffunction name="bar" access="public" returntype="string"
output="false">
<cfreturn "hello world!" />
</cffunction>
</cfcomponent>
main.cfm ->
<cfset foo = createObject("component","foo").init() />
<cfdump var="#foo#">
What I'm after is to filter the properties that are available when the
object is constructed (by making the setter/getter methods private for the
properties that are not available). Ultimately I'd like to marry a filter
object with foo and return a component which makes available the properties
(via the setters/getters) defined by the filter.
Any thoughts?
Ed.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]