Are you familiar with the tools we're given in PHP 5.4 to write Object Oriented code?
We can manipulate scope, have interfaces, abstract classes, traits, namespaces…
What's the difference between
Public ensures a class method/variable is available everywhere, from any instance of the class. Protected makes the method/variable only available to the class itself and extending classes. Private makes the method/var only accessible to the class itself.
Do you know any of these acronyms?
- DRY "Don't Repeat Yourself"