示例#1
0
 /**
  * Add or import routes into your application.
  *
  *     $routes->import('config/routing.yml');
  *     $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard');
  *
  * @param RouteCollectionBuilder $routes
  */
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     if (isset($_ENV['FORCE_SSL'])) {
         $routes->setSchemes('https');
     }
     $routes->add('/', 'santa.controller:homepage', 'homepage');
     $routes->add('/run', 'santa.controller:run', 'run');
     $routes->add('/finish/{hash}', 'santa.controller:finish', 'finish');
     $routes->add('/auth', 'santa.controller:authenticate', 'authenticate');
     $routes->add('/command', 'santa.controller:command', 'command');
 }
 /**
  * Add or import routes into your application.
  *
  *     $routes->import('config/routing.yml');
  *     $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard');
  *
  * @param RouteCollectionBuilder $routes
  */
 protected function configureRoutes(RouteCollectionBuilder $routes)
 {
     if (isset($_ENV['FORCE_SSL'])) {
         $routes->setSchemes('https');
     }
     if ($this->getEnvironment() === 'dev') {
         $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt');
         $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler');
         $routes->import('@TwigBundle/Resources/config/routing/errors.xml', '/_error');
     }
     $routes->add('/', 'santa.controller:homepage', 'homepage');
     $routes->add('/run', 'santa.controller:run', 'run');
     $routes->add('/finish/{hash}', 'santa.controller:finish', 'finish');
     $routes->add('/summary/{hash}', 'santa.controller:summary', 'summary');
     $routes->add('/retry/{hash}', 'santa.controller:retry', 'retry');
     $routes->add('/auth', 'santa.controller:authenticate', 'authenticate');
 }