1 <?php
declare(strict_types
=1);
4 * This file is part of the Rapsys AirBundle package.
6 * (c) Raphaël Gertz <symfony@rapsys.eu>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Rapsys\AirBundle\Command
;
14 use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand
;
15 use Symfony\Component\Console\Input\InputInterface
;
16 use Symfony\Component\Console\Output\OutputInterface
;
18 use Rapsys\AirBundle\Command
;
19 use Rapsys\AirBundle\Entity\Session
;
21 class RekeyCommand
extends DoctrineCommand
{
22 //Set failure constant
25 ///Set success constant
28 ///Configure attribute command
29 protected function configure() {
33 ->setName('rapsysair:rekey')
34 //Set description shown with bin/console list
35 ->setDescription('Rekey sessions')
36 //Set description shown with bin/console --help airlibre:attribute
37 ->setHelp('This command rekey sessions in chronological order');
40 ///Process the attribution
41 protected function execute(InputInterface
$input, OutputInterface
$output): int {
43 $doctrine = $this->getDoctrine();
46 if (!$doctrine->getRepository(Session
::class)->rekey()) {
56 * Return the bundle alias
60 public function getAlias(): string {