* @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 \b8\Database\CodeGenerator(\b8\Database::getConnection(), 'PHPCI', PHPCI_DIR . '/PHPCI/'); $gen->generateModels(); $gen->generateStores(); } }