function schemas_execute() { $params = func_get_arg(0); ConfigHandler::import('root.config'); if (isset($params['config'])) { $conn = Manager::getConnection($params['config']); } else { throw new \Flywheel\Exception('missing "config" config key in user parameter'); } $builder = new BuildSchemas($conn); $builder->_configKey = $params['config']; if (isset($params['help'])) { die($builder->get_help()); } $builder->mod = isset($params['m']) ? $params['m'] : 'preserve'; $builder->tbPrefix = isset($params['prefix']) ? $params['prefix'] : ''; $builder->package = isset($params['pack']) ? $params['pack'] : ''; if (isset($params['table'])) { $builder->setSpecialTbl($params['table']); } if (isset($params['igtbl'])) { $builder->setIgnoreTables($params['igtbl']); } if (isset($params['igprefix'])) { $builder->setIgnoreTablePrefixes($params['igprefix']); } if (isset($params['allow_tbl'])) { $builder->setAllowTables($params['allow_tbl']); } if (isset($params['allow_prefix'])) { $builder->setAllowTablePrefixes($params['allow_prefix']); } $builder->run(); }