chg: dev: refactor classes and reformat some layout #3
This commit is contained in:
@@ -90,13 +90,8 @@ header section div.buttons > a {
|
||||
padding: 25px 150px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
border-radius: 20px;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ monolog:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
level: error
|
||||
channels: ["!event"]
|
||||
# uncomment to get logging in your browser
|
||||
# you may have to allow bigger header sizes in your Web server configuration
|
||||
|
||||
@@ -40,24 +40,16 @@ services:
|
||||
arguments:
|
||||
- '@gos_web_socket.pdo.periodic_ping'
|
||||
|
||||
# mineseeker.topic_sample_service:
|
||||
# class: App\Topic\MineseekerTopic
|
||||
# tags:
|
||||
# - { name: gos_web_socket.topic }
|
||||
# arguments:
|
||||
# - "@gos_web_socket.websocket.client_manipulator"
|
||||
# - '@doctrine.orm.entity_manager'
|
||||
# - '@request_stack'
|
||||
# - '@logger'
|
||||
#
|
||||
# mineseeker.rpc_sample_service:
|
||||
# class: App\Rpc\MineseekerRpc
|
||||
# public: true
|
||||
# tags:
|
||||
# - { name: gos_web_socket.rpc }
|
||||
# arguments:
|
||||
# - '@doctrine.orm.entity_manager'
|
||||
# - '@logger'
|
||||
mineseeker.topic_sample_service:
|
||||
class: App\Topic\MineseekerTopic
|
||||
tags:
|
||||
- { name: gos_web_socket.topic }
|
||||
|
||||
mineseeker.rpc_sample_service:
|
||||
class: App\Rpc\MineseekerRpc
|
||||
public: true
|
||||
tags:
|
||||
- { name: gos_web_socket.rpc }
|
||||
|
||||
gos_web_socket_server.client_event.listener:
|
||||
class: App\EventListener\MineseekerClientEventListener
|
||||
|
||||
@@ -1,41 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class GameController extends Controller
|
||||
/**
|
||||
* Class GameController
|
||||
*
|
||||
* @package App\Controller
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*/
|
||||
class GameController extends AbstractController
|
||||
{
|
||||
public function index()
|
||||
/**
|
||||
* It is the homepage
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('Game/index.html.twig');
|
||||
}
|
||||
|
||||
public function play(Request $request)
|
||||
/**
|
||||
* It is the game itself
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function play(Request $request): Response
|
||||
{
|
||||
return $this->render('Game/play.html.twig', array(
|
||||
'env' => $this->container->getParameter('kernel.environment'),
|
||||
'env' => getenv('APP_ENV'),
|
||||
'ssl' => $request->isSecure() ? 'true' : 'false'
|
||||
));
|
||||
}
|
||||
|
||||
public function privacy()
|
||||
/**
|
||||
* It is the Privacy & Policy
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function privacy(): Response
|
||||
{
|
||||
return $this->render('Official/privacy.html.twig');
|
||||
}
|
||||
|
||||
public function terms()
|
||||
/**
|
||||
* It is the Terms of Use
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function terms(): Response
|
||||
{
|
||||
return $this->render('Official/terms.html.twig');
|
||||
}
|
||||
|
||||
public function contact()
|
||||
/**
|
||||
* It is the contact informations
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function contact(): Response
|
||||
{
|
||||
return $this->render('Official/contact.html.twig');
|
||||
}
|
||||
|
||||
public function landing()
|
||||
/**
|
||||
* It is a landing page
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function landing(): Response
|
||||
{
|
||||
return $this->render('Official/landing.html.twig');
|
||||
}
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Gamer
|
||||
*
|
||||
* @package App\Entity
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\GamerRepository")
|
||||
*/
|
||||
class Gamer
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Grid
|
||||
*
|
||||
* @package App\Entity
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\GridRepository")
|
||||
*/
|
||||
class Grid
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class GridRow
|
||||
*
|
||||
* @package App\Entity
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\GridRowRepository")
|
||||
*/
|
||||
class GridRow
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Entity;
|
||||
|
||||
@@ -6,6 +14,11 @@ use App\Application\Sonata\UserBundle\Entity\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class PlayedGame
|
||||
*
|
||||
* @package App\Entity
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\PlayedGameRepository")
|
||||
*/
|
||||
class PlayedGame
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Step
|
||||
*
|
||||
* @package App\Entity
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\StepRepository")
|
||||
*/
|
||||
class Step
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\EventListener;
|
||||
|
||||
@@ -7,6 +15,12 @@ use Gos\Bundle\WebSocketBundle\Event\ClientErrorEvent;
|
||||
use Gos\Bundle\WebSocketBundle\Event\ServerEvent;
|
||||
use Gos\Bundle\WebSocketBundle\Event\ClientRejectedEvent;
|
||||
|
||||
/**
|
||||
* Class MineseekerClientEventListener
|
||||
*
|
||||
* @package App\EventListener
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*/
|
||||
class MineseekerClientEventListener
|
||||
{
|
||||
/**
|
||||
@@ -14,7 +28,7 @@ class MineseekerClientEventListener
|
||||
*
|
||||
* @param ClientEvent $event
|
||||
*/
|
||||
public function onClientConnect(ClientEvent $event)
|
||||
public function onClientConnect(ClientEvent $event): void
|
||||
{
|
||||
$conn = $event->getConnection();
|
||||
|
||||
@@ -26,7 +40,7 @@ class MineseekerClientEventListener
|
||||
*
|
||||
* @param ClientEvent $event
|
||||
*/
|
||||
public function onClientDisconnect(ClientEvent $event)
|
||||
public function onClientDisconnect(ClientEvent $event): void
|
||||
{
|
||||
$conn = $event->getConnection();
|
||||
|
||||
@@ -38,7 +52,7 @@ class MineseekerClientEventListener
|
||||
*
|
||||
* @param ClientErrorEvent $event
|
||||
*/
|
||||
public function onClientError(ClientErrorEvent $event)
|
||||
public function onClientError(ClientErrorEvent $event): void
|
||||
{
|
||||
$conn = $event->getConnection();
|
||||
$e = $event->getException();
|
||||
@@ -51,7 +65,7 @@ class MineseekerClientEventListener
|
||||
*
|
||||
* @param ServerEvent $event
|
||||
*/
|
||||
public function onServerStart(ServerEvent $event)
|
||||
public function onServerStart(ServerEvent $event): void
|
||||
{
|
||||
$event = $event->getEventLoop();
|
||||
|
||||
@@ -63,7 +77,7 @@ class MineseekerClientEventListener
|
||||
*
|
||||
* @param ClientRejectedEvent $event
|
||||
*/
|
||||
public function onClientRejected(ClientRejectedEvent $event)
|
||||
public function onClientRejected(ClientRejectedEvent $event): void
|
||||
{
|
||||
$origin = $event->getOrigin;
|
||||
|
||||
|
||||
@@ -1,15 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Periodic;
|
||||
|
||||
use Gos\Bundle\WebSocketBundle\Periodic\PdoPeriodicPing;
|
||||
use Gos\Bundle\WebSocketBundle\Periodic\PeriodicInterface;
|
||||
|
||||
/**
|
||||
* Class MinePeriodic
|
||||
*
|
||||
* @package App\Periodic
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*/
|
||||
class MinePeriodic implements PeriodicInterface
|
||||
{
|
||||
/** @var PdoPeriodicPing */
|
||||
private $ping;
|
||||
|
||||
/**
|
||||
* MinePeriodic constructor.
|
||||
*
|
||||
* @param PdoPeriodicPing $ping
|
||||
*/
|
||||
public function __construct(PdoPeriodicPing $ping)
|
||||
{
|
||||
$this->ping = $ping;
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Repository;
|
||||
|
||||
@@ -7,13 +15,18 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @method Gamer|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Gamer|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Gamer[] findAll()
|
||||
* @method Gamer[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
* Class GamerRepository
|
||||
*
|
||||
* @package App\Repository
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*/
|
||||
class GamerRepository extends ServiceEntityRepository
|
||||
{
|
||||
/**
|
||||
* GamerRepository constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Gamer::class);
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Repository;
|
||||
|
||||
@@ -7,6 +15,11 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* Class GridRepository
|
||||
*
|
||||
* @package App\Repository
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @method Grid|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Grid|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Grid[] findAll()
|
||||
@@ -14,6 +27,11 @@ use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
*/
|
||||
class GridRepository extends ServiceEntityRepository
|
||||
{
|
||||
/**
|
||||
* GridRepository constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Grid::class);
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Repository;
|
||||
|
||||
@@ -7,6 +15,11 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* Class GridRowRepository
|
||||
*
|
||||
* @package App\Repository
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @method GridRow|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method GridRow|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method GridRow[] findAll()
|
||||
@@ -14,6 +27,11 @@ use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
*/
|
||||
class GridRowRepository extends ServiceEntityRepository
|
||||
{
|
||||
/**
|
||||
* GridRowRepository constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, GridRow::class);
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Repository;
|
||||
|
||||
@@ -7,6 +15,11 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* Class PlayedGameRepository
|
||||
*
|
||||
* @package App\Repository
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @method PlayedGame|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method PlayedGame|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method PlayedGame[] findAll()
|
||||
@@ -14,6 +27,11 @@ use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
*/
|
||||
class PlayedGameRepository extends ServiceEntityRepository
|
||||
{
|
||||
/**
|
||||
* PlayedGameRepository constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, PlayedGame::class);
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 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\Repository;
|
||||
|
||||
@@ -7,6 +15,11 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* Class StepRepository
|
||||
*
|
||||
* @package App\Repository
|
||||
* @author system7 <https://www.splendidbear.org>
|
||||
*
|
||||
* @method Step|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Step|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Step[] findAll()
|
||||
@@ -14,6 +27,11 @@ use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
*/
|
||||
class StepRepository extends ServiceEntityRepository
|
||||
{
|
||||
/**
|
||||
* StepRepository constructor.
|
||||
*
|
||||
* @param ManagerRegistry $registry
|
||||
*/
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Step::class);
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
#}
|
||||
</div>
|
||||
<h3>
|
||||
version {{ version }} · MineSeeker©{{ "now"|date("Y") }} · <a
|
||||
href="http://www.laszlolang.com">www.laszlolang.com</a>
|
||||
version {{ version }} • MineSeeker © {{ "now"|date("Y") }} •
|
||||
<a href="https://www.splendidbear.org">www.splendidbear.org</a>
|
||||
</h3>
|
||||
</div>
|
||||
<img src="{{ asset('images/mine-logo-logo.png') }}" alt="MineSeeker Logo"/>
|
||||
@@ -79,11 +79,11 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ path('MineSeekerBundle_homepage') }}">Homepage</a></li>
|
||||
<li>·</li>
|
||||
<li>•</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_terms') }}">Terms of Use</a></li>
|
||||
<li>·</li>
|
||||
<li>•</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_privacy') }}">Privacy Policy</a></li>
|
||||
<li>·</li>
|
||||
<li>•</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_contact') }}">Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user