Re: private, protected, readonly, public

From: Date: Fri, 12 May 2006 23:43:38 +0000
Subject: Re: private, protected, readonly, public
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Jason Garber wrote:
>   Would it be possible to create a new object property attribute:
>     readonly

Why not make it a little more generic? Say, make readonly an attribute that applies to the ppp tags
as opposed to making it a new access class. 

Eg. if a member is 'public readonly' then it's read/write for private and protected,
but read-only in a public context. Similarly, 'protected readonly' is read/write in a
private context, read-only in protected and not visible in public. That would make 'private
readonly' read-only for private methods, and not visible to anything else, which is probably
only useful for properties generated by extensions.

Or is this what you're proposing and I'm just being dense?


Thread (92 messages)

« previous php.internals (#23326) next »