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(
|
2015-02-23 13:42:38 +01:00
|
|
|
'level2' => Level2::getStatus()
|
2015-02-23 11:44:12 +01:00
|
|
|
)
|
2015-02-23 11:20:05 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return $ctr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|