pictcode / lib / Cake / Console / Templates / skel / Config / bootstrap.php @ 787484d2
履歴 | 表示 | アノテート | ダウンロード (4.545 KB)
| 1 | 635eef61 | spyder1211 | <?php
 | 
      
|---|---|---|---|
| 2 | /**
 | 
      ||
| 3 |  * This file is loaded automatically by the app/webroot/index.php file after core.php
 | 
      ||
| 4 |  *
 | 
      ||
| 5 |  * This file should load/create any application wide configuration settings, such as
 | 
      ||
| 6 |  * Caching, Logging, loading additional configuration files.
 | 
      ||
| 7 |  *
 | 
      ||
| 8 |  * You should also use this file to include any files that provide global functions/constants
 | 
      ||
| 9 |  * that your application uses.
 | 
      ||
| 10 |  *
 | 
      ||
| 11 |  * @link          http://cakephp.org CakePHP(tm) Project
 | 
      ||
| 12 |  * @package       app.Config
 | 
      ||
| 13 |  * @since         CakePHP(tm) v 0.10.8.2117
 | 
      ||
| 14 |  */
 | 
      ||
| 15 | |||
| 16 | // Setup a 'default' cache configuration for use in the application.
 | 
      ||
| 17 | Cache::config('default', array('engine' => 'File'));  | 
      ||
| 18 | |||
| 19 | /**
 | 
      ||
| 20 |  * The settings below can be used to set additional paths to models, views and controllers.
 | 
      ||
| 21 |  *
 | 
      ||
| 22 |  * App::build(array(
 | 
      ||
| 23 |  *     'Model'                     => array('/path/to/models/', '/next/path/to/models/'),
 | 
      ||
| 24 |  *     'Model/Behavior'            => array('/path/to/behaviors/', '/next/path/to/behaviors/'),
 | 
      ||
| 25 |  *     'Model/Datasource'          => array('/path/to/datasources/', '/next/path/to/datasources/'),
 | 
      ||
| 26 |  *     'Model/Datasource/Database' => array('/path/to/databases/', '/next/path/to/database/'),
 | 
      ||
| 27 |  *     'Model/Datasource/Session'  => array('/path/to/sessions/', '/next/path/to/sessions/'),
 | 
      ||
| 28 |  *     'Controller'                => array('/path/to/controllers/', '/next/path/to/controllers/'),
 | 
      ||
| 29 |  *     'Controller/Component'      => array('/path/to/components/', '/next/path/to/components/'),
 | 
      ||
| 30 |  *     'Controller/Component/Auth' => array('/path/to/auths/', '/next/path/to/auths/'),
 | 
      ||
| 31 |  *     'Controller/Component/Acl'  => array('/path/to/acls/', '/next/path/to/acls/'),
 | 
      ||
| 32 |  *     'View'                      => array('/path/to/views/', '/next/path/to/views/'),
 | 
      ||
| 33 |  *     'View/Helper'               => array('/path/to/helpers/', '/next/path/to/helpers/'),
 | 
      ||
| 34 |  *     'Console'                   => array('/path/to/consoles/', '/next/path/to/consoles/'),
 | 
      ||
| 35 |  *     'Console/Command'           => array('/path/to/commands/', '/next/path/to/commands/'),
 | 
      ||
| 36 |  *     'Console/Command/Task'      => array('/path/to/tasks/', '/next/path/to/tasks/'),
 | 
      ||
| 37 |  *     'Lib'                       => array('/path/to/libs/', '/next/path/to/libs/'),
 | 
      ||
| 38 |  *     'Locale'                    => array('/path/to/locales/', '/next/path/to/locales/'),
 | 
      ||
| 39 |  *     'Vendor'                    => array('/path/to/vendors/', '/next/path/to/vendors/'),
 | 
      ||
| 40 |  *     'Plugin'                    => array('/path/to/plugins/', '/next/path/to/plugins/'),
 | 
      ||
| 41 |  * ));
 | 
      ||
| 42 |  */
 | 
      ||
| 43 | |||
| 44 | /**
 | 
      ||
| 45 |  * Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other
 | 
      ||
| 46 |  * string is passed to the inflection functions
 | 
      ||
| 47 |  *
 | 
      ||
| 48 |  * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
 | 
      ||
| 49 |  * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
 | 
      ||
| 50 |  */
 | 
      ||
| 51 | |||
| 52 | /**
 | 
      ||
| 53 |  * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
 | 
      ||
| 54 |  * Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more
 | 
      ||
| 55 |  * advanced ways of loading plugins
 | 
      ||
| 56 |  *
 | 
      ||
| 57 |  * CakePlugin::loadAll(); // Loads all plugins at once
 | 
      ||
| 58 |  * CakePlugin::load('DebugKit'); // Loads a single plugin named DebugKit
 | 
      ||
| 59 |  */
 | 
      ||
| 60 | |||
| 61 | /**
 | 
      ||
| 62 |  * You can attach event listeners to the request lifecycle as Dispatcher Filter . By default CakePHP bundles two filters:
 | 
      ||
| 63 |  *
 | 
      ||
| 64 |  * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
 | 
      ||
| 65 |  * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
 | 
      ||
| 66 |  *
 | 
      ||
| 67 |  * Feel free to remove or add filters as you see fit for your application. A few examples:
 | 
      ||
| 68 |  *
 | 
      ||
| 69 |  * Configure::write('Dispatcher.filters', array(
 | 
      ||
| 70 |  *                'MyCacheFilter', //  will use MyCacheFilter class from the Routing/Filter package in your app.
 | 
      ||
| 71 |  *                'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
 | 
      ||
| 72 |  *                 array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
 | 
      ||
| 73 |  *                array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
 | 
      ||
| 74 |  *
 | 
      ||
| 75 |  * ));
 | 
      ||
| 76 |  */
 | 
      ||
| 77 | Configure::write('Dispatcher.filters', array(  | 
      ||
| 78 |         'AssetDispatcher',
 | 
      ||
| 79 |         'CacheDispatcher'
 | 
      ||
| 80 | ));  | 
      ||
| 81 | |||
| 82 | /**
 | 
      ||
| 83 |  * Configures default file logging options
 | 
      ||
| 84 |  */
 | 
      ||
| 85 | App::uses('CakeLog', 'Log');  | 
      ||
| 86 | CakeLog::config('debug', array(  | 
      ||
| 87 | 'engine' => 'File',  | 
      ||
| 88 | 'types' => array('notice', 'info', 'debug'),  | 
      ||
| 89 | 'file' => 'debug',  | 
      ||
| 90 | ));  | 
      ||
| 91 | CakeLog::config('error', array(  | 
      ||
| 92 | 'engine' => 'File',  | 
      ||
| 93 | 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),  | 
      ||
| 94 | 'file' => 'error',  | 
      ||
| 95 | ));  |