Skip to content
Snippets Groups Projects
Select Git revision
  • 2fc5d1f4c04e0ea7b7534d92a7cb9ee6922e1ea3
  • master default protected
2 results

README.md

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;
        }
    }