Class Methods
We now know how to give data to an object using properties so let's learn how to make it do stuff.
We can use 'methods' to add functionality to the object. What is a method? It is simply a function which gets defined within the class. These methods then belong to the object and only the object will be able to call them.
Branch: https://github.com/GaryClarke/learn-oophp/tree/3-class-methods
9 comments