Re: Implementing interface method with child class in parameter def (Bug #42330)
| From: | Rowan Collins | Date: | Wed, 17 Sep 2014 17:10:48 +0000 |
| Subject: | Re: Implementing interface method with child class in parameter def (Bug #42330) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77299@lists.php.net to get a copy of this message | ||
Christian Stoller wrote (on 17/09/2014):
I'd say that it is absolutely legal to define a more specialized type in a child or implementing class, or would this have any bad side effects?Here is a StackOverflow question discussing exactly this issue, which includes why you can't do that with an interface contract, and some suggestions on what you might want to do instead: http://stackoverflow.com/q/21665795/157957 -- Rowan Collins [IMSoP]