Re: Protected methods in interfaces

From: Date: Thu, 05 Aug 2004 17:51:01 +0000
Subject: Re: Protected methods in interfaces
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-11944@lists.php.net to get a copy of this message
Hello Marcus, Can abstract methods be protected? -- Best regards, Jason mailto:jason@ionzoft.com Thursday, August 5, 2004, 1:32:05 PM, you wrote: MB> Hello Ferdinand, MB> 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? MB> All interface methods must be public - that's the point behind interfaces. MB> regards MB> marcus

« previous php.internals (#11944) next »