I will cover the fundamentals of OOP (Object Oriented Programming) in php, I will try to use real word examples, no foo bar or value1, value 2 etc. as I realised that they don’t often make much sense to beginners.
I will start by covering how to use DocBlocks to document our code, declare a class using the class keyword, declare and access properties including those private and protected, how to use the __constructor() method, how to instantiate an object using the new keyword, class methods, sub-classes, and some extras including magic methods.
The Course Article is available here:
https://fabiopacifici.com/object-orie...
Part One - Course Topics:
1. Define our Project structure
2. Using the Doc Blocks
3. Define a class using the class keyword
4. Define properties: public, protected, private
5. The Class Constructor
6. Class Methods
7. Sub-classes