Skip to content
Permalink
Browse files

Removing uses() it was deprecated in 1.3. Use App::import() instead.

  • Loading branch information...
markstory committed Dec 17, 2010
1 parent f50a97b commit 24373ae3c1f2629eaa994c1b793912168a568951
Showing with 1 addition and 40 deletions.
  1. +1 −3 app/webroot/css.php
  2. +0 −18 cake/basics.php
  3. +0 −19 cake/tests/cases/basics.test.php
@@ -25,9 +25,7 @@
/**
* Ensure required classes are available.
*/
if (!class_exists('File')) {
uses('file');
}
App::import('Core', 'File');
/**
* Make clean CSS
@@ -61,24 +61,6 @@ function config() {
return true;
}
/**
* Loads component/components from LIBS. Takes optional number of parameters.
*
* Example:
*
* `uses('flay', 'time');`
*
* @param string $name Filename without the .php part
* @deprecated Will be removed in 2.0
* @link http://book.cakephp.org/view/1140/uses
*/
function uses() {
$args = func_get_args();
foreach ($args as $file) {
require_once(LIBS . strtolower($file) . '.php');
}
}
/**
* Prints out debug information about given variable.
*
@@ -167,25 +167,6 @@ public function testEnv() {
$_ENV = $__ENV;
}
/**
* test uses()
*
* @return void
* @access public
* @deprecated
*/
function testUses() {
$this->skipIf(class_exists('Security') || class_exists('Sanitize'), '%s Security and/or Sanitize class already loaded');
$this->assertFalse(class_exists('Security'));
$this->assertFalse(class_exists('Sanitize'));
uses('Security', 'Sanitize');
$this->assertTrue(class_exists('Security'));
$this->assertTrue(class_exists('Sanitize'));
}
/**
* Test h()
*

0 comments on commit 24373ae

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