Hi,
Personally, i use:
/library
/Zend => Zend Framework
/MyPersonalLibrary
/applications
/application1
/controllers
/forms
/views
/helpers => Helper_View
/layouts
/scripts => Views
/controller1
/controller2
/application2
/...
/config => Config file in XML
/models
/www
/application1 => public_html of application1
/application2 => public_html of application2
....
In my bootstrap (for example : application1), I only have to add :
set_include_path('.'
. PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../../library')
. PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../../models/')
. PATH_SEPARATOR . realpath(dirname(__FILE__) .
'/../../applications/application1/')
. PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../../config/')
. PATH_SEPARATOR . get_include_path());
In that case, you don't have to add any other include paths.
Hope it helps,
Cheers,
Guillaume BABIK
INTERNIM
45, rue Aristide Briand
92300 LEVALLOIS
Tel : 01.40.87.11.20
Fax : 01.47.57.38.87
Mobile : 06.80.21.90.29
http://www.internim.com
-----Message d'origine-----
De : Jason DeBord [mailto:[email protected]]
Envoyé : vendredi 13 février 2009 19:07
À : [email protected]
Objet : [fw-general] Framework directory structure and include paths
Directory Structure
Project
Application
controllers
views
models
layouts
forms
Library
symlink to Zend
public_html
So I set my include path to Project/library so The Framework is
included. I am thinking that it makes sense to put classes for the
database or other "model" type stuff into the models directory and
classes for forms in the "forms" directory.
Questions
1) Does this file structure make sense?
2) How are you guys setting up your directory structures?
3) Is it correct that I will have to add include paths for any
directories I want to put classes in? ( models and forms in my
structure above )
4) I don't want any more include paths than absolutely necessary,
right? So what is the most logical / efficient way to set this up?
Thanks!
Jason DEBORD
Limoges, France