3 namespace Rapsys\AirBundle\Command
;
5 use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand
;
6 use Symfony\Component\Console\Input\InputInterface
;
7 use Symfony\Component\Console\Output\OutputInterface
;
9 use Rapsys\AirBundle\Entity\Session
;
11 class RekeyCommand
extends DoctrineCommand
{
12 //Set failure constant
15 ///Set success constant
18 ///Configure attribute command
19 protected function configure() {
23 ->setName('rapsysair:rekey')
24 //Set description shown with bin/console list
25 ->setDescription('Rekey sessions')
26 //Set description shown with bin/console --help airlibre:attribute
27 ->setHelp('This command rekey sessions in chronological order');
30 ///Process the attribution
31 protected function execute(InputInterface
$input, OutputInterface
$output): int {
33 $doctrine = $this->getDoctrine();
36 if (!$doctrine->getRepository(Session
::class)->rekey()) {
46 * Return the bundle alias
50 public function getAlias(): string {