summaryrefslogtreecommitdiff
path: root/system/config
diff options
context:
space:
mode:
Diffstat (limited to 'system/config')
-rw-r--r--system/config/cache.php24
-rw-r--r--system/config/cookie.php19
-rw-r--r--system/config/credit_cards.php18
-rw-r--r--system/config/database.php29
-rw-r--r--system/config/encryption.php30
-rw-r--r--system/config/http.php13
-rw-r--r--system/config/image.php13
-rw-r--r--system/config/inflector.php10
-rw-r--r--system/config/locale.php13
-rw-r--r--system/config/log.php24
-rw-r--r--system/config/mimes.php8
-rw-r--r--system/config/profiler.php8
-rw-r--r--system/config/routes.php53
-rw-r--r--system/config/session.php10
-rw-r--r--system/config/sql_types.php14
-rw-r--r--system/config/upload.php9
-rw-r--r--system/config/user_agents.php18
-rw-r--r--system/config/view.php9
18 files changed, 260 insertions, 62 deletions
diff --git a/system/config/cache.php b/system/config/cache.php
index 76af4f6a..6b2f7871 100644
--- a/system/config/cache.php
+++ b/system/config/cache.php
@@ -1,25 +1,31 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Cache
- *
* Cache settings, defined as arrays, or "groups". If no group name is
* used when loading the cache library, the group named "default" will be used.
*
* Each group can be used independently, and multiple groups can be used at once.
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Group Options:
- * driver - Cache backend driver. Kohana comes with file, database, and memcache drivers.
- * > File cache is fast and reliable, but requires many filesystem lookups.
- * > Database cache can be used to cache items remotely, but is slower.
- * > Memcache is very high performance, but prevents cache tags from being used.
*
- * params - Driver parameters, specific to each driver.
+ * - driver - Cache backend driver. Kohana comes with file, database, and memcache drivers.
+ * - File cache is fast and reliable, but requires many filesystem lookups.
+ * - Database cache can be used to cache items remotely, but is slower.
+ * - Memcache is very high performance, but prevents cache tags from being used.
+ *
+ * - params - Driver parameters, specific to each driver.
*
- * lifetime - Default lifetime of caches in seconds. By default caches are stored for
+ * - lifetime - Default lifetime of caches in seconds. By default caches are stored for
* thirty minutes. Specific lifetime can also be set when creating a new cache.
* Setting this to 0 will never automatically delete caches.
*
- * prefix - Adds a prefix to all keys and tags. This can have a severe performance impact.
+ * - prefix - Adds a prefix to all keys and tags. This can have a severe performance impact.
*
*/
$config['default'] = array
diff --git a/system/config/cookie.php b/system/config/cookie.php
index d370ecf0..5340f05d 100644
--- a/system/config/cookie.php
+++ b/system/config/cookie.php
@@ -1,38 +1,55 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
+ * Cookie config settings. These are the default settings used by the [cookie]
+ * helper. You can override these settings by passing parameters to the cookie
+ * helper functions.
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Domain, to restrict the cookie to a specific website domain. For security,
* you are encouraged to set this option. An empty setting allows the cookie
* to be read by any website domain.
+ * @default ''
*/
$config['domain'] = '';
/**
* Restrict cookies to a specific path, typically the installation directory.
+ * @default '/'
*/
$config['path'] = '/';
/**
* Lifetime of the cookie. A setting of 0 makes the cookie active until the
* users browser is closed or the cookie is deleted.
+ * @default = 0
*/
$config['expire'] = 0;
/**
* Enable this option to only allow the cookie to be read when using the a
* secure protocol.
+ * @default FALSE
*/
$config['secure'] = FALSE;
/**
* Enable this option to make the cookie accessible only through the
* HTTP protocol (e.g. no javascript access). This is not supported by all browsers.
+ * @default FALSE
*/
$config['httponly'] = FALSE;
/**
* Cookie salt for signed cookies.
* Make sure you change this to a unique value.
+ *
+ * [!!] Changing this value will invalidate all existing cookies!
+ * @default 'K0hAN4 15 Th3 B357'
*/
$config['salt'] = 'K0hAN4 15 Th3 B357'; \ No newline at end of file
diff --git a/system/config/credit_cards.php b/system/config/credit_cards.php
index bfc98420..46c6afb7 100644
--- a/system/config/credit_cards.php
+++ b/system/config/credit_cards.php
@@ -1,11 +1,21 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Credit card validation configuration.
- *
+ *
* Options for each credit card:
- * length - All the allowed card number lengths, in a comma separated string
- * prefix - The digits the card needs to start with, in regex format
- * luhn - Enable or disable card number validation by the Luhn algorithm
+ *
+ * - length - All the allowed card number lengths, in a comma separated string
+ * - prefix - The digits the card needs to start with, in regex format
+ * - luhn - Enable or disable card number validation by the Luhn algorithm
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
+ * Default credit card configuration
*/
$config = array
(
diff --git a/system/config/database.php b/system/config/database.php
index 36e4614c..dd6bf469 100644
--- a/system/config/database.php
+++ b/system/config/database.php
@@ -1,27 +1,34 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Database
- *
* Database connection settings, defined as arrays, or "groups". If no group
* name is used when loading the database library, the group named "default"
* will be used.
*
* Each group can be connected to independently, and multiple groups can be
- * connected at once.
+ * connected at once. For more information about connecting to a database group
+ * see the [Database] library.
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Group Options:
- * benchmark - Enable or disable database benchmarking
- * persistent - Enable or disable a persistent connection
- * connection - Array of connection specific parameters; alternatively,
+ *
+ * - benchmark - Enable or disable database benchmarking
+ * - persistent - Enable or disable a persistent connection
+ * - connection - Array of connection specific parameters; alternatively,
* you can use a DSN though it is not as fast and certain
* characters could create problems (like an '@' character
* in a password):
* 'connection' => 'mysql://dbuser:secret@localhost/kohana'
- * character_set - Database character set
- * table_prefix - Database table prefix
- * object - Enable or disable object results
- * cache - Enable or disable query caching
- * escape - Enable automatic query builder escaping
+ * - character_set - Database character set
+ * - table_prefix - Database table prefix
+ * - object - Enable or disable object results
+ * - cache - Enable or disable query caching
+ * - escape - Enable automatic query builder escaping
*/
$config['default'] = array
(
diff --git a/system/config/encryption.php b/system/config/encryption.php
index 589a9def..12ff7ae5 100644
--- a/system/config/encryption.php
+++ b/system/config/encryption.php
@@ -1,27 +1,35 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Encrypt
- *
* Encrypt configuration is defined in groups which allows you to easily switch
* between different encryption settings for different uses.
- * Note: all groups inherit and overwrite the default group.
*
+ * [!!] All groups inherit and overwrite the default group.
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Group Options:
- * key - Encryption key used to do encryption and decryption. The default option
+ *
+ * For best security, your encryption key should be at least 16 characters
+ * long and contain letters, numbers, and symbols.
+ *
+ * - key - Encryption key used to do encryption and decryption. The default option
* should never be used for a production website.
*
- * For best security, your encryption key should be at least 16 characters
- * long and contain letters, numbers, and symbols.
- * @note Do not use a hash as your key. This significantly lowers encryption entropy.
+ * [!!] Do not use a hash as your key. This significantly lowers encryption entropy.
*
- * mode - MCrypt encryption mode. By default, MCRYPT_MODE_NOFB is used. This mode
+ * - mode - MCrypt encryption mode. By default, MCRYPT_MODE_NOFB is used. This mode
* offers initialization vector support, is suited to short strings, and
* produces the shortest encrypted output.
- * @see http://php.net/mcrypt
*
- * cipher - MCrypt encryption cipher. By default, the MCRYPT_RIJNDAEL_128 cipher is used.
+ * - cipher - MCrypt encryption cipher. By default, the MCRYPT_RIJNDAEL_128 cipher is used.
* This is also known as 128-bit AES.
- * @see http://php.net/mcrypt
+ *
+ * For more information about mcrypt modes and cipers see the [mcrypt php docs](http://php.net/mcrypt).
*/
$config['default'] = array
(
diff --git a/system/config/http.php b/system/config/http.php
index 3c4a86ac..7cc11dd3 100644
--- a/system/config/http.php
+++ b/system/config/http.php
@@ -1,6 +1,17 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
+/**
+ * HTTP Config
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
-// HTTP-EQUIV type meta tags
+/**
+ * HTTP-EQUIV type meta tags
+ *
+ */
$config['meta_equiv'] = array
(
'cache-control',
diff --git a/system/config/image.php b/system/config/image.php
index e38b7cb2..976315cd 100644
--- a/system/config/image.php
+++ b/system/config/image.php
@@ -1,8 +1,17 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Image
+ * Image library config
*
- * Driver name. Default: GD
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
+ * Image driver
+ *
+ * @default: 'GD'
*/
$config['driver'] = 'GD';
diff --git a/system/config/inflector.php b/system/config/inflector.php
index b6cb8003..70744f56 100644
--- a/system/config/inflector.php
+++ b/system/config/inflector.php
@@ -1,4 +1,14 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
+/**
+ * Inflector Config. Lists of words that are uncountable or irregular.
+ * If you would like to add a word to these lists please open a new issue on the
+ * [issue tracker](http://dev.kohanaphp.com/projects/kohana2/issues)
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
$config['uncountable'] = array
(
diff --git a/system/config/locale.php b/system/config/locale.php
index a62b4c3e..3f73b8f1 100644
--- a/system/config/locale.php
+++ b/system/config/locale.php
@@ -1,7 +1,15 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
+ * Set your default language and timezone here. For more information about
+ * i18n support see the [i18n] library.
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Default language locale name(s).
* First item must be a valid i18n directory name, subsequent items are alternative locales
* for OS's that don't support the first (e.g. Windows). The first valid locale in the array will be used.
@@ -11,7 +19,8 @@ $config['language'] = array('en_US', 'English_United States');
/**
* Locale timezone. Defaults to the timezone you have set in your php config
- * This cannot be left empty, a valid timezone is required!
+ *
+ * [!!] This cannot be left empty, a valid timezone is required!
* @see http://php.net/timezones
*/
$config['timezone'] = ini_get('date.timezone'); \ No newline at end of file
diff --git a/system/config/log.php b/system/config/log.php
index 5be2c41e..3b437771 100644
--- a/system/config/log.php
+++ b/system/config/log.php
@@ -1,7 +1,16 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
+/**
+ * Log Config
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
-
-// Different log levels
+/**
+ * Different log levels
+ */
$config['log_levels'] = array
(
'error' => 1,
@@ -10,10 +19,17 @@ $config['log_levels'] = array
'debug' => 4,
);
-// See different log levels above
+/**
+ * See different log levels above
+ */
$config['log_threshold'] = 1;
+/**
+ * Log Date format
+ */
$config['date_format'] = 'Y-m-d H:i:s P';
-// We can define multiple logging backends at the same time.
+/**
+ * We can define multiple logging backends at the same time.
+ */
$config['drivers'] = array('file'); \ No newline at end of file
diff --git a/system/config/mimes.php b/system/config/mimes.php
index c4318d58..f8f8aaf0 100644
--- a/system/config/mimes.php
+++ b/system/config/mimes.php
@@ -1,14 +1,18 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
- *
* A list of mime types. Our list is generally more complete and accurate than
* the operating system MIME list.
*
* If there are any missing options, please create a ticket on our issue tracker,
* http://dev.kohanaphp.com/projects/kohana2. Be sure to give the filename and
* expected MIME type, as well as any additional information you can provide.
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
*/
+
$config = array
(
'323' => array('text/h323'),
diff --git a/system/config/profiler.php b/system/config/profiler.php
index 90532f07..d30a1b45 100644
--- a/system/config/profiler.php
+++ b/system/config/profiler.php
@@ -1,10 +1,14 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Profiler
- *
* Array of section names to display in the Profiler, TRUE to display all of them.
* Built in sections are benchmarks, database, session, post and cookies, custom sections can be used too.
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
*/
+
$config['show'] = TRUE;
$config['time_decimals'] = 3;
diff --git a/system/config/routes.php b/system/config/routes.php
index c677fde0..fff890c9 100644
--- a/system/config/routes.php
+++ b/system/config/routes.php
@@ -1,7 +1,58 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
+ * ##### Custom Routes
+ * Before changing this file you should copy it to your application/config directory.
*
+ * [!!] Routes will run in the order they are defined. Higher routes will always take precedence over lower ones.
+ *
+ * __Default Route__
+ *
+ * $config['_default'] = 'welcome';
+ *
+ * $config['_default'] specifies the default route. It is used to indicate which controller
+ * should be used when a URI contains no segments. For example, if your web application is at
+ * www.example.com and you visit this address with a web browser, the welcome controller would
+ * be used even though it wasn't specified in the URI. The result would be the same as if the
+ * browser had gone to www.example.com/welcome.
+ *
+ * __Custom Routes__
+ *
+ * In addition to the default route above, you can also specify your own routes. The basic
+ * format for a routing rule is:
+ *
+ * $config['route'] = 'class/method';
+ *
+ * Where *route* is the URI you want to route, and *class/method* would replace it.
+ *
+ * For example, if your Kohana web application was installed at www.example.com and
+ * you had the following routing rule: `$config['test'] = 'foo/bar';`
+ * Browsing to www.example.com/test would be *internally* redirected to www.example.com/foo/bar.
+ *
+ * __Advanced Routes with Regex__
+ *
+ * The route part of a routing rule is actually a regular expression. If you are unfamiliar
+ * with regular expressions you can read more about them at the PHP website. Using regular expressions,
+ * you can be more selective about which URIs will match your routing rules, and you can make use of the
+ * sub-pattern back referencing technique to re-use parts of the URI in it's replacement.
+ *
+ * This is best described with an example. Suppose we wanted to make the URL www.example.com/article/22
+ * work, we might use a routing rule like this:
+ *
+ * $config['article/([0-9]+)'] = 'news/show/$1';
+ *
+ * which would match URIs starting with “article/” followed by some numeric digits. If the URI takes this
+ * form, we will use the news controller and call it's show() method passing in the article number as the
+ * first argument. In the www.example.com/article/22 example, it is as if the URL www.example.com/news/show/22
+ * had been visited.
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+
+/**
* Sets the default route to "welcome"
*/
$config['_default'] = 'welcome';
diff --git a/system/config/session.php b/system/config/session.php
index 29eeafbd..a758305c 100644
--- a/system/config/session.php
+++ b/system/config/session.php
@@ -1,6 +1,14 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Session
+ * Session Config
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
*
* Session driver name.
*/
diff --git a/system/config/sql_types.php b/system/config/sql_types.php
index 43a13c27..6a503290 100644
--- a/system/config/sql_types.php
+++ b/system/config/sql_types.php
@@ -1,10 +1,16 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Database
+ * SQL data types. If there are missing values, please report them
+ * at the [issue tracker](http://dev.kohanaphp.com/projects/kohana2/issues)
*
- * SQL data types. If there are missing values, please report them:
- *
- * @link http://dev.kohanaphp.com/projects/kohana2
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
+ * Database sql types
*/
$config = array
(
diff --git a/system/config/upload.php b/system/config/upload.php
index df26a2d2..833082c5 100644
--- a/system/config/upload.php
+++ b/system/config/upload.php
@@ -1,7 +1,14 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
+ * Upload config
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* This path is relative to your index file. Absolute paths are also supported.
*/
$config['directory'] = DOCROOT.'upload';
diff --git a/system/config/user_agents.php b/system/config/user_agents.php
index c968aebe..2559e85b 100644
--- a/system/config/user_agents.php
+++ b/system/config/user_agents.php
@@ -1,12 +1,16 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
- *
* This file contains four arrays of user agent data. It is used by the
* User Agent library to help identify browser, platform, robot, and
* mobile device data. The array keys are used to identify the device
* and the array values are used to set the actual name of the item.
+ *
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
*/
+
$config['platform'] = array
(
'windows nt 6.0' => 'Windows Vista',
@@ -49,8 +53,10 @@ $config['platform'] = array
'unix' => 'Unknown Unix OS',
);
-// The order of this array should NOT be changed. Many browsers return
-// multiple browser types so we want to identify the sub-type first.
+/**
+ * The order of this array should NOT be changed. Many browsers return
+ * multiple browser types so we want to identify the sub-type first.
+ */
$config['browser'] = array
(
'Opera' => 'Opera',
@@ -98,7 +104,9 @@ $config['mobile'] = array
'android' => 'Android',
);
-// There are hundreds of bots but these are the most common.
+/**
+ * There are hundreds of bots but these are the most common.
+ */
$config['robot'] = array
(
'googlebot' => 'Googlebot',
diff --git a/system/config/view.php b/system/config/view.php
index a77af878..b6a25b17 100644
--- a/system/config/view.php
+++ b/system/config/view.php
@@ -1,7 +1,14 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
- * @package Core
+ * View Config
*
+ * @package Kohana
+ * @author Kohana Team
+ * @copyright (c) 2007-2009 Kohana Team
+ * @license http://kohanaphp.com/license
+ */
+
+/**
* Allowed non-php view types. Most file extensions are supported.
* Do not forget to add a valid MIME type in mimes.php
*/