| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class Minify_Loader |
| 4 |
* @package Minify |
| 5 |
*/ |
| 6 |
|
| 7 |
/** |
| 8 |
* Class autoloader |
| 9 |
* |
| 10 |
* @package Minify |
| 11 |
* @author Stephen Clay <steve@mrclay.org> |
| 12 |
* |
| 13 |
* @deprecated 2.3 This will be removed in Minify 3.0 |
| 14 |
*/ |
| 15 |
class Minify_Loader { |
| 16 |
public function loadClass($class) |
| 17 |
{ |
| 18 |
$file = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR; |
| 19 |
$file .= strtr($class, "\\_", DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . '.php'; |
| 20 |
if (is_readable($file)) { |
| 21 |
require $file; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* @deprecated 2.3 This will be removed in Minify 3.0 |
| 27 |
*/ |
| 28 |
static public function register() |
| 29 |
{ |
| 30 |
$inst = new self(); |
| 31 |
spl_autoload_register(array($inst, 'loadClass')); |
| 32 |
} |
| 33 |
} |
| 34 |
|