mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing uses() it was deprecated in 1.3. Use App::import() instead.
This commit is contained in:
parent
f50a97bff1
commit
24373ae3c1
3 changed files with 1 additions and 40 deletions
|
@ -25,9 +25,7 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||||
/**
|
/**
|
||||||
* Ensure required classes are available.
|
* Ensure required classes are available.
|
||||||
*/
|
*/
|
||||||
if (!class_exists('File')) {
|
App::import('Core', 'File');
|
||||||
uses('file');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make clean CSS
|
* Make clean CSS
|
||||||
|
|
|
@ -61,24 +61,6 @@
|
||||||
return true;
|
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.
|
* Prints out debug information about given variable.
|
||||||
*
|
*
|
||||||
|
|
|
@ -167,25 +167,6 @@ class BasicsTest extends CakeTestCase {
|
||||||
$_ENV = $__ENV;
|
$_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()
|
* Test h()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue