I am dipping my toes in more serious OOP (previously, just used inheritance) and I have stumbled across something that has confused me.
I have a super class that handles my database connection.
I have a subclass that handles connections related to a site's membership functions
I would like to employ the strategy pattern to allow different but similar functions to coexist. For example:
can an abstract class extend a super class in PHP?
This
class A {}
abstract class B extends A {}
class C extends B {}
var_dump( new C );
gives
object(C)#1 (0) {}
so the answer is: Yes, an abstract class can extend a super class in PHP.
EDIT after title update:
Yes, it is perfectly fine for a subclass to implement an interface. However, in the context of a Strategy you will likely not call the methods on any other interface than the interface that captures the abstraction and buries implementation details in derived classes. See http://sourcemaking.com/design_patterns/strategy