Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-1373: Map file with specific class #1992

Closed
doctrinebot opened this issue Sep 13, 2011 · 3 comments
Closed

DDC-1373: Map file with specific class #1992

doctrinebot opened this issue Sep 13, 2011 · 3 comments

Comments

@doctrinebot
Copy link

Jira issue originally created by user armetiz:

Hi there,
AbsractFileDriver is using the filename to know the managed class.

It's a cool feature because it's allow loading on-demand.
The problem is, that the filename must be the name of the Class.

It should be great to be able to manually map XML/YAML File description to a Class, like :
$drivers->addMappingFile ( array ( "filename" => "class", "filename2" => "class2") );

This feature is simple to implement, just add a new array inside AbsractFileDriver to know the mapping.
When using the current method with addPaths, parse the folder to get traditional XML/YAML file where filename corresponding to classname and add it to the mapping array.

AbsractFileDriver->getAllClassNames () just return value of mapping array.
The mapping array is store inside cache.

With this new feature, it allow developers to create a pretty folder that contains entities mapping.

Armetiz.

@doctrinebot
Copy link
Author

Comment created by @guilhermeblanco:

Updating fix version

@doctrinebot doctrinebot added this to the 2.x milestone Dec 6, 2015
@malukenho
Copy link

@guilhermeblanco can it be closed?

@Ocramius Ocramius self-assigned this Jan 4, 2017
@Ocramius Ocramius removed this from the 2.x milestone Jan 4, 2017
@Ocramius
Copy link
Member

Ocramius commented Jan 4, 2017

Indeed, this is better suited for custom mapping drivers, not core.

Closing.

@Ocramius Ocramius closed this as completed Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants