[Solar-talk] help with new dir structure
Jeff Surgeson
solar at 3hex.com
Mon Mar 10 07:08:04 CDT 2008
Hi All
Have set my dir structure up as proposed, my biggest motivation to do this is
not only is it a better way to do it but to help prevent all the duplication
of code between my website projects.
This is what I have done:
// the individual website webserver document roots
site1/
index.php
Public/
Site1 #ln -s ../../source/site1/Site1/App/Public
Vendor #ln -s ../../source/vendor/Vendor/App/Public
site2/
index.php
Public/
Site2 #ln -s ../../source/site1/Site2/App/Public
Vendor #ln -s ../../source/vendor/Vendor/App/Public
// off webserver doc root
config/
Site1.config.php
Site2.config.php
include/
Site1 #ln -s ../source/site1/Site1
Site2 #ln -s ../source/site2/Site2
Vendor #ln -s ../source/vendor/Vendor
Solar.php #ln -s ../source/solar/Solar.php
Solar #ln -s ../source/solar/Solar
source/
solar/
Solar.php
Solar/
vendor/
Vendor/
App/
Public/
images/ #common images
styles/ #common styles
Base.php #extends Solar_Cont'rl_Page
Base/
Layouts/ #common layout templates
Views/ #common views
Locale/ #common locale files
News.php #extends Vendor_App_Base
News/
site1/
Site1/
App/
Public/
images/ #site specific images
styles/ #site specific style
Base.php #extends Vendor_App_Base
Base/
Main.php #extends Site1_App_Bas
Main/
site2/
Site2/
App/
....etc etc
My problem is this:
If I try and use the Vendor_App_News application class in Site1, as it is
extended from Vendor_App_Base and not Site1_App_Base it loads the
Vendor_App_Base_Layout templates and not Site1_App_Base_Layout templates.
All I am trying to do is prevent duplication of classes and code between
projects on certain common application for example a news application.
My Vendor Base class sets up all basic common layout/style etc and Site1 Base
class then overides and load any site specific layout/style stuff.
Am I barking up the wrong tree trying to do it this way?
Should I expect to have to duplicate some classes?
--
...........::::::...........
Jeff Surgeson / South Africa
More information about the Solar-talk
mailing list