NYCPHP Meetup

NYPHP.org

[nycphp-talk] OOP Newbie Building arrays in extended classes

CED consult at covenantedesign.com
Sat Jan 26 11:08:26 EST 2013


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
> jeff at jeffslutz.com <mailto:jeff at jeffslutz.com>
>
>
> On Fri, Jan 25, 2013 at 7:55 PM, Brian O'Connor <gatzby3jr at gmail.com
> <mailto:gatzby3jr at 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 <leamhall at gmail.com
>     <mailto:leamhall at 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
Consult at CovenanteDesign.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20130126/2d43af93/attachment.html>


More information about the talk mailing list