* @param string $buildVersion
* Which version of the schema to build.
*/
- public function parse($schemaPath, $buildVersion) {
+ public function parse($schemaPath, $buildVersion, $verbose = TRUE) {
$this->buildVersion = $buildVersion;
- echo "Parsing schema description " . $schemaPath . "\n";
+ if ($verbose) {
+ echo "Parsing schema description " . $schemaPath . "\n";
+ }
$dbXML = CRM_Core_CodeGen_Util_Xml::parse($schemaPath);
- echo "Extracting database information\n";
+ if ($verbose) {
+ echo "Extracting database information\n";
+ }
$this->database = &$this->getDatabase($dbXML);
$this->classNames = array();
# TODO: peel DAO-specific stuff out of getTables, and spec reading into its own class
- echo "Extracting table information\n";
+ if ($verbose) {
+ echo "Extracting table information\n";
+ }
$this->tables = $this->getTables($dbXML, $this->database);
$this->resolveForeignKeys($this->tables, $this->classNames);
$this->getPrimaryKey($tableXML->primaryKey, $fields, $table);
}
- // some kind of refresh?
- CRM_Core_Config::singleton(FALSE);
if ($this->value('index', $tableXML)) {
$index = array();
foreach ($tableXML->index as $indexXML) {
$validOptions = array(
'type',
'formatType',
+ 'label',
/* Fixme: prior to CRM-13497 these were in a flat structure
// CRM-13497 moved them to be nested within 'html' but there's no point
// making that change in the DAOs right now since we are in the process of