• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ColdFusion 2018 update 10 does not interpret private functions

New Here ,
Oct 07, 2020 Oct 07, 2020

Copy link to clipboard

Copied

I've found one more problem while creating a POO service.

 

I've created a component with some PRIVATE getter and setter functions, then a PUBLIC transactional function IN SAME component to access these getter and setter functions. After instancing the referenced object then using the transaction function, an error appears explaining the getter and setter functions could not be found. To avoid this error, I needed to change the getter and setter functions' visibility to PACKAGE. So, did anyone find a similar issue while creating a POO architecture using ColdFusion 2018?

Views

83

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 09, 2020 Oct 09, 2020

Copy link to clipboard

Copied

LATEST

The behaviour you describe makes sense to me. The CFC is the service. The one who instantiates the CFC is the client, presumed to be anywhere in the universe outside of the CFC. As such the client should know nothing about the private properties of the CFC. This is encapsulation or information-hiding, aspects of software design that transcend Pattern Object-Oriented architecture.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation