Access properties
Access attributes control the access to the methods within the component. At its simplest, the access attribute specifies who/what code can access the method and use its services.
Familiarizing yourself with the range of access attributes gives you greater freedom to code remotely using a web service and to integrate other web development tools, such as Flash and Flex, to use ColdFusion output.
It also helps to ensure that you do not restrict function access to a commonly used utility, or open up a method possibly containing private and confidential business logic or code to any third party.
The access attribute is placed within the cffunction
tag as follows:
<cffunction name="getAllProjects" returnType="query" output="false" access="public"> </cffunction>
Listing 2.6 Using the access
attribute
There are four options to choose from when using this attribute, and all four have a different level of access assigned to them.
Private
This is the most restricted access...