1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00
GIST/app/bootstrap.php.d/20-routing.php
Simon Vieille ed37fbf453 Security: user authentication (still buging)
Service: refatoring
Translations
2015-11-23 11:53:24 +01:00

16 lines
387 B
PHP

<?php
use Symfony\Component\Routing\Loader\YamlFileLoader;
$app['routing.file'] = 'routing.yml';
$app['routing.loader'] = $app->share(function ($app) {
return new YamlFileLoader($app['config.locator']);
});
$app['routes'] = $app->extend('routes', function ($routes, $app) {
$routes->addCollection($app['routing.loader']->load($app['routing.file']));
return $routes;
});