I am working on implementing Zend Framework within an existing project that has 2 front-ends sites (the company has two sites for two tv chanels) that are administrated by the same backend site. Currently these are poorly organized with two instances of zend framework that duplicate the code of the backend/admin area and duplicate the databases since both site and backend share the data base.
In implementing the Zend Framework, I would like to create be able to split this structure this way: 1 module front-site1, 1 module for front-end site 2 and 1 module for backend/admin site. I need to be able to point each module to the same models since all three modules work on the same database and on the same business objects.
However, I haven’t been able to find any information on how to do this in the documentation. Can anyone help with either a link on how to do this or some simple instructions on how to accomplish it? or to come up with a better structure if i am getting this wrong? What kind of configuration should i setup in ZF to make sure that http://www.site1.com -> module1 (front-end1) and http://www.site2.com -> module2 (front-end2) and both admin.site1 and admin.site2.com point to module3 (admin/backend)
Correct me if i’m wrong, you need to have all “core” and “library” for all models, and 3 different “modules”
1) site1
2) site2
3) admin
If that is correct, you can do the following things.
File Index.PHP Add something like this.
Add all Environments you need and all your sites
File config/application.ini Need to have something like this, with all the rest of the information.
And create the plugin file.
You need to get the module name from the application.ini
then you need to have the folder:
/module/site1
/module/site2
/module/admin
The admin site can access from both site, from the url http://www.site1.com/admin
Example of controller from ADMIN
Example of controller from site1 or site2
I hope this works, do not check, but basically is the idea of what to do. Any question let me know