If a class implements another class... what does that mean? I found this code sample: http://www.java2s.com/Code/Php/Class/extendsandimplement.htm
But unfortunately
Interfaces are implemented through classes. They are purely abstract classes, if you will.
In PHP when a class implements from an interface, the methods defined in that interface are to be strictly followed. When a class inherits from a parent class, method parameters may be altered. That is not the case for interfaces:
interface ImplementMeStrictly {
public function foo($a, $b);
}
class Obedient implements ImplementMeStrictly {
public function foo($a, $b, $c)
{
}
}
will cause an error, because the interface wasn't implemented as defined. Whereas:
class InheritMeLoosely {
public function foo($a)
{
}
}
class IDoWhateverWithFoo extends InheritMeLoosely {
public function foo()
{
}
}
Is allowed.