forked from tomoff/llama-kisses
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (21 loc) · 752 Bytes
/
index.php
File metadata and controls
27 lines (21 loc) · 752 Bytes
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
<?php
session_start();
error_reporting( E_ALL ^ E_NOTICE );
require_once 'vendor/autoload.php';
require_once 'scripts/seeds.php';
use Monolog\Logger;
use LlamaKisses\ClassLoader\ApplicationLoader;
$log = new Logger( 'LLAMA_KISSES::MAIN' );
$link = create_database( $log );
seed_database( $log, $link );
mysqli_close( $link );
$twigLoader = new Twig_Loader_Filesystem( 'src/Paymill/LlamaKisses/Views/' );
$twig = new Twig_Environment( $twigLoader, array( 'cache' => 'cache', 'debug' => true ) );
// create the controller and execute the action
$appLoader = new ApplicationLoader( $_GET );
$controller = $appLoader->CreateController( $twig );
if( is_string( $controller ) == false ) {
$controller->ExecuteAction();
} else {
echo $controller;
}