/** * * @return array() */ public static function registerUserLibDir($context) { if (ModuleFactory::$_phpLibDir == null) { if (!is_array($context->get("xmlnuke.PHPLIBDIR"))) { throw new InvalidArgumentException('Config "xmlnuke.PHPLIBDIR" requires an associative array'); } ModuleFactory::$_phpLibDir = $context->get("xmlnuke.PHPLIBDIR"); $autoLoad = AutoLoad::getInstance(); foreach (ModuleFactory::$_phpLibDir as $lib => $path) { if (!file_exists($path)) { throw new \Exception("Path {$path} in xmlnuke.PHPLIBDIR was not found"); } $autoLoad->registrUserProject($path); } } return ModuleFactory::$_phpLibDir; }
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: post-check=0, pre-check=0", false); session_cache_limiter("must-revalidate"); header("Content-Type: text/html; charset=utf-8"); define("SESSION_XMLNUKE_AUTHUSER", "SESSION_XMLNUKE_AUTHUSER"); define("SESSION_XMLNUKE_AUTHUSERID", "SESSION_XMLNUKE_AUTHUSERID"); define("SESSION_XMLNUKE_USERCONTEXT", "SESSION_XMLNUKE_USERCONTEXT"); /* This main of engine */ if (!class_exists('config') && !file_exists("config.inc.php")) { die("<b>Fatal error:</b> Could not find required 'config.inc.php'"); } require_once "config.inc.php"; if (!class_exists('config')) { header("Location: check_install.php"); exit; } // Composer Autoload if (file_exists(PHPXMLNUKEDIR . 'src/vendor/autoload.php')) { require PHPXMLNUKEDIR . 'src/vendor/autoload.php'; } if (file_exists(PHPXMLNUKEDIR . '../../../autoload.php')) { require PHPXMLNUKEDIR . '../../../autoload.php'; } // XMLNuke autoload if (!is_readable(PHPXMLNUKEDIR . "src/Xmlnuke/Core/Engine/AutoLoad.php")) { die("<b>Fatal error:</b> Bad Xmlnuke configuration. Check your constant 'PHPXMLNUKEDIR'"); } $autoload = AutoLoad::getInstance(); // Error Handler ErrorHandler::getInstance()->register();