Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73423 invoked by uid 1010); 5 Aug 2004 15:01:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 73372 invoked from network); 5 Aug 2004 15:01:32 -0000 Received: from unknown (HELO smtprelay02.ispgateway.de) (62.67.200.157) by pb1.pair.com with SMTP; 5 Aug 2004 15:01:32 -0000 Received: (qmail 6029 invoked from network); 5 Aug 2004 15:01:30 -0000 Received: from unknown (HELO firefly) (126482@[212.202.104.234]) (envelope-sender ) by smtprelay02.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 5 Aug 2004 15:01:30 -0000 To: internals@lists.php.net Date: Thu, 05 Aug 2004 17:01:42 +0200 MIME-Version: 1.0 Message-ID: <411267F6.29103.185A825@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (4.21a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Protected methods in interfaces From: fb@fbeyer.com ("Ferdinand Beyer") 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? -- Ferdinand Beyer