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 #3013

Adding a table prefix for tables used by DB_DataObject

Details

Request #3013Adding a table prefix for tables used by DB_DataObject
Submitted2004-12-22 14:23 UTC
Fromphil at gyford dot com
StatusSuspended
PackageDB_DataObject
PHP Version4.3.9
OSMac OS X
Roadmaps(Not assigned)

Comments

[2004-12-22 14:23 UTC] phil at gyford dot com

Description:
------------
Is it possible to specify a table prefix for tables used by DB_DataObject?

I've just had to add prefixes to all the table names used by my current project, and this of course means that DB_DataObject's auto-building creates new class files with different names, which means a lot of manual changes around the site.

eg... My .ini had this in it:

require_prefix = DataObjects/ class_prefix = DataObjects_

and I had a table called 'person' and a class called 'DataObjects_Person' in a Person.php file.

After adding table prefixes I have a table called 'myproject_person' and a class called 'DataObjects_Myproject_person' in a Myproject_person.php file.

I guess being able to put:

table_prefix = myproject_

in my .ini file would be ideal but I can't find anything like this in the documentation. Any thoughts?