Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Foreign_Key_Integrity_Check Class Reference

Public Member Functions

 Foreign_Key_Integrity_Check ()
 
 tables ()
 
 columns ($table)
 
 fks ($table)
 
 load ()
 
 checkDatabase ()
 
 checkTable ($table)
 
 printTable ($table)
 
 printColumn ($table, $column, $count)
 
 printResult ($assetids)
 

Data Fields

 $fks
 
 $tables = Array()
 

Detailed Description

Definition at line 55 of file system_integrity_foreign_keys.php.

Member Function Documentation

checkDatabase ( )

Performs the foreign key integrity check on the database

Returns
void public

Definition at line 275 of file system_integrity_foreign_keys.php.

checkTable (   $table)

Peforms a foreign key integrity check on the specified table

Parameters
string$tablethe name of the table to perform the check on
Returns
boolean public

Definition at line 298 of file system_integrity_foreign_keys.php.

columns (   $table)

Given the name of a table, return all it's columns

Parameters
string$tablethe name of the table to get the columns of
Returns
Array public

Definition at line 168 of file system_integrity_foreign_keys.php.

fks (   $table)

Returns the foreign keys for a given table

Parameters
string$tablethe name of the table to get fks for
Returns
Array public

Definition at line 207 of file system_integrity_foreign_keys.php.

Constructor

Returns
void public

Definition at line 138 of file system_integrity_foreign_keys.php.

load ( )

Normal stuff we need to get ready before we do anything else

Returns
boolean public

Definition at line 236 of file system_integrity_foreign_keys.php.

printColumn (   $table,
  $column,
  $count 
)

Print information on the column (read foreign key) currently being checked

Parameters
string$tablethe current table being checked
string$columnthe current column being checked
int$countthe number of bad foreign keys found for table/column
Returns
void private

Definition at line 378 of file system_integrity_foreign_keys.php.

printResult (   $assetids)

Print information on which values for the foreign key are broken

Parameters
array$assetidsan array of values for the incorrect foreign keys
Returns
void private

Definition at line 398 of file system_integrity_foreign_keys.php.

printTable (   $table)

Print information on the table that is being processed/checked

Parameters
string$tablethe name of the table being processed/checked
Returns
void private

Definition at line 361 of file system_integrity_foreign_keys.php.

tables ( )

Get all of the tables from the database

Returns
Array public

Definition at line 153 of file system_integrity_foreign_keys.php.


The documentation for this class was generated from the following file: