View Single Post
04-18-2009, 02:51 PM
Join Date: Feb 2009
Location: New York
Originally Posted by
To access the property directly (
), yes it needs to be public. Also note that with private, any classes that extend the class will not have access to it. If you want extending classes to be able to 'see' the private property then it will need to instead be
I think I am a long ways before I write another class extending another class. haha...but I understand.
public - anyone from anywhere can access the property
private - only accessible within the class
protected - only accessible within the class and child classes that have been extended...
And the rules work exactly the same way for methods too? Not just properties....right?
View Public Profile
Send a private message to allworknoplay
Find More Posts by allworknoplay