Class DatabaseSchemaGeneratorConfig

Description

Config class for DatabaseSchemaGenerator.

It abstracts the implementation of configuration specification, as well as makes it easy for the DatabaseSchemaGenerator to perform different actions based on the user's configuration.

  • author: Anthony Bush

Located in /schema_generator/database/DatabaseSchemaGeneratorConfig.class.php (line 13)

CoughConfig
   |
   --DatabaseSchemaGeneratorConfig
Method Summary
static void constructFromFile ( $filePath)
void getDsn ()
array getIdToTableRegex ( $table)
void getPrimaryKeyOverride ( $dbName,  $tableName)
void getTableNamePrefixes ( $database)
void initConfig ()
boolean shouldProcessDatabase (string $dbName)
boolean shouldProcessTable ( $dbName, string $tableName)
boolean shouldScanForJoin ( $sourceTable,  $refDatabase)
Variables

Inherited Variables

Inherited from CoughConfig

CoughConfig::$config
Methods
static method constructFromFile (line 15)
  • access: public
static void constructFromFile ( $filePath)
  • $filePath
getDsn (line 82)
  • access: public
void getDsn ()
getIdToTableRegex (line 93)

Returns an array of regexes to match against in order to determine if a field can be mapped to a table name, in order of precedence.

  • author: Anthony Bush
  • access: public
array getIdToTableRegex ( $table)
getPrimaryKeyOverride (line 183)
  • access: public
void getPrimaryKeyOverride ( $dbName,  $tableName)
  • $dbName
  • $tableName
getTableNamePrefixes (line 104)
  • access: public
void getTableNamePrefixes ( $database)
initConfig (line 20)
  • access: protected
void initConfig ()

Redefinition of:
CoughConfig::initConfig()
Initializes config to the defaults
shouldProcessDatabase (line 116)

Returns whether not the given database name should be processed.

  • author: Anthony Bush
  • access: public
boolean shouldProcessDatabase (string $dbName)
  • string $dbName
shouldProcessTable (line 140)

Returns whether not the given table name (for the given database name) should be processed.

  • author: Anthony Bush
  • access: public
boolean shouldProcessTable ( $dbName, string $tableName)
  • string $tableName
  • $dbName
shouldScanForJoin (line 167)

Returns whether or not a the $sourceTable cares about the $refDatabase when looking for joins.

  • author: Anthony Bush
  • since: 2007-11-06
  • access: public
boolean shouldScanForJoin ( $sourceTable,  $refDatabase)
  • SchemaTable $sourceTable: - the source table that is trying to link up related joins
  • SchemaDatabase $refDatabase: - the dest database to scan if shouldScanForJoin() returns true

Inherited Methods

Inherited From CoughConfig

CoughConfig::__construct()
CoughConfig::getArrayValueFromMultiKey()
CoughConfig::getConfigValue()
CoughConfig::initConfig()
CoughConfig::mergeIntoConfig()
Class Constants

Documentation generated on Wed, 12 Nov 2008 21:56:19 -0600 by phpDocumentor 1.4.0