Re: Re: Interface inheritance
| From: | Jan Schneider | Date: | Mon, 19 Apr 2004 12:39:02 +0000 |
| Subject: | Re: Re: Interface inheritance | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9381@lists.php.net to get a copy of this message | ||
Zitat von Zeev Suraski <zeev@zend.com>:
At 13:01 19/04/2004, Christian Schneider wrote:+1 from a user's perspective, that is pro fatal errors on interfaces and abstract methods but not on regular methods. That's the best balance on keeping BC and introducing useful OO features. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - Neue Wege des Lernens http://www.tip4all.de - Deine private TippgemeinschaftZeev Suraski wrote:This is valid. As long as you *can* call the function using the same prototype as the one in the interface, it's considered to be compatible. You can extend it using default values.Any method that implements (directly or indirectly) an interface method or an abstract method, will have implementation checks fully enforced, with an E_COMPILE_ERROR emitted in case of an error.Excuse my ignorance: What is defined as fully implementing the interface? I guess all methods have to be implemented with all the parameters having the same type if specified, right? What about extending the parameter set, especially with default values? E.g. is foo(A $a, $newparam = 'false) valid for foo(A $a)?