diff --git a/composer.json b/composer.json index 944e58b..df0a9db 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,9 @@ { "require": { "silex/silex": "~1.1", - "atoum/atoum" : "dev-master" + "atoum/atoum" : "dev-master", + "twig/twig": ">=1.8,<2.0-dev", + "symfony/twig-bridge": "~2.3" }, "autoload": { "psr-0": { "Poche": "src/" } diff --git a/src/app.php b/src/app.php index b3d9bbc..49acacf 100644 --- a/src/app.php +++ b/src/app.php @@ -1 +1,5 @@ register(new Silex\Provider\TwigServiceProvider(), array( + 'twig.path' => __DIR__.'/views', +)); diff --git a/src/controllers.php b/src/controllers.php index 8b13789..04e9378 100644 --- a/src/controllers.php +++ b/src/controllers.php @@ -1 +1,5 @@ +get('/', function () use ($app) { + return $app['twig']->render('index.twig'); +}); diff --git a/src/views/index.twig b/src/views/index.twig new file mode 100644 index 0000000..0b0e0df --- /dev/null +++ b/src/views/index.twig @@ -0,0 +1 @@ +Poche v2