6 use mdref\ExceptionHandler
;
11 define("ROOT", dirname(__DIR__
));
12 define("REFS", getenv("REFPATH") ?
: implode(PATH_SEPARATOR
, glob(ROOT
."/refs/*")));
14 ini_set("open_basedir", ROOT
.PATH_SEPARATOR
.REFS
);
16 if (!ini_get("date.timezone")) {
17 date_default_timezone_set("UTC");
20 spl_autoload_register(function($c) {
21 if (!strncmp($c, "mdref\\", 6)) {
22 return require ROOT
. "/" . strtr($c, "\\", "/") . ".php";
26 $response = new Response
;
27 $ehandler = new ExceptionHandler($response);
28 $reference = new Reference(explode(PATH_SEPARATOR
, REFS
));
29 $action = new Action($reference, new Request
, $response, new BaseUrl
);