Re: Changing the visibility of constructors?
| From: | Timm Friebe | Date: | Mon, 09 Feb 2004 17:44:50 +0000 |
| Subject: | Re: Changing the visibility of constructors? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7676@lists.php.net to get a copy of this message | ||
On Mon, 2004-02-09 at 18:28, Andrey Hristov wrote:
> Hello internals,
> what's your opinion on whether the constructors must follow one of the
> principles of the polymorphism - "The visibility in extending classes must be
> the same or better".
[...]
> Currently this code emits a compilation error.
Not just one: Fatal error: Cannot use 'parent' as class name as it is
reserved:)
AFAIS, you only run into this in cases where your base class has a
public constructor or any other public methods extended class might want
to make private or protected (see the thread about having a built-in
base class with all methods implemented - one more reason for not having
one).
I'm fine with the current solution. Everything else is sloppy, IMHO.
- Timm