## Apache Zeta Components Manual :: Docs For Class ezcDbSchemaComparator

### DatabaseSchema::ezcDbSchemaComparator

### Class ezcDbSchemaComparator

This class provides database comparison functionality.

Example that shows how to make a comparison between a file on disk and a database.

1. $xmlSchema=ezcDbSchema :: createFromFile ('xml','wanted-schema.xml');
2. $dbSchema=ezcDbSchema :: createFromDb ($db);
3. $diff=ezcDbSchemaComparator :: compareSchemas ($xmlSchema,$dbSchema);

Source for this file: /DatabaseSchema/src/comparator.php

Version: | //autogentag//

### Method Summary

public static ezcDbSchemaDiff | `compareSchemas( $fromSchema , $toSchema )` Returns a ezcDbSchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.

### Methods

#### compareSchemas

static ezcDbSchemaDiff compareSchemas( ezcDbSchema $fromSchema , ezcDbSchema $toSchema )

Returns a ezcDbSchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.

The returned diferences are returned in such a way that they contain the operations to change the schema stored in $fromSchema to the schema that is stored in $toSchema.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$fromSchema` | ezcDbSchema |
`$toSchema` | ezcDbSchema |

Documentation generated by phpDocumentor 1.4.3