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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php