(a2:{{1) (root/)}}|{{index.php}} - {{   (bootstrap)}} [a7]) - {{(start)}} (a3:{{}} > {{   include_once}} [a8]) > {{include_once}} (a4:{{2b) install/}}|{{index.php}}) (a5:)||
(a7: - [a87]) (a8:{{2a) (root/)}}|{{config.php}}) (a9:) (a10:) || 
(a12:) > {{include_once}} (a13:{{3) language/en/}}|{{common.php}}) (a14:) (a15:) || 
(a17:) > {{include_once}} (a18:{{4) include/}}|{{alf.inc.php}}) (a19:) (a20:) || 
(a22:) > {{include_once}} (a23:{{5) include/}}|{{config.inc.php}} > [a48]) - (a24:) > {{include_once}} (a25:{{6) language/XX/}}|{{common.php}}) || 
(a27:) (a28:) > {{include_once}} (a29:{{7) include/core/}}|{{config.XX_SQL.inc.php}}) > {{inc_o}} (a30:{{8) include/core/}}|{{XXsql.inc.php}}) ||
(a32:) (a33:) > {{include_once}} (a34:{{9) include/core/}}|{{tracer.inc.php}}) (a35:) ||
(a37:) (a38:) > {{include_once}} (a39:{{10) include/core/}}|{{functions.inc.php}}) (a40:) ||
(a42:) (a43:) > {{include_once}} (a44:{{11) include/external/}}|{{wcrypt_aes/wcrypt_aes.php}}) (a45:) ||
(a47:) (a48:{{12) include/}}|{{update.inc.php}}) < {{send and recives updates from}} (a49:) > (a50:{{FAR-PHP CMS}}|{{XML Server data}}) || 
(a52:) > {{include_once}} (a53:{{13) include/}}|{{kml.inc.php}} > {{   else include_once}} [a58]) < {{if it alows cache, load cache
with get_file_info() and
show cached page}} (a54:{{}} - [b4]) > (a55:{{14a) admin/cache/}}|{{page_name}}) || (b2:) (b3:) (b4:) > {{(end)}} (b5:{{show page}}) || (a57:) (a58:{{14b) (root/)}}|{{module_controller}} > {{
   include_once}} [a68]) - (a59:) > {{include_once}} (a60:{{15) language/XX/}}|{{module_language}}) || (a62:) (a63:) > {{include_once}} (a64:{{16) include/mod/}}|{{module_class}}) (a65:) || (a67:) (a68:{{17) include/view}}|{{module_viewer}}) (a69:) > {{19a)
get_file_info()}} (a70:{{template/tpl_name/}}|{{tpl_name.php}}) || (a72:) > {{include_once}} (a73:{{18) include/core/}}|{{tplengine.inc.php}}) - (a74:{{}} - [a69,a84]) > {{19b)
get_file_info()}} (a75:{{template/def_tpl/}}|{{default_tpl.php}}) || (a77:) > {{include_once}} (a78:{{21) include/}}|{{url_rewrite.inc.php}}) (a79:) > {{20a)
include_once}} (a80:{{template/tpl_name/}}|{{tpl_usrtpl.inc.php}}) || (a82:) > {{(settings)}} (a83:{{close_db}}) (a84:) > {{20b)
include_once}} (a85:{{template/def_tpl/}}|{{tpl_deftpl.inc.php}}) || (a87:{{}} > {{   (end)}} [a92]) > {{include_once}} (a88:{{22) include/}}|{{set_cache.inc.php}}) - {{if is enabled cache then
save current page to
cache with put_contents()}} (a89:) > (a90:{{23) admin/cache/}}|{{page_name}}) || (a92:{{show_page}}) (a93:) (a94:) (a95:) ||

Legend:

Diagram of files that are included when calling a page in FAR-PHP CMS version 4.x

  1. root/index.php -> It is a bootstrap file type. All other files should be called through this file.
  2. a) install CMS (install/index.php) or if file_exists(config.php)
    b) then include project config file (root/config.php)
  3. load common messages on default language (language/en/common.php) (default language is set on config.php file)
  4. Aplication layer firewall (include/alf.inc.php). This file is first level of protection and filter data from GET, COOKIES and HEADER to prevent hacker attack. (POST variables is filtered on controller modules)
  5. include/config.inc.php - this is framework and CMS settings file On this file is set user language and user template and other internal settings.
  6. language/ro/common.php - after user language is set, is loaded common messages on user language (overwrite messages on default language)
  7. include/core/config.sqlite3.inc.php - this file initiate connection to SQL database and load project settings from database.
  8. include/core/sqlite3.inc.php - this is SQL database Class and is loaded according database type set on config.php file (file 2a)
  9. include/core/tracer.inc.php - this file contains internal functions used for debuging purpose. Function for debugging is called into modules where necessary internal data verification (at the design of module, not its completion)
  10. include/core/functions.inc.php - a series of internal functions used by CMS
  11. include/external/wcrypt_aes/wcrypt_aes.php - this file is an external class used for data encryption on CMS. All files from "external" folder are not developed in the CMS.
  12. include/update.inc.php - this file verify the existence of updates on FAR-PHP CMS servers.
  13. include/kml.inc.php - Kernel Module Loader. This file takes the request sent by browser, check if the page requested exists in the cache, if present, then is loaded and displayed (14a). If no, then check if module required exist on server (level 2 protection against attacks). If the module exists, then the call controller of that module (14b) and take over the results returned from running the module. (If the page is taken from the cache, before posting, the database connection is closed).
    A module consists of several files, the files that contain messages of that module (on the existing language in the current project), working class database (Model from MVC), the file that deals with displaying forms and data from page (Viewer from MVC) and a file in charge of the data control, contains actions that can have that module (Controller from MVC)
  14. root/module_controller - This file contains all possible actions of that module, and takes the action required by the browser. (controller file). Here is filtering data received by POST (level 3 of protection against attacks)
  15. language/ro/module_language - This file contains all messages of that module on user language. If file on user language not exists then is loaded messages on default language.
  16. include/mod/module_class - This file contains a SQL Class for that module (model file). The call to the database is still loaded by the previous class and is used by the current class (see section 7 and 8).
  17. include/view/module_viewer - This file contains a set of functions used for display data on page (viewer file). Theoretically you can deploy smarty templates here.
  18. include/core/tplengine.inc.php - Template engine. This file get the template settings (20) and template layout (19) and generate page from that layout.
  19. If the project contains a set of templates, first is loaded user defined template (19a). If this not exists, then is loaded default template (19b). This file is an html file with {smarty} tags to be replaced with values ​​from the layout settings (20) for the template engine (18).
  20. This is a file with settings for the layout (19). Variables get from module is assigned here to a smarty tag existent on template (19).
  21. After generating the page, next step is to change the links on the page (seo links). Do not forget to restore the original links using htaccess file settings, otherwise pages will not be accessible.
  22. Before sending the page to the browser, if the cache is enabled, the page is saved on cache for later access (23).
  23. Here are the saved pages to further speed (cache).