Re: php 5 classes: public, protected and private
- From: "jopperdepopper" <jobjes@xxxxxxxxx>
- Date: 27 Nov 2006 08:19:20 -0800
You should read "can be accessed everywhere".
Private members can be accessed by members of the class only.
Protected members can be accessed by members of the class or a derived
class.
Public members can be accessed by anyone, including other classes,
functions and any other code.
Thanks Jerry. I'm trying to make a bit of sense of the php 5 approach
to classes, and so far having a hard time. I fail to see the 'why'
behind the 'public, protected and private' and stuff like abstraction,
interfaces and whatnot. Feels like things are being over-complicated
somehow... or it's just my being inexperienced on this...
Any other reading material on this suggested, someone?
.
- Follow-Ups:
- Re: php 5 classes: public, protected and private
- From: Jerry Stuckle
- Re: php 5 classes: public, protected and private
- References:
- php 5 classes: public, protected and private
- From: jopperdepopper
- Re: php 5 classes: public, protected and private
- From: Jerry Stuckle
- php 5 classes: public, protected and private
- Prev by Date: Re: problem with multiple conditions
- Next by Date: Cookie problem
- Previous by thread: Re: php 5 classes: public, protected and private
- Next by thread: Re: php 5 classes: public, protected and private
- Index(es):
Relevant Pages
|