I'm new to OOP/PHP. What's the practicality of visibility and extensibility in classes?
Posted
by marcdev
on Stack Overflow
See other posts from Stack Overflow
or by marcdev
Published on 2010-05-26T14:03:30Z
Indexed on
2010/05/26
14:11 UTC
Read the original article
Hit count: 268
I'm obviously brand new to these concepts. I just don't understand why you would limit access to properties or methods. It seems that you would just write the code according to intended results. Why would you create a private method instead of simply not calling that method? Is it for iterative object creation (if I'm stating that correctly), a multiple developer situation (don't mess up other people's work), or just so you don't mess up your own work accidentally?
© Stack Overflow or respective owner