2020-11-12 23:01:29 +01:00
|
|
|
<?php
|
|
|
|
use Psr\Http\Message\ResponseInterface as Response;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
|
|
|
use Slim\Factory\AppFactory;
|
|
|
|
use Slim\Views\Twig;
|
|
|
|
use Slim\Views\TwigMiddleware;
|
|
|
|
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
$app = AppFactory::create();
|
|
|
|
$twig = Twig::create('content/themes/fipamo-default-redux', ['cache' => 'cache']);
|
|
|
|
$app->add(TwigMiddleware::create($app, $twig));
|
|
|
|
|
|
|
|
$app->get('/', function (Request $request, Response $response, $args) {
|
|
|
|
|
|
|
|
$view = Twig::fromRequest($request);
|
|
|
|
return $view->render($response, 'index.twig', [
|
|
|
|
'name' => 'Ro',
|
|
|
|
'occupation'=>'That Dude'
|
|
|
|
]);
|
|
|
|
});
|
|
|
|
|
|
|
|
$app->run();
|