OOP in PHP
Tutorials in object orientated PHP are gathered in this category.
- Learn about the difference between arrays and objects, and why objects are more powerful than arrays.
- We can prevent adding properties to instantiated objects in PHP to help enforce good coding practice; in this tutorial I show how this is accomplished.
- We can access other classes properties (variables) and methods (functions) by injecting the class object in the class that needs it.
- Auto instantiating objects created by factory classes.
- Learn what PHP objects are, and how to use them in your own PHP coding adventures.
- When does extending classes have a useful purpose? Find out more in this article.
- Learn about Namespaces in PHP, and when you should be using them. A greatly simplified tutorial for OOP beginners.
- About using PHP traits to re-use code and follow the DRY principle.
- How to extend classes in PHP, and how to use object inheritance.
- An Explanation on Properties and Methods in PHP.