From 01da67eb3e51f25fe14dfff299b111f06d5dfc53 Mon Sep 17 00:00:00 2001 From: Joe Huss Date: Thu, 15 Aug 2019 07:56:34 -0400 Subject: [PATCH] adding Twig initialization --- src/bootstrap.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bootstrap.php b/src/bootstrap.php index 60d1c96e..c7c1137a 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -16,3 +16,13 @@ global $db; $db = new \Workerman\MySQL\Connection($config['db_host'], $config['db_port'], $config['db_name'], $config['db_user'], $config['db_pass']); + +global $twig; +$twigloader = new \Twig_Loader_Filesystem(__DIR__.'/Templates'); +$twig = new \Twig_Environment($twigloader, array('/tmp/twig_cache')); +/* echo $twig->render('views/server/authorize.twig', array( + 'account_lid' => $GLOBALS['tf']->accounts->data['account_lid'], + 'client_id' => $_GET['client_id'], + 'response_type' => $_GET['response_type'], + 'queryString' => $_SERVER['QUERY_STRING'] +)); */ \ No newline at end of file