public function main() { $this->validate(); $this->packageObjectModel = true; $manager = new PropelSqlManager(); $manager->setGeneratorConfig($this->getGeneratorConfig()); $manager->setDataModels($this->getDataModels()); $manager->setWorkingDirectory($this->getOutputDirectory()); $manager->buildSql(); }
/** * @param \PropelSqlManager $manager * @param OutputInterface $output * @param string $connectionName */ protected function doInsertSql(\PropelSqlManager $manager, OutputInterface $output, $connectionName) { try { $statusCode = $manager->insertSql($connectionName); } catch (\Exception $e) { return $this->writeSection($output, array('[Propel] Exception', '', $e), 'fg=white;bg=red'); } if (true === $statusCode) { $this->writeSection($output, '<info>All SQL statements have been generated.</info>', 'bg=black'); } else { $this->writeSection($output, '<comment>No SQL statements found.</comment>', 'bg=black'); } }