Gavin Roy wrote:
Stolen from a oo reference site (who's URL I no longer have handy):
"An object interface--or simply interface--defines methods that can be
implemented by a class. Interfaces are declared like classes, but
cannot be directly instantiated and do not have their own method
definitions. Rather, it is the responsibility of any class that
supports an interface to provide implementations for the interface's
methods. A variable of an interface type can reference an object whose
class implements that interface; however, only methods declared in the
interface can be called using such a variable."
That goes with my understanding as interfaces being one more level of
abstraction from abstract classes. That is they define the rules for
the classes that implement them, but not any code (where an abstract
class can implement code). I guess my understanding of an interface
is wrong?
no not really - only the PHP devs have a particular view of what an interface
should be / how it should be used. other groups have different views.
personally I don't _think_ you are using a 'good' paradigm for you class heirachy -
but its impossible to tell for sure - I'd have to see much more code :-)
btw: if you drop the 'static' from the interface definition and from the class definitions
(of the interface) you can still use/call the methods statically...
...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php