PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1845
Number of posts: 5013

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Secrecy for objects in PHP? Posted by Kyon on 22 Aug 2002 at 5:51 AM
Hi.

Is there any secrecy concerning the attributes of objects in PHP? Coming from Java, I'm missing this principle for protecting the object-internal data against access from outside. Usually you should only be able to change the object's state by the methods it defines to change them. Otherwise this'd be no 'clean' OO-programming.

Any suggestions or comments?
Cheers,
Kyon

-- planning is the substitution of hazard by error --
Report
self-answered Posted by Kyon on 23 Aug 2002 at 11:23 AM
Hi again.

I found out by myself by now. From the coming version PHP5 on there'll be such a thing as public, protected and private for methods & variables.

Cheers,
Kyon

-- planning is the substitution of hazard by error --




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.