Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29563 invoked by uid 1010); 5 Aug 2004 17:32:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29538 invoked from network); 5 Aug 2004 17:32:10 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 5 Aug 2004 17:32:10 -0000 Received: from BAUMBART (p508EB623.dip.t-dialin.net [::ffff:80.142.182.35]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Thu, 05 Aug 2004 17:29:42 +0000 Date: Thu, 5 Aug 2004 19:32:05 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1447642463.20040805193205@marcus-boerger.de> To: Ferdinand Beyer CC: internals@lists.php.net In-Reply-To: <411267F6.29103.185A825@localhost> References: <411267F6.29103.185A825@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Protected methods in interfaces From: helly@php.net (Marcus Boerger) Hello Ferdinand, Thursday, August 5, 2004, 5:01:42 PM, you wrote: > Trying to write a singleton interface: > interface Singleton { > // Disallow public construction > protected function __construct(); > public static function getInstance(); > } > I got an error saying I was not allowed to declare the constructor > protected - I should either use public or omit it. > Why can't I instruct Singleton-classes to use protected constructors? > Is this expected behavior or may I file a bug report? All interface methods must be public - that's the point behind interfaces. regards marcus