Elgg  Version 1.11
cache_handler.php
Go to the documentation of this file.
1 <?php
17 // we need to load a few Elgg classes, but this is much lighter than /vendor/autoload.php
18 spl_autoload_register(function ($class) {
19  $file = dirname(__DIR__) . '/classes/' . strtr(ltrim($class, '\\'), '_\\', '//') . '.php';
20  is_readable($file) && (require $file);
21 });
22 
23 require_once dirname(dirname(__FILE__)) . '/settings.php';
24 /* @var \stdClass $CONFIG */
25 
26 // dataroot must have trailing slash
27 // @todo need a lib with core functions that have no depedencies
28 if (isset($CONFIG->dataroot)) {
29  $CONFIG->dataroot = rtrim($CONFIG->dataroot, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
30 }
31 
32 $handler = new \Elgg\CacheHandler($CONFIG);
33 
34 $handler->handleRequest($_GET, $_SERVER);
if(isset($CONFIG->dataroot)) $handler
if(isset($vars['id'])) $class
Definition: ajax_loader.php:19
global $CONFIG
elgg require
Throw an error if the required package isn&#39;t present.
Definition: elgglib.js:164