- ColdFusion 9 Developer Tutorial
- John Farrar
- 228字
- 2021-08-05 16:16:38
Object method access control
Generally, objects are not intended to create output other than returning actual variables. That is why the attributes output="false
" have been added all over the CFC code. You will also notice that there is an attribute called access="public
" in many of the methods. There are actually a number of settings for this. All of these indicate where the calling code must be for the method to run. Here is a list of the settings and definitions for each one:
- Public: This is the most common and default setting, if not declared. It means that any code on the server can call the object method and it will run.
- Private: In this case, the method may only be called from within the CFC. In practice, we would have taken our
setAttribute()
method and made it private. This method would normally be called only from within the actual CFC and never from outside the CFC. - Package: This is the condition where code only in the same directory may call the method. The term package comes from the object-oriented world and it is an interesting way to protect code integrity.
- Remote: Here is one of the most powerful aspects of ColdFusion. This is actually what is called a web service. Just setting this exposes the object to the outside world. We will cover more about this later.
推薦閱讀
- Entity Framework Tutorial
- 數(shù)碼攝影后期高手之路(第2版)
- Blender 3D 2.49 Architecture, Buidlings, and Scenery
- 中文版CorelDRAW X8基礎(chǔ)培訓(xùn)教程(全彩版)
- SolidWorks2014基礎(chǔ)實例教程
- Procreate+ SketchUp +Photoshop建筑設(shè)計手繪表現(xiàn)技法
- Drupal 6 Panels Cookbook
- After Effects影視特效立體化教程:After Effects 2021(微課版)
- Unreal Development Kit Beginner's Guide
- 好用,Excel數(shù)據(jù)處理高手
- Python氣象應(yīng)用編程
- Photoshop后期強(qiáng):多重曝光專業(yè)技法寶典
- AutoCAD 2020與天正建筑T20 V6.0建筑設(shè)計從入門到精通
- Deep Inside osCommerce: The Cookbook
- 圖像顯著區(qū)域提取方法及其應(yīng)用研究