* @author William DURAND */ class BuildModelCommand extends PhingCommand { /** * @see Command */ protected function configure() { $this ->setDescription('Build the Propel Object Model classes based on XML schemas') ->setHelp(<<propel:build-model command builds the Propel runtime model classes (ActiveRecord, Query, Peer, and TableMap classes) based on the XML schemas defined in all Bundles. php app/console propel:build-model EOT ) ->setName('propel:build-model') ; } /** * @see Command * * @throws \InvalidArgumentException When the target directory does not exist */ protected function execute(InputInterface $input, OutputInterface $output) { $this->callPhing('om'); foreach ($this->tempSchemas as $schemaFile => $schemaDetails) { $output->writeln(sprintf('Built Model classes for bundle %s from %s.', $schemaDetails['bundle'], $schemaDetails['path'])); } } }