Days_Config - Werk met de configuratie van de site.
Hoe te gebruiken
Voorbeeld van gebruik in PHP-code:
// laad standaard configuratie file (default.yaml) en terug naar de
$config = Days_Config::load()->get();
// terug naar de database configuratie
$config = Days_Config::load()->get('db/default');
// laat de specifieke configuratie files en ga terug naar specifieke options.
$config = Days_Config::load('myconfig')->get('engine/brand');
// terug naar opgegeven waarde als de optie niet bestaat
$config = Days_Config::load()->get('engine/brand', 'app');Parameters
Beschikbaar configuratieparameters:
- db - database configuration
- default - name of section (for use many databases in one project)
- adapter - database engine (available: mysql, mssql, pgsql, sqlite)
- host - database host (typically this "localhost")
- username - user for work with database (typycally "root")
- password - sasswork for user
- dbname - databse name in this engine (for example "phpdays")
- engine - engine settings
- debug - collect debug info (1 - enabled, 0 - disabled)
- brand - name of you application name (prefix for model classes)
- log - logging settings
- type - show debug info to: firephp, file, sqlite
- level - show errors only with specified levels (levels joided by "bytes or"). Value 31 - show all errors, and 0 - no show errors
- url - settings for url adress
- lang - default page language (en, ru, fr, ...)
- ext - default page type (html, wml, xml)
- base - delete this part of path from start of string
- virtual - call index action if specified action not exists (1 - enabled, 0 - disabled)
- view - settings for view
- engine - use template engine (available: smarty, dwoo, templum, php - for native php templates)
- cache - settings for cache support
- lifetime - cache data on this time (in seconds)
Configuratie bestand op schriftelijke YAML syntax (see example).