Yes, as Brian said, go with protected.  If you need to change the value of
the attribute from outside of the class then provide a public setter method
to set a new value.  This approach makes the control of the objects a lot
easier to manage.

Best,
Jeff

--
Jeff Slutz
JSLEUTH LLC
3242 44th ST APT 3F
Astoria, NY 11103
c. 970.443.9390
j...@jeffslutz.com


On Fri, Jan 25, 2013 at 7:55 PM, Brian O'Connor <gatzby...@gmail.com> wrote:

> You can also use 'protected' to only allow sub-classes to access the
> variable.
>
>
> On Fri, Jan 25, 2013 at 7:52 PM, Leam Hall <leamh...@gmail.com> wrote:
>
>> And that would be to make the variables public.
>>
>>
>> On 01/25/2013 07:34 PM, Leam Hall wrote:
>>
>>> Will do. Right now I'm trying to figure out how to override a variable
>>> set in the parent class.
>>>
>>>  ______________________________**_________________
>> New York PHP User Group Community Talk Mailing List
>> http://lists.nyphp.org/**mailman/listinfo/talk<http://lists.nyphp.org/mailman/listinfo/talk>
>>
>> http://www.nyphp.org/show-**participation<http://www.nyphp.org/show-participation>
>>
>
>
>
> --
> Brian O'Connor
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation
>
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show-participation

Reply via email to