This tutorial starts fresh with Object Oriented programing with a focus on implementing an interface, and using that interface for our advantage when going through an array.
This tutorial covers
Creating classes
Creating an interface
Implementing an interface
Using a magic constant
Here’s the video,
Make sure to take the jump if you want to see the final source code! Read more…
This tutorial starts fresh with Object Oriented programing with a focus on extending other classes, and a parent class that holds collections of the account class.
It covers
Class creation
Class Extension
Peak into the static keyword
Example of instanceof
Small explanation of the self keyword
Here’s the video, I’m totally winging it without any prior planning other than to cover something more that I did not cover in the last tutorial. Thanks to you subscribers now, I don’t have to split up my tutorials!
Make sure to take the jump if you want to see the resulting source code and textual explanations. Read more…
This is a basic introduction to Object Oriented programming in PHP.
Here, I introduce
classes
public/private variables and methods
magic methods
method chaining
I use a diagram to show the concept visually before creating the code, and then I test it in the terminal.
I also show variable casting to ensure that information is properly handled, even when it is of the wrong type.