Re: [PHP-DEV] Re: Property Overloading RFC

2005-08-09 Thread Derick Rethans
On Mon, 8 Aug 2005, Justin Hannus wrote: > The way ActionScript 2.0 solves this is with set and get keywords on function > declarations. Any class can contain as many setter/getters as they need,. > Since we dont want to introduce any new keywords how about something similar > with __set and __get

[PHP-DEV] Re: Property Overloading RFC

2005-08-08 Thread Justin Hannus
Please let me correct my last post, and sorry for the double posting :) Justin Hannus wrote: The way ActionScript 2.0 solves this is function __get fooProp() { return $this->_fooProp; // $_fooProp is read only } function __set barProp($val) { //

[PHP-DEV] Re: Property Overloading RFC

2005-08-08 Thread Justin Hannus
...And, this could allow static member overloading as well! -Justin Justin Hannus wrote: The way ActionScript 2.0 solves this is with set and get keywords on function declarations. Any class can contain as many setter/getters as they need,. Since we dont want to introduce any new keywords how

[PHP-DEV] Re: Property Overloading RFC

2005-08-08 Thread Justin Hannus
The way ActionScript 2.0 solves this is with set and get keywords on function declarations. Any class can contain as many setter/getters as they need,. Since we dont want to introduce any new keywords how about something similar with __set and __get? _fooProp = $val; // $_fooProp is read only

Re: [PHP-DEV] Re: Property Overloading RFC

2005-08-04 Thread boots
--- Marcus Boerger <[EMAIL PROTECTED]> wrote: > Hello boots, > > Thursday, August 4, 2005, 6:29:51 AM, you wrote: > > As far as introspection (points 1 and 2), would it be reasonable to > > allow __get/__set to be called without any parameters in which case > > they would be expected to optionally

Re: [PHP-DEV] Re: Property Overloading RFC

2005-08-04 Thread Marcus Boerger
Hello boots, Thursday, August 4, 2005, 6:29:51 AM, you wrote: > Derick Rethans wrote: >> Problems: >> 1. There is no way to document the 'virtual' properties with any of >>the existing documentation tools (such as phpdoc and doxygen) >> 2. There is no way how the magic methods know if a spec

Re: [PHP-DEV] Re: Property Overloading RFC

2005-08-03 Thread boots
Derick Rethans wrote: > Problems: > 1. There is no way to document the 'virtual' properties with any of >the existing documentation tools (such as phpdoc and doxygen) > 2. There is no way how the magic methods know if a specific 'virtual' >property exists or not as those properties are not

Re: [PHP-DEV] Re: Property Overloading RFC

2005-08-03 Thread Marcus Boerger
Hello Greg, Wednesday, August 3, 2005, 4:56:26 AM, you wrote: > Hi, > As for the first question of how to document virtual properties, I have > been recommending that users do this textually inside the docblock for > __get()/__set(). This is actually ideal in almost every case, as anyone > u

[PHP-DEV] Re: Property Overloading RFC

2005-08-02 Thread Greg Beaver
Hi, As for the first question of how to document virtual properties, I have been recommending that users do this textually inside the docblock for __get()/__set(). This is actually ideal in almost every case, as anyone using __get()/__set() for finite, concrete properties should almost defin

[PHP-DEV] Re: Property Overloading RFC

2005-08-02 Thread Christian Schneider
Derick Rethans wrote: class. The magic methods are responsibly for: - checking if the property actually "exists" This is something I wouldn't encourage as one of the virtues of fully dynamic languages is the "lack" of checking this. Otherwise what happens if e.g. one inherits such a class to