Protected methods in interfaces

From: Date: Thu, 05 Aug 2004 15:01:42 +0000
Subject: Protected methods in interfaces
Groups: php.internals 
Request: Send a blank email to internals+get-11941@lists.php.net to get a copy of this message
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 <fb@fbeyer.com>

« previous php.internals (#11941) next »