Analyze. Act. Achieve.
Kurinchilion KURINCHILION Analyze. Act. Achieve.

Articles

Zend's Directory Structure

Some factors like host environment setup, multiple projects for single/multiple clients, common helpers, cross-functionality between sites etc. determines how the folder architecture needs to be structured. Zend framework offers this flexibility.

Zend's Default Directory Structure on installation |-- application | |-- Bootstrap.php | |-- configs | | `-- application.ini | |-- controllers | | |-- ErrorController.php | | `-- IndexController.php | |-- models | `-- views | |-- helpers | `-- scripts | |-- error | | `-- error.phtml | `-- index | `-- index.phtml |-- docs |-- library |-- public | |-- .htaccess | `-- index.php `-- tests |-- application | `-- bootstrap.php |-- library | `-- bootstrap.php `-- phpunit.xml

Below is a slight modification of the default architecture where by you can organize separate model-view-controllers for different projects. Other option is to organize project specific files under modules folder.

|-- /sites |-- `-- Bootstrap.php |-- applicationONE | | |-- configs | | `-- application.ini | |-- controllers | | `-- ErrorController.php | | `-- IndexController.php | |-- modules (application specific modules) | |-- models | `-- views | |-- helpers | `-- scripts | |-- error | |-- index |-- library | |-- Zend | |-- Pear (Other libraries) |-- /var/www (public access directory - web root of the server will be set to this directory ) | `-- .htaccess | `-- index.php |-- images |-- scripts |-- css

Refer to Zend's Application Directory Layout for additional information

Zend: OLD Layout Architecture (Deprecated)

Zend: NEW Layout Architecture