Hi, I'm fairly new to code igniter and to php (coming from a java background).
I want to create a model that's shared by three apps that may or may not run on the same machine. So I want to keep the model classes portable to be shared by all three and easily handled by SCM systems.
So my thought was to do the following: If I have already broken the applications out into separate directories to share CI: /var/www/app1 /var/www/app1/models /var/www/app1/controllers ... /var/www/app2 /var/www/app3 /var/www/system
then create a shared folder to put the model in:
/var/www/shared/models
Now I could either hack CI to look for the models there, or I could use symlinks, ie /var/www/app1/models -> ../shared/models /var/www/app2/models -> ../shared/models /var/www/app3/models -> ../shared/models
I'm new to the inner workings of PHP, so I'm thinking at minimum this will create a performance hit because the model files may be loaded up to 3 times (maybe 4), or at worse this'll just barf because there's 4 copies of files named the same thing.
Is this a bad idea? Is there a better way to do this?