Select Git revision
InstallCommand.php
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;
}
}