Re: Property Overloading RFC

From: Date: Mon, 08 Aug 2005 12:55:32 +0000
Subject: Re: Property Overloading RFC
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-17598@lists.php.net to get a copy of this message
On Mon, 8 Aug 2005, Roland Tapken wrote: > > 3. There is no way for the magic methods to return a meaningfull error > > when a property doesn't "exist". Of course it is possible to throw an > > error with "trigger_error" or "throw" in case a property doesn't > > "exist" > > in a specific class, but the file and line numbers would not match the > > actually get/set action. debug_backtrace() can be used to retrieve the > > correct file and line, but as you have to do this for every class where > > you want to use setters and > > getters *and* you have to implement your own error message rendering > > function this is not really a suitable option either. > > Don't know if this can be implemented... but what's about a 3rd boolean > "handled" call-by-reference-parameter which must be switched to "TRUE" if > the property could be handled? Should be TRUE if ommitted for bc reasons, > of course. That was my original idea. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

« previous php.internals (#17598) next »