- $archiveTables = array( );
- foreach ($this->tables as $name => $table ) {
- if ( $table['archive'] == 'true' ) {
+ $archiveTables = array();
+ foreach ($this->tables as $name => $table) {
+ if ($table['archive'] == 'true') {
foreach ($table['foreignKey'] as $fkName => $fkValue) {
if ($this->tables[$fkValue['table']]['archive'] == 'true') {
$table['foreignKey'][$fkName]['table'] = 'archive_' . $table['foreignKey'][$fkName]['table'];
$table['foreignKey'][$fkName]['uniqName'] =
foreach ($table['foreignKey'] as $fkName => $fkValue) {
if ($this->tables[$fkValue['table']]['archive'] == 'true') {
$table['foreignKey'][$fkName]['table'] = 'archive_' . $table['foreignKey'][$fkName]['table'];
$table['foreignKey'][$fkName]['uniqName'] =
foreach (array_keys($tables) as $name) {
$this->resolveForeignKey($tables, $classNames, $name);
}
foreach (array_keys($tables) as $name) {
$this->resolveForeignKey($tables, $classNames, $name);
}
$name = trim((string ) $tableXML->name);
$klass = trim((string ) $tableXML->class);
$base = $this->value('base', $tableXML);
$name = trim((string ) $tableXML->name);
$klass = trim((string ) $tableXML->class);
$base = $this->value('base', $tableXML);
$name = trim((string ) $fieldXML->name);
$field = array('name' => $name, 'localizable' => $fieldXML->localizable);
$type = (string ) $fieldXML->type;
$name = trim((string ) $fieldXML->name);
$field = array('name' => $name, 'localizable' => $fieldXML->localizable);
$type = (string ) $fieldXML->type;
$field['rows'] = isset($fieldXML->html) ? $this->value('rows', $fieldXML->html) : NULL;
$field['cols'] = isset($fieldXML->html) ? $this->value('cols', $fieldXML->html) : NULL;
break;
$field['rows'] = isset($fieldXML->html) ? $this->value('rows', $fieldXML->html) : NULL;
$field['cols'] = isset($fieldXML->html) ? $this->value('cols', $fieldXML->html) : NULL;
break;
$field['html'][$htmlOption] = $this->value($htmlOption, $fieldXML->html);
}
}
}
$field['pseudoconstant'] = $this->value('pseudoconstant', $fieldXML);
$field['html'][$htmlOption] = $this->value($htmlOption, $fieldXML->html);
}
}
}
$field['pseudoconstant'] = $this->value('pseudoconstant', $fieldXML);
//ok this is a bit long-winded but it gets there & is consistent with above approach
$field['pseudoconstant'] = array();
$validOptions = array(
//ok this is a bit long-winded but it gets there & is consistent with above approach
$field['pseudoconstant'] = array();
$validOptions = array(
$names = explode('_', strtolower($name));
$title = '';
for ($i = 0; $i < count($names); $i++) {
$names = explode('_', strtolower($name));
$title = '';
for ($i = 0; $i < count($names); $i++) {
$name = trim((string ) $primaryXML->name);
/** need to make sure there is a field of type name */
if (!array_key_exists($name, $fields)) {
$name = trim((string ) $primaryXML->name);
/** need to make sure there is a field of type name */
if (!array_key_exists($name, $fields)) {
//echo "\n\n*******************************************************\n";
//echo "entering getIndex\n";
$index = array();
// empty index name is fine
//echo "\n\n*******************************************************\n";
//echo "entering getIndex\n";
$index = array();
// empty index name is fine
$index['name'] = $indexName;
$index['field'] = array();
// populate fields
foreach ($indexXML->fieldName as $v) {
$index['name'] = $indexName;
$index['field'] = array();
// populate fields
foreach ($indexXML->fieldName as $v) {
- function getForeignKey(&$foreignXML, &$fields, &$foreignKeys, &$currentTableName) {
+ public function getForeignKey(&$foreignXML, &$fields, &$foreignKeys, &$currentTableName) {
$name = trim((string ) $foreignXML->name);
/** need to make sure there is a field of type name */
if (!array_key_exists($name, $fields)) {
$name = trim((string ) $foreignXML->name);
/** need to make sure there is a field of type name */
if (!array_key_exists($name, $fields)) {
$foreignKey = array(
'idColumn' => trim($foreignXML->idColumn),
'typeColumn' => trim($foreignXML->typeColumn),
$foreignKey = array(
'idColumn' => trim($foreignXML->idColumn),
'typeColumn' => trim($foreignXML->typeColumn),