Skip to content
Permalink
Browse files

Removing core classes using App::import() with an array(). This usage…

… incurs an additional call to App::import().

Removing Set from core class imports, as Set is required as part of the framework bootstrapping.
  • Loading branch information...
markstory committed Nov 22, 2010
1 parent e88cdc8 commit 845edf38e1bf2a09cca314eefa3b8da571211a56
@@ -141,7 +141,7 @@ class CakeSession {
* @param boolean $start Should session be started right now
*/
public static function init($base = null, $start = true) {
App::import('Core', array('Set', 'Security'));
App::import('Core', 'Security');
self::$time = time();
$checkAgent = Configure::read('Session.checkAgent');
@@ -20,7 +20,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('Router', 'Security'), false);
App::import('Core', 'Router', false);
App::import('Core', 'Security', false);
/**
* Authentication control component class
@@ -810,7 +810,7 @@ function _mail() {
* @access private
*/
function _smtp() {
App::import('Core', array('CakeSocket'));
App::import('Core', 'CakeSocket');
$defaults = array(
'host' => 'localhost',
@@ -17,7 +17,8 @@
* @since CakePHP(tm) v 0.10.8.2156
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('String', 'Security'));
App::import('Core', 'String', false);
App::import('Core', 'Security', false);
/**
* SecurityComponent
@@ -24,7 +24,9 @@
/**
* List of helpers to include
*/
App::import('Core', array('Router', 'CakeRequest', 'CakeResponse'), false);
App::import('Core', 'Router', false);
App::import('Core', 'CakeRequest', false);
App::import('Core', 'CakeResponse', false);
App::import('Controller', 'Controller', false);
/**
@@ -17,7 +17,8 @@
* @since CakePHP(tm) v 1.2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('CakeSocket', 'Set', 'Router'));
App::import('Core', 'CakeSocket');
App::import('Core', 'Router');
/**
* Cake network socket connection class.
@@ -21,7 +21,8 @@
/**
* Included libraries.
*/
App::import('Core', array('l10n', 'Multibyte'));
App::import('Core', 'L10n');
App::import('Core', 'Multibyte');
/**
* I18n handles translation of Text and time format strings.
@@ -17,7 +17,8 @@
* @since CakePHP(tm) v 1.2.0.5550
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('Model', 'ConnectionManager'));
App::import('Core', 'Model');
App::import('Core', 'ConnectionManager');
/**
* Base Class for Schema management
@@ -17,7 +17,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('Set', 'String'));
App::import('Core', 'String');
/**
* DboSource
@@ -23,7 +23,9 @@
/**
* Included libs
*/
App::import('Core', array('ClassRegistry', 'Validation', 'Set', 'String'));
App::import('Core', 'ClassRegistry', false);
App::import('Core', 'Validation', false);
App::import('Core', 'String', false);
App::import('Model', 'BehaviorCollection', false);
App::import('Model', 'ModelBehavior', false);
App::import('Model', 'ConnectionManager', false);

0 comments on commit 845edf3

Please sign in to comment.
You can’t perform that action at this time.