Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81724 invoked by uid 1010); 23 Nov 2005 17:36:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81709 invoked from network); 23 Nov 2005 17:36:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2005 17:36:01 -0000 X-Host-Fingerprint: 195.80.104.106 gw.mig.ee Received: from ([195.80.104.106:7500] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A1/BB-11378-088A4834 for ; Wed, 23 Nov 2005 12:36:00 -0500 Message-ID: To: internals@lists.php.net Date: Wed, 23 Nov 2005 19:37:21 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050809) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <00A2E2156BEE8446A81C8881AE117F192C1C4E@companyweb> <43838433.3080404@lerdorf.com> <43849103.60307@iamjochem.com> <438499A8.7030900@cschneid.com> In-Reply-To: <438499A8.7030900@cschneid.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 195.80.104.106 Subject: Re: AW: AW: [PHP-DEV] PDM Meeting Notes From: ants.aasma@mig.ee (Ants Aasma) Christian Schneider wrote: >> abstract static protected function __construct(CrazySettings $s, >> CrazyView $v); > Static doesn't really make sense as interfaces as object instance related. Well actually the constructor is implicitly a static function too. The whole allowing/disallowing constructor in interfaces question is in principle exactly the same as allowing static methods in interfaces. Anyway, I see only one use case for interface constructors: interace IConstructableFromBananas { function __construct(Bananas $b); } function thingsThatUseBananasFactory($className) { $class = new ReflectionClass($className); if (!$class->implementsInterface("IConstructableFromBananas")) { trigger_error("$className doesn't implement IConstructableFromBananas", E_USER_ERROR); } return new $className(BananaFactory::getBananas()); } I'm not so sure whether this is useful to anyone, but I don't see it hurting anyone either. Ants