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

Support for multiple model directories #163

Open
simonharrer opened this issue Sep 8, 2011 · 2 comments
Open

Support for multiple model directories #163

simonharrer opened this issue Sep 8, 2011 · 2 comments

Comments

@simonharrer
Copy link

In case of having something modular like a Joomla application, you only want to run php-activerecord for the whole application reusing the models of different components.

My suggestion would be to alter the autoloading to check each model directory for a specific model in means of occurence in the array. Additionally, a method add_model_directory as well as remove_model_directory should be added. the set and get_model_directory methods could stay stable as the set_model_directory delegates to the add method and the get_model_directory only returns the last set directory. This would ensure backwards compatability.

@cvanschalkwijk
Copy link
Collaborator

87f0732 You can try this branch for your issue, set_model_directory will also accept arrays

@simonharrer
Copy link
Author

This looks good. Will this go into the master branch? If so, the documentation of the field and its setter and getter has to be adapted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants