PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #2740

Prefix for auto built file names

Details

Request #2740Prefix for auto built file names
Submitted2004-11-11 14:38 UTC
Froml-may at gmx dot de
StatusClosed
PackageDB_DataObject
PHP Version5.0.2
OSirrelevant
Roadmaps(Not assigned)

Comments

[2004-11-11 14:38 UTC] l-may at gmx dot de

Description:
------------
If I rename files generated by the autobuilder, the autoloader (factory) won't find the classes. Well, this sounds quite natural :-).

But while I can configure a prefix for the class names, I cannot set a prefix for the php file names. This is somehow disturbing, because need to use "java naming conventions" (class name same as file name).

Might it be possible to add a configuration option to set a prefix for the names of the generated files?

Thanks!

Reproduce code:
---------------
see also

Bug #291 Auto-generated file names do not match class names

There's a comment with a proposed solution which does not work (at least for me).

[2004-11-15 09:01 UTC] l-may at gmx dot de

I just submitted a long comment and it is lost, nowhere to be seen. What happens to comments? The function "Add Comment" does not seem to work.

So again:

I assume:
class_prefix = DO_

This means generated classes for tables "user" and "project" will be named "DO_User" resp. "DO_Project", but the file names will be "User.php" resp. "Project.php".

What I am after is one of the following two alternatives:

1.) The class_prefix could also be used for the file names, e.g. for the above example the files would be named "DO_User.php" resp. "DO_Project.php".

2.) There could be a setting for a file prefix, e.g.

file_prefix = DO_

would produce files with the name "DO_User.php" resp. "DO_Project.php" for the above table names.

Thanks,

Lothar