Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding init script, that I forgot in previous commits
- Loading branch information
Showing
1 changed file
with
84 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
/** | ||
* 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 Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* @link http://cakephp.org CakePHP(tm) Project | ||
* @package app.Config | ||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
|
||
define('DS', DIRECTORY_SEPARATOR); | ||
define('ROOT', dirname(dirname(dirname(__DIR__)))); | ||
define('APP_DIR', 'App'); | ||
define('WEBROOT_DIR', 'webroot'); | ||
define('APP', ROOT . DS . APP_DIR . DS); | ||
define('WWW_ROOT', APP . WEBROOT_DIR . DS); | ||
define('CSS', WWW_ROOT . 'css' . DS); | ||
define('JS', WWW_ROOT . 'js' . DS); | ||
define('IMAGES', WWW_ROOT . 'img' . DS); | ||
define('TESTS', APP . 'Test' . DS); | ||
define('TMP', APP . 'tmp' . DS); | ||
define('LOGS', TMP . 'logs' . DS); | ||
define('CACHE', TMP . 'cache' . DS); | ||
define('IMAGES_URL', 'img/'); | ||
define('CSS_URL', 'css/'); | ||
define('JS_URL', 'js/'); | ||
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); | ||
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); | ||
define('CAKE', CORE_PATH . 'Cake' . DS); | ||
define('FULL_BASE_URL', 'http://localhost'); | ||
define('CORE_TEST_CASES', CAKE . 'Test' . DS . 'TestCase'); | ||
define('LOG_ERROR', LOG_ERR); | ||
|
||
@mkdir(LOGS); | ||
@mkdir(CACHE); | ||
|
||
require CORE_PATH . 'Cake/bootstrap.php'; | ||
|
||
mb_internal_encoding('UTF-8'); | ||
|
||
Cake\Core\Configure::write('debug', 2); | ||
Cake\Core\Configure::write('App', [ | ||
'namespace' => 'App', | ||
'encoding' => 'UTF-8', | ||
'base' => false, | ||
'baseUrl' => false, | ||
'dir' => APP_DIR, | ||
'webroot' => WEBROOT_DIR, | ||
'www_root' => WWW_ROOT, | ||
'fullBaseURL' => 'http://localhost' | ||
]); | ||
|
||
Cake\Core\Configure::write('Cache._cake_core_', [ | ||
'engine' => 'Apc', | ||
'prefix' => 'cake_core_' | ||
]); | ||
|
||
Cake\Core\Configure::write('Datasource.test', [ | ||
'datasource' => 'Cake\Database\Driver\Sqlite' | ||
]); | ||
|
||
Cake\Core\Configure::write('Session', [ | ||
'defaults' => 'php' | ||
]); | ||
|
||
|
||
Cake\Core\Configure::write('Log.debug', [ | ||
'engine' => 'Cake\Log\Engine\FileLog', | ||
'levels' => ['notice', 'info', 'debug'], | ||
'file' => 'debug', | ||
]); | ||
|
||
Cake\Core\Configure::write('Log.error', [ | ||
'engine' => 'Cake\Log\Engine\FileLog', | ||
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], | ||
'file' => 'error', | ||
]); | ||
|
||
$autoloader = new Cake\Core\ClassLoader('TestApp', dirname(__DIR__) . '/Test'); | ||
$autoloader->register(); |