06-29-2008, 02:18 AM
|
#5 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
TalkPHP - Using Abstract Classes to Define Rules
TalkPHP - Working with Interfaces
may help.
An interface is a prototype/blueprint of an implemented class, in otherwords it defines rules that a class must implement and nothing else and they cant contain functioning code.
An abstract is like an interface but you can define some of it to be functional code that will be available to the derived class through inheritance.
So in short, abstracts are much like interfaces, but they allow you to have common methods inherited into derived objects, where as interfaces just enforce the API of the object.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|