* @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(), 'PHPCI', PHPCI_DIR . '/PHPCI/', false); $gen->generateModels(); $gen->generateStores(); } }