Permalink
Browse files

Updated App folder

  • Loading branch information...
1 parent 7bcf1ab commit 2f598d4e35ec611017b3e168ab7082e6d01306c5 @jrbasso committed May 26, 2012
View
@@ -1,5 +1,5 @@
-/app/Config
-/app/tmp
+/App/Config
+/App/tmp
/lib/Cake/Console/Templates/skel/tmp/
/plugins
/vendors
View
@@ -1,5 +1,5 @@
<IfModule mod_rewrite.c>
RewriteEngine on
- RewriteRule ^$ app/webroot/ [L]
- RewriteRule (.*) app/webroot/$1 [L]
-</IfModule>
+ RewriteRule ^$ App/webroot/ [L]
+ RewriteRule (.*) App/webroot/$1 [L]
+</IfModule>
@@ -18,14 +18,16 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config\Schema;
+use Cake\Model\Schema;
/*
*
* Using the Schema command line utility
* cake schema run create DbAcl
*
*/
-class DbAclSchema extends CakeSchema {
+class DbAclSchema extends Schema {
public $name = 'DbAcl';
@@ -18,14 +18,16 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config\Schema;
+use Cake\Model\Schema;
/*
*
* Using the Schema command line utility
* cake schema run create i18n
*
*/
-class i18nSchema extends CakeSchema {
+class i18nSchema extends Schema {
public $name = 'i18n';
@@ -18,14 +18,16 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config\Schema;
+use Cake\Model\Schema;
/*
*
* Using the Schema command line utility
* cake schema run create Sessions
*
*/
-class SessionsSchema extends CakeSchema {
+class SessionsSchema extends Schema {
public $name = 'Sessions';
View
@@ -22,6 +22,13 @@
* @since CakePHP(tm) v 0.10.8.2117
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config;
+use Cake\Core\App,
+ Cake\Core\Configure,
+ Cake\Core\Plugin,
+ Cake\Cache\Cache,
+ Cake\Log\Log,
+ Cake\Utility\Inflector;
/**
* Cache Engine Configuration
@@ -122,11 +129,11 @@
/**
* 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
+ * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
* advanced ways of loading plugins
*
- * CakePlugin::loadAll(); // Loads all plugins at once
- * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
+ * Plugin::loadAll(); // Loads all plugins at once
+ * Plugin::load('DebugKit'); //Loads a single plugin named DebugKit
*
*/
@@ -155,14 +162,13 @@
/**
* Configures default file logging options
*/
-App::uses('CakeLog', 'Log');
-CakeLog::config('debug', array(
- 'engine' => 'FileLog',
+Log::config('debug', array(
+ 'engine' => 'Cake\Log\Engine\FileLog',
'types' => array('notice', 'info', 'debug'),
'file' => 'debug',
));
-CakeLog::config('error', array(
- 'engine' => 'FileLog',
+Log::config('error', array(
+ 'engine' => 'Cake\Log\Engine\FileLog',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'file' => 'error',
));
View
@@ -18,6 +18,9 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config;
+use Cake\Core\Configure,
+ Cake\Cache\Cache;
/**
* CakePHP Debug Level:
@@ -37,7 +40,7 @@
/**
* Configure the Error handler used to handle errors for your application. By default
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
- * and log errors with CakeLog when debug = 0.
+ * and log errors with Cake Log when debug = 0.
*
* Options:
*
@@ -49,7 +52,7 @@
* @see ErrorHandler for more information on error handling and configuration.
*/
Configure::write('Error', array(
- 'handler' => 'ErrorHandler::handleError',
+ 'handler' => 'Cake\Error\ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
@@ -71,12 +74,17 @@
* @see ErrorHandler for more information on exception handling and configuration.
*/
Configure::write('Exception', array(
- 'handler' => 'ErrorHandler::handleException',
- 'renderer' => 'ExceptionRenderer',
+ 'handler' => 'Cake\Error\ErrorHandler::handleException',
+ 'renderer' => 'Cake\Error\ExceptionRenderer',
'log' => true
));
/**
+ * Application namespace
+ */
+ Configure::write('App.namespace', 'App');
+
+/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
@@ -155,7 +163,7 @@
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
* to the ini array.
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
- * sessionids that change frequently. See CakeSession::$requestCountdown.
+ * sessionids that change frequently. See Cake\Model\Datasource\Session::$requestCountdown.
* - `Session.ini` - An associative array of additional ini values to set.
*
* The built in defaults are:
@@ -166,7 +174,7 @@
* - 'cache' - Use the Cache class to save sessions.
*
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
- * Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
+ * Make sure the class implements `Cake\Model\Datasource\Session\SessionHandlerInterface` and set Session.handler to <name>
*
* To use database sessions, run the app/Config/Schema/sessions.php schema using
* the cake shell command: cake schema create Sessions
@@ -18,6 +18,8 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config;
+
/**
* In this file you set up your database connection details.
*
@@ -18,6 +18,8 @@
* @since CakePHP(tm) v 2.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config;
+
/**
* In this file you set up your send email details.
*
@@ -37,7 +39,7 @@
* where 'Your' is the name of the transport.
*
* from =>
- * The origin email. See CakeEmail::from() about the valid values
+ * The origin email. See Cake\Network\Email\Email::from() about the valid values
*
*/
class EmailConfig {
View
@@ -20,22 +20,26 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+namespace App\Config;
+use Cake\Routing\Router,
+ Cake\Core\Plugin;
+
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/View/Pages/home.ctp)...
*/
- Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
+ Router::connect('/', array('controller' => 'Pages', 'action' => 'display', 'home'));
/**
* ...and connect the rest of 'Pages' controller's urls.
*/
- Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
+ Router::connect('/pages/*', array('controller' => 'Pages', 'action' => 'display'));
/**
- * Load all plugin routes. See the CakePlugin documentation on
+ * Load all plugin routes. See the Plugin documentation on
* how to customize the loading of plugin routes.
*/
- CakePlugin::routes();
+ Plugin::routes();
/**
* Load the CakePHP default routes. Remove this if you do not want to use
@@ -19,8 +19,7 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
-App::uses('Controller', 'Controller');
+namespace App\Controller;
/**
* Application Controller
@@ -31,5 +30,5 @@
* @package app.Controller
* @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
*/
-class AppController extends Controller {
+class AppController extends \Cake\Controller\Controller {
}
@@ -18,8 +18,8 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
-App::uses('AppController', 'Controller');
+namespace App\Controller;
+use Cake\Utility\Inflector;
/**
* Static content controller
View
@@ -19,8 +19,8 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
-App::uses('Model', 'Model');
+namespace App\Model;
+use Cake\Model\Model;
/**
* Application model for Cake.
@@ -15,6 +15,9 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+
+use Cake\Core\Configure;
+
?>
<h2><?php echo $name; ?></h2>
<p class="error">
@@ -15,6 +15,9 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+
+use Cake\Core\Configure;
+
?>
<h2><?php echo $name; ?></h2>
<p class="error">
@@ -15,6 +15,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+use Cake\Core\Configure;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
View
@@ -15,10 +15,15 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+use Cake\Core\Configure,
+ Cake\Utility\Debugger,
+ Cake\Cache\Cache,
+ Cake\Model\ConnectionManager,
+ Cake\Utility\Validation,
+ Cake\Error;
if (Configure::read('debug') == 0):
- throw new NotFoundException();
+ throw new Error\NotFoundException();
endif;
-App::uses('Debugger', 'Utility');
?>
<iframe src="http://cakephp.org/bake-banner" width="830" height="160" style="overflow:hidden; border:none;">
<p>For updates and important announcements, visit http://cakefest.org</p>
@@ -37,13 +42,13 @@ endif;
</p>
<p>
<?php
- if (version_compare(PHP_VERSION, '5.2.8', '>=')):
+ if (version_compare(PHP_VERSION, '5.3.3', '>=')):
echo '<span class="notice success">';
- echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.');
+ echo __d('cake_dev', 'Your version of PHP is 5.3.3 or higher.');
echo '</span>';
else:
echo '<span class="notice">';
- echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.');
+ echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.3.3 or higher to use CakePHP.');
echo '</span>';
endif;
?>
@@ -94,7 +99,6 @@ endif;
</p>
<?php
if (isset($filePresent)):
- App::uses('ConnectionManager', 'Model');
try {
$connected = ConnectionManager::getDataSource('default');
} catch (Exception $connectionError) {
@@ -118,7 +122,6 @@ if (isset($filePresent)):
</p>
<?php endif;?>
<?php
- App::uses('Validation', 'Utility');
if (!Validation::alphaNumeric('cakephp')) {
echo '<p><span class="notice">';
echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
View
@@ -38,7 +38,7 @@
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
/**
- * The actual directory name for the "app".
+ * The actual directory name for the "App".
*
*/
if (!defined('APP_DIR')) {
@@ -86,7 +86,10 @@
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
-App::uses('Dispatcher', 'Routing');
+use Cake\Network\Request,
+ Cake\Network\Response,
+ Cake\Routing\Dispatcher,
+ Cake\Core\Configure;
$Dispatcher = new Dispatcher();
-$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
+$Dispatcher->dispatch(new Request(), new Response(array('charset' => Configure::read('App.encoding'))));
View
@@ -83,10 +83,11 @@
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
+use Cake\Core\Configure,
+ Cake\TestSuite\TestSuiteDispatcher;
+
if (Configure::read('debug') < 1) {
die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
}
-require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
-
-CakeTestSuiteDispatcher::run();
+TestSuiteDispatcher::run();
Oops, something went wrong.

0 comments on commit 2f598d4

Please sign in to comment.