2006-02-25 04:42:31 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2011-03-12 17:18:21 +00:00
|
|
|
* This file is loaded automatically by the app/webroot/index.php file after core.php
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
2011-03-12 17:18:21 +00:00
|
|
|
* This file should load/create any application wide configuration settings, such as
|
|
|
|
* Caching, Logging, loading additional configuration files.
|
|
|
|
*
|
|
|
|
* You should also use this file to include any files that provide global functions/constants
|
|
|
|
* that your application uses.
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
2010-10-03 16:38:58 +00:00
|
|
|
* PHP 5
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
2009-05-01 17:03:30 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2012-03-13 02:46:46 +00:00
|
|
|
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
2012-03-13 02:46:46 +00:00
|
|
|
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2009-05-01 17:03:30 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
2011-10-14 19:06:36 +00:00
|
|
|
* @package app.Config
|
2008-10-30 17:30:26 +00:00
|
|
|
* @since CakePHP(tm) v 0.10.8.2117
|
2009-11-06 06:51:51 +00:00
|
|
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
2006-02-25 04:42:31 +00:00
|
|
|
*/
|
2009-07-25 22:17:27 +00:00
|
|
|
|
2012-01-17 07:58:22 +00:00
|
|
|
/**
|
|
|
|
* Cache Engine Configuration
|
|
|
|
* Default settings provided below
|
|
|
|
*
|
|
|
|
* File storage engine.
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'File', //[required]
|
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
|
|
|
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
|
|
|
* 'lock' => false, //[optional] use file locking
|
2012-02-01 19:14:56 +00:00
|
|
|
* 'serialize' => true, // [optional]
|
2012-02-01 19:12:34 +00:00
|
|
|
* 'mask' => 0666, // [optional] permission mask to use when creating cache files
|
2012-01-17 07:58:22 +00:00
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* APC (http://pecl.php.net/package/APC)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Apc', //[required]
|
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Xcache (http://xcache.lighttpd.net/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Xcache', //[required]
|
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'user' => 'user', //user from xcache.admin.user settings
|
|
|
|
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Memcache (http://memcached.org/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Memcache', //[required]
|
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'servers' => array(
|
|
|
|
* '127.0.0.1:11211' // localhost, default port 11211
|
|
|
|
* ), //[optional]
|
|
|
|
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
|
|
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Wincache (http://php.net/wincache)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Wincache', //[required]
|
|
|
|
* 'duration'=> 3600, //[optional]
|
|
|
|
* 'probability'=> 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* ));
|
|
|
|
*/
|
2011-03-12 17:18:21 +00:00
|
|
|
Cache::config('default', array('engine' => 'File'));
|
|
|
|
|
2006-02-25 04:42:31 +00:00
|
|
|
/**
|
2009-05-01 17:03:30 +00:00
|
|
|
* The settings below can be used to set additional paths to models, views and controllers.
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
2009-07-25 22:17:27 +00:00
|
|
|
* App::build(array(
|
2012-04-23 04:16:00 +00:00
|
|
|
* 'Model' => array('/path/to/models', '/next/path/to/models'),
|
|
|
|
* 'Model/Behavior' => array('/path/to/behaviors', '/next/path/to/behaviors'),
|
|
|
|
* 'Model/Datasource' => array('/path/to/datasources', '/next/path/to/datasources'),
|
|
|
|
* 'Model/Datasource/Database' => array('/path/to/databases', '/next/path/to/database'),
|
|
|
|
* 'Model/Datasource/Session' => array('/path/to/sessions', '/next/path/to/sessions'),
|
|
|
|
* 'Controller' => array('/path/to/controllers', '/next/path/to/controllers'),
|
|
|
|
* 'Controller/Component' => array('/path/to/components', '/next/path/to/components'),
|
|
|
|
* 'Controller/Component/Auth' => array('/path/to/auths', '/next/path/to/auths'),
|
|
|
|
* 'Controller/Component/Acl' => array('/path/to/acls', '/next/path/to/acls'),
|
|
|
|
* 'View' => array('/path/to/views', '/next/path/to/views'),
|
|
|
|
* 'View/Helper' => array('/path/to/helpers', '/next/path/to/helpers'),
|
|
|
|
* 'Console' => array('/path/to/consoles', '/next/path/to/consoles'),
|
|
|
|
* 'Console/Command' => array('/path/to/commands', '/next/path/to/commands'),
|
|
|
|
* 'Console/Command/Task' => array('/path/to/tasks', '/next/path/to/tasks'),
|
|
|
|
* 'Lib' => array('/path/to/libs', '/next/path/to/libs'),
|
|
|
|
* 'Locale' => array('/path/to/locales', '/next/path/to/locales'),
|
|
|
|
* 'Vendor' => array('/path/to/vendors', '/next/path/to/vendors'),
|
|
|
|
* 'Plugin' => array('/path/to/plugins', '/next/path/to/plugins'),
|
2009-07-25 22:17:27 +00:00
|
|
|
* ));
|
2006-02-25 04:42:31 +00:00
|
|
|
*
|
|
|
|
*/
|
2009-07-25 22:17:27 +00:00
|
|
|
|
2006-03-19 03:26:43 +00:00
|
|
|
/**
|
2011-07-07 07:04:22 +00:00
|
|
|
* Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
|
|
|
|
* string is passed to the inflection functions
|
2006-03-19 03:26:43 +00:00
|
|
|
*
|
2009-08-02 01:13:37 +00:00
|
|
|
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
|
|
|
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
2006-03-19 03:26:43 +00:00
|
|
|
*
|
|
|
|
*/
|
2011-07-07 07:04:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
|
|
|
|
* Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more
|
|
|
|
* advanced ways of loading plugins
|
|
|
|
*
|
|
|
|
* CakePlugin::loadAll(); // Loads all plugins at once
|
|
|
|
* CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
|
|
|
|
*
|
2011-09-21 00:16:06 +00:00
|
|
|
*/
|
2012-04-17 05:12:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
|
|
|
|
*
|
|
|
|
* - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
|
|
|
|
* - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
|
|
|
|
*
|
|
|
|
* Feel free to remove or add filters as you see fit for your application. A few examples:
|
|
|
|
*
|
|
|
|
* Configure::write('Dispatcher.filters', array(
|
|
|
|
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
|
|
|
|
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
|
2012-04-22 21:37:43 +00:00
|
|
|
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
|
|
|
|
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
|
2012-04-17 05:12:18 +00:00
|
|
|
*
|
|
|
|
* ));
|
|
|
|
*/
|
|
|
|
Configure::write('Dispatcher.filters', array(
|
|
|
|
'AssetDispatcher',
|
|
|
|
'CacheDispatcher'
|
|
|
|
));
|
2012-05-09 05:05:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Configures default file logging options
|
|
|
|
*/
|
2012-05-11 09:15:15 +00:00
|
|
|
App::uses('CakeLog', 'Log');
|
2012-05-09 05:05:06 +00:00
|
|
|
CakeLog::config('debug', array(
|
|
|
|
'engine' => 'FileLog',
|
|
|
|
'types' => array('notice', 'info', 'debug'),
|
|
|
|
'file' => 'debug',
|
|
|
|
));
|
|
|
|
CakeLog::config('error', array(
|
|
|
|
'engine' => 'FileLog',
|
2012-05-11 11:31:55 +00:00
|
|
|
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
|
2012-05-09 05:05:06 +00:00
|
|
|
'file' => 'error',
|
|
|
|
));
|