Skip to content

Directory structure

sahibalejandro edited this page Sep 17, 2012 · 3 revisions

Here is the description of each folder of a QuarkPHP project.

application/

Your main application folder

application/classes/

Here is where your class scripts need to be saved in order to autoload them when you instantiate new objects, in this way the classes are loaded automatically when you need them, and you don't need to use include or require.
However, you can define new class paths as you want using the $config['class_paths'] variable in your configuration file.

application/config/

Here is where you save your onw config.php file.

application/controllers

Here is where you save all of your controllers class definitions, like HomeController.

application/includes/

Here is where you save your own PHP scripts, then just add the files names in your $config['auto_includes'] array and the framework will include these scripts automatically in the order they was defined in the $config['auto_includes'] array.

application/langs/

Here is where you store your strings language definitions for multilingual websites.
To know more about multilingual websites please read Multilingual Websites documentation.

application/orm/

Here is where you put your ORMs classes definitions for database manipulation.
To know more about databases and ORM please read Database manipulation

application/public/

Here is where you store your public files, like PDFs, ZIPs, uploads, etc. I mean anything the user can access from your website.

application/public/css/

Folowing the application/public/ description, you will put here all your CSS files in order to load correctly when you use QuarkController::includeCssFiles() method.
To know more about include CSS files in your views please read Using CSS & JavaScript resources

application/public/js/

Folowing the application/public/ description, you will put here all your JavaScript files in order to load correctly when you use QuarkController::includeJsFiles() method.
To know more about include JavaScript files in your views please read Using CSS & JavaScript resources.

application/views/

Here is where you put all your views files, in order to load them correctly where you use QuarkController::renderView() method.
To know more about loading views please read Views documentation.

Clone this wiki locally