And I would say more secure. :) On 1/25/2013 6:18 PM, Jeff Slutz wrote: > 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 <mailto:j...@jeffslutz.com> > > > On Fri, Jan 25, 2013 at 7:55 PM, Brian O'Connor <gatzby...@gmail.com > <mailto: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 > <mailto: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://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
-- <img src="http://covenantedesign.com/logo.jpg" border ="0"> 995 Maple Hill Road Castleton, New York 12033 518-331-5061 cons...@covenantedesign.com
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show-participation