Created
December 2, 2012 14:54
-
-
Save waterada/4189176 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* このファイルは app/webroot/index.php から自動的に読み込まれ、core.php の後に | |
* 読み込まれます。 | |
* | |
* このファイルはアプリケーション全体の設定を作成する/読み込むのに使ってください。 | |
* 例: キャッシュ、ログ、別の設定ファイルの読み込みなど。 | |
* | |
* また、あなたのアプリケーションで使う、グローバルな関数/定数の定義ファイルを | |
* include するのにもこのファイルを使ってください。 | |
* | |
* PHP 5 | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* | |
* Licensed under The MIT License | |
* ファイルの再配布には上記の著作権表示が必須です。 | |
* | |
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* @link http://cakephp.org CakePHP(tm) Project | |
* @package app.Config | |
* @since CakePHP(tm) v 0.10.8.2117 | |
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
*-------- | |
* This file is loaded automatically by the app/webroot/index.php file after core.php | |
* | |
* 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. | |
* | |
* PHP 5 | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* | |
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* @link http://cakephp.org CakePHP(tm) Project | |
* @package app.Config | |
* @since CakePHP(tm) v 0.10.8.2117 | |
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
*/ | |
/** | |
* キャッシュエンジンの設定。 | |
* デフォルトの設定は以下のとおり。 | |
* | |
* ファイル・ストレージ・エンジン。 | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'File', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'path' => CACHE, //[省略可] システムの tmp ディレクトリを使う。注:絶対パスであること。 | |
* 'prefix' => 'cake_', //[省略可] prefix every cache file with this string | |
* 'lock' => false, //[省略可] ファイル・ロックを使う。 | |
* 'serialize' => true, //[省略可] | |
* 'mask' => 0666, //[省略可] キャッシュ・ファイルを生成した際に使うパーミッション・マスク | |
* )); | |
* | |
* APC (http://pecl.php.net/package/APC) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Apc', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[省略可] この文字列を各キャッシュファイルの接頭辞として使う。 | |
* )); | |
* | |
* Xcache (http://xcache.lighttpd.net/) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Xcache', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[省略可] この文字列を各キャッシュファイルの接頭辞として使う。 | |
* 'user' => 'user', //xcache.admin.user の設定値から user を取得する。 | |
* 'password' => 'password', //平文のパスワード (xcache.admin.pass) | |
* )); | |
* | |
* Memcache (http://memcached.org/) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Memcache', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[省略可] この文字列を各キャッシュファイルの接頭辞として使う。 | |
* 'servers' => array( //[省略可] | |
* '127.0.0.1:11211' // localhost, デフォルトのポートは 11211 | |
* ), | |
* 'persistent' => true, // [省略可] 非持続接続(non-persistent connections)にしたいなら false に設定する。 | |
* 'compress' => false, // [省略可] Memcache のデータを圧縮する(遅くなるがメモリを節約できる) | |
* )); | |
* | |
* Wincache (http://php.net/wincache) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Wincache', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[省略可] この文字列を各キャッシュファイルの接頭辞として使う。 | |
* )); | |
* | |
* Redis (http://http://redis.io/) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Redis', //[必須] | |
* 'duration' => 3600, //[省略可] | |
* 'probability' => 100, //[省略可] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[省略可] prefix every cache file with this string | |
* 'server' => '127.0.0.1', // localhost | |
* 'port' => 6379, // デフォルトのポートは 6379 | |
* 'timeout' => 0, // タイムアウトの秒数。0 は無制限。 | |
* 'persistent' => true, // [省略可] 非持続接続(non-persistent connections)にしたいなら false に設定する。 | |
* )); | |
*-------- | |
* 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 | |
* 'serialize' => true, // [optional] | |
* 'mask' => 0666, // [optional] permission mask to use when creating cache files | |
* )); | |
* | |
* 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 | |
* )); | |
* | |
* Redis (http://http://redis.io/) | |
* | |
* Cache::config('default', array( | |
* 'engine' => 'Redis', //[required] | |
* 'duration'=> 3600, //[optional] | |
* 'probability'=> 100, //[optional] | |
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string | |
* 'server' => '127.0.0.1' // localhost | |
* 'port' => 6379 // default port 6379 | |
* 'timeout' => 0 // timeout in seconds, 0 = unlimited | |
* 'persistent' => true, // [optional] set this to false for non-persistent connections | |
* )); | |
*/ | |
Cache::config('default', array('engine' => 'File')); | |
/** | |
* 下記の設定で、モデル、ビュー、コントローラのパスを追加することができます。 | |
* | |
* App::build(array( | |
* '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'), | |
* )); | |
*-------- | |
* The settings below can be used to set additional paths to models, views and controllers. | |
* | |
* App::build(array( | |
* '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'), | |
* )); | |
* | |
*/ | |
/** | |
* 独自の Inflector ルール。 | |
* テーブル名や、モデル名、コントローラ名、単複形変換関数に渡されるすべての文字列を正しく単数形や複数形に変換するための設定。 | |
* | |
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
* | |
* ※ singular : 単数形 / plural : 複数形 | |
* ※ rules : 語尾変化ルール / irregular : 不規則変化 / uninflected : 語尾変化しない | |
*-------- | |
* 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 | |
* | |
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); | |
* | |
*/ | |
/** | |
* プラグインは手動で読み込む必要があります。1つ1つロードすることも、1回の呼び出しで全部を読み込むこともできます。 | |
* 必要に応じて、以下のどちらかのコメントアウトを解除してください。 | |
* より高度なプラグインの読み込み方法については、CakePlugin のドキュメントを確認してください。 | |
* | |
* CakePlugin::loadAll(); // 一度にすべてのプラグインを読み込む。 | |
* CakePlugin::load('DebugKit'); //DebugKit という名前のプラグイン1個を読み込む。 | |
*-------- | |
* 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 | |
* | |
*/ | |
/** | |
* イベント・リスナーをリクエストのライフサイクルに組み込むことが可能です。CakePHPはデフォルトで2つのフィルターを組み込むます。 | |
* | |
* - AssetDispatcher フィルターは、あなたのテーマとプラグインから資産ファイル(css, images, js 等)を供給します。 | |
* - CacheDispatcher フィルターは、Cache.check の configure の値を読み、コントローラにより作成済みのキャッシュされたコンテンツを供給しようと試みます。 | |
* | |
* あなたのアプリケーションに合わせて、好きなように追加/削除してください。 | |
* 使用例: | |
* | |
* Configure::write('Dispatcher.filters', array( | |
* 'MyCacheFilter', // あなたの app 内の、Routing/Filter パッケージから MyCacheFilter クラスを使います。 | |
* 'MyPlugin.MyFilter', // MyPlugin プラグイン内の、 Routing/Filter パッケージから MyFilter クラスを使います。 | |
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // beforeDispatch で呼び出される、PHP コールバック形式での有効な記述 | |
* array('callable' => $anotherMethod, 'on' => 'after'), // afterDispatch で呼び出される、PHP コールバック形式での有効な記述 | |
* )); | |
*-------- | |
* 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. | |
* 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 | |
* | |
* )); | |
*/ | |
Configure::write('Dispatcher.filters', array( | |
'AssetDispatcher', | |
'CacheDispatcher' | |
)); | |
/** | |
* デフォルトで使われる、ファイルにログを出力する際のオプション。 | |
*-------- | |
* Configures default file logging options | |
*/ | |
App::uses('CakeLog', 'Log'); | |
CakeLog::config('debug', array( | |
'engine' => 'FileLog', | |
'types' => array('notice', 'info', 'debug'), | |
'file' => 'debug', | |
)); | |
CakeLog::config('error', array( | |
'engine' => 'FileLog', | |
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), | |
'file' => 'error', | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment