To abstract, or not to...
View Single Post
06-29-2008, 02:18 AM
Join Date: Oct 2007
Location: Manchester, UK
TalkPHP - Using Abstract Classes to Define Rules
TalkPHP - Working with Interfaces
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)
The Following 2 Users Say Thank You to sketchMedia For This Useful Post:
View Public Profile
Send a private message to sketchMedia
Visit sketchMedia's homepage!
Find More Posts by sketchMedia