On 17 Feb 2004 at 8:59, Hans Lellelid wrote:
> interface IA {
> function init();
> function doSomething($arg1,$arg2);
> }
>
> interface IB {
> funciton init();
> function doSomething($arg1, $arg2, $arg3, $arg4 = null);
> function doSomethingElse($arg1);
> }
>
> class A implements IA {
> // same class body as above
> }
>
> class B extends A implements IB {
> // same class body as above
> }
>
> Now I get fatal errors, because class B is inheriting functionality
from
> A that is required by the interface IB. Actually, I think what is
> happening (can someone confirm this?) is that class B is being
forced to
> implement both IA and IB, and because interfaces (unlike classes)
are
> not allowed to override methods class B cannot implement both
interfaces.
Well that's a tricky one. I don't think there is a reasonable solution for
this problem.
In my opinion, the engine should allow adding parameters with
default values to the old API. In your example, we should just keep
the status quo. As I said before, I don't see a solution that "fits the
PHP goal". Such situations are certainly very rare and I can live that
restriction.
--
Ferdinand Beyer
<[EMAIL PROTECTED]>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php