while we're on the topic of "forcing" someone to extend off of a class or what not.
There are ways to use PHP to restrict access to other parts of your core classes, by using the PHP function: is_subclass_of() ( you can grab a whole bunch of other class/object functions at
http://www.php.net/manual/en/ref.classobj.php )
By using little tricks like this, you can enforce parent to child relationships. Also, consider the following, which are possible thanks to Abstract classes, as these are possible ways to also enforce parent to child relationships...
a. To Start, if you don't trust other developers to follow the rules, put all other developers are only allowed to edit files within a certain branch. This can be done with a version control client, or simply, giving them an FTP login that restricts them to a certain folder subset.
b. Keeping your core files out of their branches forces them to include them, and "interface" through them.
c. Keeping your methods private/protected, means you can restrict the developers ability to override your precautions already set in place.
d. Then, have 'sanity checks' to make sure access to the database and/or other core classes / modules is restricted to children / parent classes. (if you so choose)
But yes, extending or implementing, totally optional.
But you can gain a whole lot by extending or implementing abstract classes or interfaces.
A lot of PHP4 users don't really see this right off of the bat, thinking that this is one of those things for languages like Java or C++, classes with visibility restrictions etc etc, bleh. Those languages are very different than PHP, which is such a weakly typed language.
And I'll be honest, not everything you do needs an abstract class, or an interface. Experience will tell one day, "Hey, this would be a great place to plop down an interface." or "Damn, I should stick these methods in abstract classes."
I personally, love the flexibility you have with these features in PHP5.
So yeah, in my rambling I think I came to a point.