2019-10-27 13:35:33 +01:00
|
|
|
<?php
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* This file is part of the SplendidBear Websites' projects.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2019 @ www.splendidbear.org
|
|
|
|
|
*
|
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
|
*/
|
2019-10-27 13:35:33 +01:00
|
|
|
|
|
|
|
|
namespace App\Controller;
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
2019-10-27 13:35:33 +01:00
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
2019-10-27 18:51:03 +01:00
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
2019-10-27 13:35:33 +01:00
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* Class GameController
|
|
|
|
|
*
|
|
|
|
|
* @package App\Controller
|
|
|
|
|
* @author system7 <https://www.splendidbear.org>
|
|
|
|
|
*/
|
|
|
|
|
class GameController extends AbstractController
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is the homepage
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function index(): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Game/index.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is the game itself
|
|
|
|
|
*
|
|
|
|
|
* @param Request $request
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function play(Request $request): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Game/play.html.twig', array(
|
2019-10-27 18:51:03 +01:00
|
|
|
'env' => getenv('APP_ENV'),
|
2019-10-27 13:35:33 +01:00
|
|
|
'ssl' => $request->isSecure() ? 'true' : 'false'
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is the Privacy & Policy
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function privacy(): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Official/privacy.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is the Terms of Use
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function terms(): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Official/terms.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is the contact informations
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function contact(): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Official/contact.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* It is a landing page
|
|
|
|
|
*
|
|
|
|
|
* @return Response
|
|
|
|
|
*/
|
|
|
|
|
public function landing(): Response
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->render('Official/landing.html.twig');
|
|
|
|
|
}
|
|
|
|
|
}
|