Skip to content
Snippets Groups Projects
Select Git revision
  • 3bffbaedec9568a330524ecb629b61fd9c410230
  • main default
  • detached3
  • detached2
  • modernisation-gestion-donnees
  • detached
  • 1.5.0
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.9.10
  • 0.9.9
  • 0.9.8
26 results

InstallCommand.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    InstallCommand.php 949 B
    <?php
    
    namespace Unicaen\BddAdmin\Command;
    
    use Symfony\Component\Console\Command\Command;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;
    use Symfony\Component\Console\Style\SymfonyStyle;
    use Unicaen\BddAdmin\BddAwareTrait;
    use Unicaen\BddAdmin\Data\DataManager;
    use Unicaen\BddAdmin\Ddl\Ddl;
    
    /**
     * Description of InstallBddCommand
     *
     * @author Laurent Lécluse <laurent.lecluse at unicaen.fr>
     */
    class InstallCommand extends Command
    {
        use BddAwareTrait;
    
        protected function configure(): void
        {
            $this->setDescription('Peuple la base de données à partir de la DDL et du jeu de données par défaut');
        }
    
    
    
        protected function execute(InputInterface $input, OutputInterface $output): int
        {
            $io  = new SymfonyStyle($input, $output);
            $bdd = $this->getBdd()->setLogger($io);
    
            $bdd->install();
    
            return Command::SUCCESS;
        }
    }