Any real world simple samples of using abstract class?
I’m trying to get in PHP’s OOP, but I still can’t understand – why abstract class should be used and when (Yes, I know that it’s impossible to create abstract class instance, only instance of class inheriting it).
Any real world simple samples of using abstract class? I’m trying to get in
Share
Maybe you have an image class, and you have 2 drivers, GD and ImageMagick.
Your base class may be
Then your GD driver will be like
Look at Kohana’s source on GitHub. It has an
Imageclass which isabstract.