Level2.lu/src/app/level2/WebControllerProvider.php

30 lines
505 B
PHP
Raw Normal View History

2015-02-23 11:20:05 +01:00
<?php
namespace level2;
use Silex\Application;
use Silex\ControllerProviderInterface;
class WebControllerProvider implements ControllerProviderInterface {
public function connect ( Application $app ) {
$ctr = $app['controllers_factory'];
$ctr->get('/', function() use ( $app ) {
return $app['twig']->render(
2015-02-23 11:44:12 +01:00
'level2.twig',
array(
'level2State' => Level2::getStatus()
)
2015-02-23 11:20:05 +01:00
);
});
return $ctr;
}
}