Configuration files (translate in progress)
When you create a new project, the builder creates 3 configuration files connexion.ini.php, site.ini.php and routing.phpWe explain in this page every variable
File connexion.ini.php
It contains every connection profilSection [db]
Introduction
[db]
myProfilName.dsn="dsnConnectionString"
myProfilName.sgbd=sgbdDriverType
myProfilName.hostname=server
myProfilName.database=database
myProfilName.username=unserName
myProfilName.password=Password
Variable myProfilName.dsn
When you use a pdo sbgbd type: pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_mssql,pdo_oracle, you need to fill a dns connection stringMore information about: http://php.net/manual/fr/pdo.construct.php
Variable myProfilName.sgbd
Sgbd driver type to use, it is the name of the class to user:For pdo: pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_mssql,pdo_oracle
For no pdo: mysql,csv,xml
Variable myProfilName.database
Database name (only needed for drivers no pdo)Variable myProfilName.hostname
Database server name (only needed for drivers no pdo)Variable myProfilName.username
Username of the connectionVariable myProfilName.password
Password of the connectionFile site.ini.php
Contains majority of your website configurationSection [cache]
introduction
[cache]
enabled=0
lifetime= (0*3600)
autoload.enabled=0
Variable enabled
You can enable/disable the cache for all your websiteVariable lifetime
Defined validity lifetime of your cache pages (in seconds)Variable autoload.enabled
Enable/disable generation of the autoloader cache (to gain perfomance when you deliver in production environment)If disable, when you call a new class, the autoloader read the class name, analyze it and find the directory where is the class file.
If enable, framework make an associative array that contains all class with their filename adress.
Section [encodage]
Introduction
Configure then charset used by the framework, for information, variables $_GET,$_POST are converted in HTML with this parameter
[encodage]
;default charset, used by plugin_html::encode($text)
charset=ISO-8859-1
Variable charset
Charset usedSection [language]
Introduction
[language]
;fr / en... //sLangue
default=fr
allow=fr,en
Variable default
Default language (when you use i18n plugin)Section [auth]
Introduction
[auth]
;note : >= php5.2 dans le php.ini
session.use_cookies = 1
session.use_only_cookies = 1
session.cookie_httponly=1
session.cookie_secure=0
session.cookie_domain=
session.cookie_path=
session.cookie_lifetime=
enabled=0
class=plugin_auth
module=auth::login
session.timeout.enabled=1
session.timeout.lifetime=(60*1)
Variable session.use_cookies
Enable the use of session cookies despite a GET parameter in URLVariable session.cookie_httponly
Used when the framework create the cookie: indicate if the cookie is readable only on the server side with php and not on the client side with javascript (for security enable it)Variable session.cookie_secure
Indicate if the cookie is only available with a https connection (enable it if your website use https)Variable session.cookie_domain
The domain contraint, more information there: http://php.net/manual/fr/function.session-set-cookie-params.phpVariable session.cookie_path
Path contraint, more information there: http://php.net/manual/fr/function.session-set-cookie-params.phpVariable session.use_only_cookies
If enable, use only session cookie to manage sessionVariable enabled
Enable/disable the private access for your websiteVariable class
Plugin to use for private accessVariable module
Module to use for autenticate: if the user is not log in, he will be redirect to this couple module/actionVariable session.timeout.enabled
Enable/disable the use of a lifetime for your sessionVariable session.timeout.lifetime
Lifetime between two clis on your website (in seconds)Section [acl]
Introduction
[acl]
class=plugin_gestionuser
Variable class
Plugin class used to managed permissions, call by _root::getACL()More information about there http://mkdevs.com/tutoriaux_en.html#acl
Section [navigation]
Introduction
[navigation]
scriptname=index.php
var=:nav
module.default=pages
action.default=accueil
layout.erreur=site/layout/erreurprod.php
Variable scriptname
Filename of the front php file, index.php by defaultVariable var
Variable name used for validation ":nav" by default , exple index.php?:nav=article::list, but you can replace by "page", it will transform to index.php?page=article::listVariable module.default
Default module, if there are no navigation variable definedVariable action.default
Default action, if there are no navigation variable definedVariable layout.erreur
Layout used when the framework display an error, if the "mode" variable is different to "dev" (see file conf/mode.ini.php)Section [urlrewriting]
Introduction
[urlrewriting]
enabled=0
class=plugin_routing
conf=../conf/routing.php
Variable enabled
Enable/disable url-rewritingVariable class
Plugin class used to manage url-rewriting, plugin_routing by defaultVariable conf
File where is configured routing rules for url-rewritingSection [security]
Introduction
[security]
;XSRF ou CSRF,bSecuriteXSRF utilisation de jeton dans le CRUD, plus d'infos: http://fr.wikipedia.org/wiki/Cross-Site_Request_Forgeries
;XSS, bSecuriteXSS protection des variables GET,POST... via getParam( , plus d'infos http://fr.wikipedia.org/wiki/XSS
xsrf.enabled=1
xsrf.timeout.lifetime=360
xsrf.checkReferer.enabled=1
xss.enabled=1
xsrf.session.enabled=0
Variable xsrf.enabled
Not used for moment, to use xsrf, used plugin_xsrf (cf tutorial)Variable xsrf.timeout.lifetime
Lifetime of a token (time you have to fill and submit an form)Variable xsrf.checkReferer.enabled
Enable/disable the url refferer checkVariable xsrf.session.enabled
Enable plugin xsrf to use session to increase securityVariable xss.enabled
Enable/disable xss security by a HTML translate by the method _root::getParam()Section [log]
Introduction
[log]
class=plugin_log
application=0
warning=0
error=0
information=0
Variable class
Classe à utiliser pour loguer dans l'applicationVariable application
Indique si le log de l'application est activé ou nonVariable warning
Indique si le log de niveau "warning" de l'application est activé ou nonVariable error
Indique si le log de niveau "error" de l'application est activé ou nonVariable information
Indique si le log de niveau "information" de l'application est activé ou non (choix d'un module/action à charger, appel d'une requête sql...)Section [check]
Introduction
[check]
class=plugin_check
Variable class
Indique le nom de la classe à utiliser lors des vérification coté modèle (champ non vide, numérique)Section [site]
Introduction
[site]
;Redirection
;header : header('location:$url ')
;http: <html><head><META http-equiv="refresh" content="0; URL=$url ></head></html>
redirection.default=header
timezone=Europe/Paris
Variable redirection.default
Indique le type de redirection à utiliser: header ou httpVariable timezone
Indique le décalage horaire par défaut de toutes les fonctions date/heurePlus d'infos ici: http://php.net/manual/fr/function.date-default-timezone-set.php
Section [path]
[path]
lib=../../../../lib/framework/
data=../data/
upload=../data/upload/
log=../data/log/
img=../data/img/
i18n=../data/i18n/
cache=../data/cache/
conf=../conf/
module=../module/
plugin=../plugin/
model=../model/
layout=../layout/
view=view/
Section [model]
Introduction
[model]
ini.var=db
Variable ini.var
Indique le nom de la section où trouver les profils de connexionFichier mode.ini.php
Section [site]
Introduction
[site]
mode=dev