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

### PersistentObjectDatabaseSchemaTiein::ezcPersistentObjectTemplateSchemaWriter

### Class ezcPersistentObjectTemplateSchemaWriter

Writer to generate PersistentObject class/definition files.

This class is used in ezcPersistentObjectSchemaGenerator to generate PersistentObject class and definition files based on templates.

Source for this file: /PersistentObjectDatabaseSchemaTiein/src/template_writer.php

Version: | //autogentag//

### Member Variables

protected array(string=>mixed) | `$properties = array()` Properties.

### Method Summary

public ezcPersistentObjectTemplateSchemaWriter | `__construct( [ $options = null] )` Creates a new writer instance.
public void | `write( $schema , $template , $dir )` Writes the given $schema to $dir using $template.

### Methods

#### __construct

ezcPersistentObjectTemplateSchemaWriter __construct( [ezcPersistentObjectTemplateSchemaWriterOptions $options = null] )

Creates a new writer instance.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$options` | ezcPersistentObjectTemplateSchemaWriterOptions |

#### write

void write( $schema , string $template , mixed $dir )

Writes the given $schema to $dir using $template.

Iterates through all tables in $schema, sends each of them to a ezcTemplate with $template and writes the result to $dir with the file name returned by the template.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$schema` | ezcDbSchema |
`$template` | string |
`$dir` | mixed |

Documentation generated by phpDocumentor 1.4.3