PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #3001

Patch for class generator to generate getters/setters on demand

Details

Request #3001Patch for class generator to generate getters/setters on demand
Submitted2004-12-21 10:34 UTC
Fromroehr at zilleon dot com
StatusClosed
PackageDB_DataObject
PHP VersionIrrelevant
OSirrelevant
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