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

### DatabaseSchema::ezcDbSchemaValidator

### Class ezcDbSchemaValidator

ezcDbSchemaValidator validates schemas for correctness.

Example:

1. <?php
2. $xmlSchema=ezcDbSchema :: createFromFile ('xml','wanted-schema.xml');
3. $messages=ezcDbSchemaValidator :: validate ($xmlSchema);
4. foreach($messagesas$message)
5. {
6. echo$message,"\n";
7. }
8. ?>

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

Version: | //autogentag//

### Method Summary

public static array(string) | `validate( $schema )` Validates the ezcDbSchema object $schema with the recorded validator classes.

### Methods

#### validate

static array(string) validate( ezcDbSchema $schema )

Validates the ezcDbSchema object $schema with the recorded validator classes.

This method loops over all the known validator classes and calls their validate() method with the $schema as argument. It returns an array containing validation errors as strings.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$schema` | ezcDbSchema |

Documentation generated by phpDocumentor 1.4.3