/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->io = new StratumStyle($input, $output); $this->input = $input; $this->output = $output; $configFileName = $input->getArgument('config file'); $settings = $this->readConfigFile($configFileName); $this->sourceDirectory = $this->getSetting($settings, true, 'loader', 'source_directory'); $host = $this->getSetting($settings, true, 'database', 'host'); $user = $this->getSetting($settings, true, 'database', 'user'); $password = $this->getSetting($settings, true, 'database', 'password'); $this->dataSchema = $this->getSetting($settings, true, 'database', 'database'); DataLayer::connect($host, $user, $password, $this->dataSchema); DataLayer::setIo($this->io); $tableList = DataLayer::getTablesNames($this->dataSchema); $this->helper = new QuestionHelper(); $this->printAllTables($tableList); $this->startAsking($tableList); DataLayer::disconnect(); }