This is documentation for Kohana v2.3.x.
Status | Draft |
---|---|
Todo | How config entries merge, Proof read |
Information on retrieving and setting configuration items can be found on the kohana page.
Configuration files contain an array named $config
. Keys of this array are the actual configuration items e.g.
Example
$config['site_domain'] = 'localhost/';
The file structure of config files follows Kohana's file structure.
application > modules > system
Meaning that configuration files in the application directory take precedence over those in modules which take precedence over those in the system directory. The one exception is config.php
which is hardcoded into the application/config
directory and cannot be moved elsewhere.
The file config.php is hardcoded into Kohana, meaning it has to be in the application/config
directory.
/*
* Options:
* site_domain - domain and installation directory
* site_protocol - protocol used to access the site, usually HTTP
* index_page - name of the front controller, can be removed with URL rewriting
* url_suffix - an extension that will be added to all generated URLs
* internal_cache - whether to store file paths and config entries across requests
* output_compression - enable or disable GZIP output compression
* global_xss_filtering - enable or disable XSS attack filtering on all user input
* enable_hooks - enable or disable hooks.
* log_threshold - sets the logging threshold
* log_directory - directory to save logs to
* display_errors - whether to show Kohana error pages or not
* render_stats - render the statistics information in the final page output
* extension_prefix - filename prefix for library extensions
* modules - extra Kohana resource paths,
*/
Sets the cache driver, cache lifetime and garbage collection. For more information see the Cache library.
Sets defaults for captcha images. For more information see the Captcha library.
Sets defaults for cookies. For more information see the Cookie helper.
Validation options for various credit cards.
Sets database connection settings. Multiple configurations are possbile. For more information see the database configuration library.
Sets email sending options. For more information see the Email helper.
Sets encryption options such as key, mode and cipher. For more information see the Encrypt library.
Sets HTTP-EQUIV type meta tags.
Sets the image driver - GD or ImageMagick directory
For more information see the Inflector helper.
Sets the locale and timezone of an application. For more information see the Internationalization page.
Sets the available mime-types. (See the validation/upload page?)
Sets pagination settings. For more information see the Pagination page.
Sets payment settings.
Sets the information the profiler should show. For more information see the Profiler library.
Sets the routes Kohana should use. Includes _default
and _allowed
. For more infromation see the Routing page.
Sets session settings including the session driver. For more information see the Session library.
Sets SQL data types.
Sets upload directory.
Sets available user agents including robots and mobile browsers. For more information see the User Agent library.
Allowed file types (deprecated?)
Information for this topic is located at kohana.