mirror of
https://gitnet.fr/deblan/gist.git
synced 2021-08-14 08:30:49 +02:00
22 lines
480 B
PHP
22 lines
480 B
PHP
<?php
|
|
|
|
use Silex\Provider\TwigServiceProvider;
|
|
|
|
$app->register(new TwigServiceProvider(), array(
|
|
'twig.path' => $app['root_path'].'/src/Gist/Resources/views',
|
|
));
|
|
|
|
$app->extend('twig', function ($twig, $app) {
|
|
$twig->addGlobal('web_path', $app['request']->getBaseUrl().'/');
|
|
|
|
return $twig;
|
|
});
|
|
|
|
$app['geshi'] = function ($app) {
|
|
$geshi = new GeSHi();
|
|
$geshi->enable_classes();
|
|
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
|
|
|
|
return $geshi;
|
|
};
|