-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.php
executable file
·29 lines (26 loc) · 926 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* Main entry point of the system
*
* @author Lindsay Marshall <lindsay.marshall@ncl.ac.uk>
* @copyright 2012-2020 Newcastle University
*/
/**
* See the information at
*
* @link https://catless.ncl.ac.uk/framework/
*/
include 'class/config/framework.php';
\Config\Framework::initialise();
\Config\Config::setup(); // add default headers etc. - anything that the user choses to add to the code.
$local = \Framework\Local::getinstance()->setup(__DIR__, FALSE, TRUE,
['twig', ['templateDir' => 'twigs'/*, 'cache' => 'twigcache'*/]], TRUE); // Not Ajax, developer mode on, renderer, load RB
$context = \Support\Context::getinstance()->setup();
$local->enabledebug(); // turn debugging on
$action = $context->action();
if ($action === '')
{ // default to home if there is nothing
$action = 'home';
}
\Framework\Dispatch::handle($context, $action);
?>