* @package PHPCI * @subpackage Console */ class GenerateCommand extends Command { protected function configure() { $this ->setName('phpci:generate') ->setDescription('Generate models and stores from the database.'); } /** * Generates Model and Store classes by reading database meta data. */ protected function execute(InputInterface $input, OutputInterface $output) { $gen = new CodeGenerator( Database::getConnection(), array('default' => 'PHPCI'), array('default' => PHPCI_DIR), false ); $gen->generateModels(); $gen->generateStores(); } }