Home » Database » DB_DataObject » Bug #291
Auto-generated file names do not match class names
Details
| Submitted | 2003-11-25 02:26 UTC |
|---|---|
| From | brian at OpenSourceConcepts dot com |
| Status | No Feedback |
| Package | DB_DataObject |
| PHP Version | 4.3.3 |
| OS | RedHat Linux 9 |
| Roadmaps | (Not assigned) |
Comments
[2003-11-25 02:26 UTC] brian at OpenSourceConcepts dot com
Description:
------------
This is not necessarily a bug, but rather a feature that does not work as expected. When I autogenerate my Db_DataObject classes with the following configuration:
[DB_DataObject]
database = pgsql://user:password@localhost/foo
schema_location = /web/foo/schema
class_location = /web/foo/class
require_prefix = DataObjects/
class_prefix = Bar
I get a nice bunch of class files in my /web/foo/class directory. All the classes are named Bar[table_name], however the files are only named [table_name].php
There are two problems with this: 1) The usual convention is to match the file name to the class name, and 2) I am using a PostgreSQL database with the following schema.table format: Bar.[table_name], so the current model does not allow enough granularity to distinguish all my different types of classes from one another.
Since PHP does not support namespaces for classes, it would be nice to be able to create a common prefix for all file names created by DB_DataObject. I haven't found any way to do this from the documentation.
Other than this minor request, nice work. This class is very handy!