mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-21 06:01:06 +01:00
29 lines
589 B
PHP
29 lines
589 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Class Minify_Loader
|
||
|
* @package Minify
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Class autoloader
|
||
|
*
|
||
|
* @package Minify
|
||
|
* @author Stephen Clay <steve@mrclay.org>
|
||
|
*/
|
||
|
class Minify_Loader {
|
||
|
public function loadClass($class)
|
||
|
{
|
||
|
$file = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
|
||
|
$file .= strtr($class, "\\_", DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . '.php';
|
||
|
if (is_readable($file)) {
|
||
|
require $file;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static public function register()
|
||
|
{
|
||
|
$inst = new self();
|
||
|
spl_autoload_register(array($inst, 'loadClass'));
|
||
|
}
|
||
|
}
|