Multiple Visibility Level Getters/Setters

From: Date: Sat, 19 Nov 2011 01:46:09 +0000
Subject: Multiple Visibility Level Getters/Setters
Groups: php.internals 
Request: Send a blank email to internals+get-56419@lists.php.net to get a copy of this message
What would everyone think about multiple levels of visibility for getters/setters? class Sample { public $Variable { public get { return "Public"; } protected get { return "Protected"; } private get { return "Private"; } public set { ... } private set { ... } } } Whichever getter/setter would be called with the most restricted access, so externally public, internally protected (if inherited) or private from within. Any value to this? I can see some use cases and wouldn't be any more difficult to implement into what I'm already doing. -Clint

« previous php.internals (#56419) next »