I am new to OOP, and I have a question that should be pretty damn, but I had trouble explaining it in a short form, so it's hard to find the answers.
I have an application that supports credit card processing, and I want to abstract the processing capabilities to add other providers (linkpoint, authorize.net, etc.). I think I want to create a simple class that looks something like this:
class credit {
function __construct($provider){
}
}
Then I will have providers, each of which extends this class, for example
class linkpoint extends credit { }
But I really want to use the credit class more as an interface, sort of. I do not want a loan object, I want to do something like:
$credit = new credit('linkpoint');
, $credit linkpoint. , , , , linkpoint.
? ?