18 spl_autoload_register(
function (
$class) {
19 $file = dirname(__DIR__) .
'/classes/' . strtr(ltrim(
$class,
'\\'),
'_\\',
'//') .
'.php';
20 is_readable($file) && (
require $file);
23 require_once dirname(dirname(__FILE__)) .
'/settings.php';
29 $CONFIG->dataroot = rtrim(
$CONFIG->dataroot, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
34 $handler->handleRequest($_GET, $_SERVER);
if(isset($CONFIG->dataroot)) $handler
if(isset($vars['id'])) $class
elgg require
Throw an error if the required package isn't present.