Public Member Functions |
| | DB_Sync ($db1, $db2, $table1=null, $table2=null, $renamed=null) |
| | equals ($table1=null, $table2=null) |
| | init ($table1, $table2, $renamed=null) |
| | checkTableNames () |
| | loadTableData () |
| | fieldArrayToSQLDef ($field) |
| | syncField ($fieldname, $after=null, $renameMap=null) |
| | syncTables ($table1=null, $table2=null, $renamedMap=null) |
Data Fields |
| | $db1 |
| | $db2 |
| | $table1 |
| | $table2 |
| | $table1Data |
| | $table2Data |
| | $renamed = array() |
| | $listeners = array() |
Detailed Description
Definition at line 4 of file Sync.php.
Member Function Documentation
| DB_Sync |
( |
$ |
db1, |
|
|
$ |
db2, |
|
|
$ |
table1 = null, |
|
|
$ |
table2 = null, |
|
|
$ |
renamed = null |
|
) |
| |
| equals |
( |
$ |
table1 = null, |
|
|
$ |
table2 = null |
|
) |
| |
Compares 2 tables to see if they are identical in definition.
- Parameters:
-
| string | $table1 | The name of the first table. |
| string | $table2 | The name of the second table. |
- Returns:
- boolean True if the tables have identical schemas.
Definition at line 34 of file Sync.php.
| fieldArrayToSQLDef |
( |
$ |
field | ) |
|
Converts a field's array data into an SQL string definition.
- Parameters:
-
| array | $field | The array data for a field. |
- Returns:
- string SQL definition for field.
Definition at line 116 of file Sync.php.
| init |
( |
$ |
table1, |
|
|
$ |
table2, |
|
|
$ |
renamed = null |
|
) |
| |
Loads the table data for table 1 and table 2 into table1Data and table2Data respectively.
Definition at line 82 of file Sync.php.
| syncField |
( |
$ |
fieldname, |
|
|
$ |
after = null, |
|
|
$ |
renameMap = null |
|
) |
| |
Synchronizes the field named $fieldname.
Definition at line 165 of file Sync.php.
| syncTables |
( |
$ |
table1 = null, |
|
|
$ |
table2 = null, |
|
|
$ |
renamedMap = null |
|
) |
| |
Field Documentation
The documentation for this class was generated from the following file: