Private
Public Access
1
0

new: usr: add mineseeker game to the symfony 4 project #3

This commit is contained in:
2019-10-27 13:35:33 +01:00
parent 6caf340302
commit 3bbc96c76c
160 changed files with 49951 additions and 602 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Periodic;
use Gos\Bundle\WebSocketBundle\Periodic\PdoPeriodicPing;
use Gos\Bundle\WebSocketBundle\Periodic\PeriodicInterface;
class MinePeriodic implements PeriodicInterface
{
/** @var PdoPeriodicPing */
private $ping;
public function __construct(PdoPeriodicPing $ping)
{
$this->ping = $ping;
}
/**
* This function is executed every 5 seconds.
*
* For more advanced functionality, try injecting a Topic Service to perform actions on your connections every x seconds.
*/
public function tick()
{
$this->ping->tick();
}
/**
* {@inheritdoc}
*/
public function getTimeout()
{
return 300;
}
}