Home » Database » DB_DataObject » Bug #3001
Patch for class generator to generate getters/setters on demand
Details
| Request #3001 | Patch for class generator to generate getters/setters on demand |
|---|---|
| Submitted | 2004-12-21 10:34 UTC |
| From | roehr at zilleon dot com |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-12-21 10:34 UTC] roehr at zilleon dot com
Description:
------------
Hi,
with the help of Alan Richmond I have created a patch for DO's class generator to generate getter and setter methods on demand.
Reproduce code:
---------------
The patched file can be found here:
Source code: http://www.zilleon.com/PEAR/DB/DataObject/Generator.php.txt
Zip archive: http://www.zilleon.com/PEAR/DB/DataObject/Generator.zip
Sample class: http://www.zilleon.com/PEAR/DB/DataObject/Person.php.txt
Please remove my comments (/*** ADDED BY TROEHR ***/) before checking it into CVS.
To make it work there are two new options required in the DO .ini:
[DB_DataObject]
...
generate_getters = true
generate_setters = true
By default (not specifying these options) the methods are *not* generated.
Best regards,
Torsten Roehr