-
Fabien Potencier authored
Usage: use Silex\Application; use Silex\Extension\TwigExtension; require_once __DIR__.'/silex.phar'; $app = new Application(); $templates = array( 'hello' => 'Hello {{ name }}', ); $app->register(new TwigExtension(), array( 'twig.templates' => $templates, 'twig.class_path' => '/path/to//Twig/lib', )); $app->get('/{name}', function($name) use ($app) { return $app['twig']->render('hello', array('name' => $name)); }); $app->run();
737d4f0f