Private
Public Access
1
0
Files
MineSeeker/src/Controller/GameController.php

70 lines
1.8 KiB
PHP
Raw Normal View History

<?php declare(strict_types=1);
/**
* 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.
*/
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
/**
* Class GameController
*
* @package App\Controller
* @author Lang <https://www.splendidbear.org>
* @category Class
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
* @link www.splendidbear.org
* @since 2026. 04. 09.
*/
class GameController extends AbstractController
{
public function __construct(
#[Autowire(env: 'APP_ENV')]
private readonly string $env,
private readonly RequestStack $request,
) {
}
public function index(): Response
{
return $this->render('Game/index.html.twig');
}
public function play(): Response
{
return $this->render('Game/play.html.twig', [
'env' => $this->env,
'ssl' => $this->request->getCurrentRequest()->isSecure() ? 'true' : 'false',
]);
}
public function privacy(): Response
{
return $this->render('Official/privacy.html.twig');
}
public function terms(): Response
{
return $this->render('Official/terms.html.twig');
}
public function contact(): Response
{
return $this->render('Official/contact.html.twig');
}
public function landing(): Response
{
return $this->render('Official/landing.html.twig');
}
}