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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to