Re: AW: AW: [PHP-DEV] PDM Meeting Notes

From: Date: Wed, 23 Nov 2005 16:32:40 +0000
Subject: Re: AW: AW: [PHP-DEV] PDM Meeting Notes
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-20267@lists.php.net to get a copy of this message
Jochem Maas wrote:
so I can only assume that the ability to declare ctor signatures have been left in because they do no harm regardless of whether it is 'correct'.
If I remember correctly then one reason to have constructor signatures is for object factories: You specify that an object to be created by a specific factory has to follow certain constructor rules. I see nothing wrong with that, it is part of a public interface of a class and hence one should be able to specify it in an interface.
    abstract static protected function __construct(CrazySettings $s, CrazyView $v);
Abstract is purely redundant here as interfaces never implement a function. If on the other hand you mean that classes _implementing_ this interface have to declare those methods as abstract then I don't see how anyone could actually use this interface as no non-abstract class could implement these functions in the interface. Static doesn't really make sense as interfaces as object instance related. As far as protected and private go I have less strong of an opinion but I understand the point of view that interfaces describe the _public_ interface of an object, everything else are implementation details. - Chris

« previous php.internals (#20267) next »