Hi -

Zeev Suraski wrote:
At 07:55 16/02/2004, Hans Lellelid wrote:

I have a need in a current application to extend interfaces and possibly re-define (change signature) some of the inherited methods in the child interface.
...


You're not supposed to change the signature when you're extending/implementing interfaces. I'll try to see if it's feasible to improve the checks so that they compare signatures in a smarter way (i.e., func($arg1, $arg2=null) is compatible with func($arg1), and currently it's not detected that way).



Yeah, I realize that wanting to change signatures of parent interfaces is a little weird; I'd submit that it does allow for some nice design possibilities -- but perhaps modifying an interface is at odds with the idea of an interface. I think I probably want to just copy & paste the methods that are the same rather than extend.


Making it possible to re-define methods w/ additional null params would be nice if that makes sense.

Thanks!
Hans

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to