Zeta Components Manual :: Docs For Class ezcDbSchemaPersistentWriter
DatabaseSchema::ezcDbSchemaPersistentWriter
Class ezcDbSchemaPersistentWriter
This handler creates PHP classes to be used with PersistentObject from a DatabaseSchema.
Source for this file: /DatabaseSchema/src/handlers/persistent/writer.php
Implements interfaces:
Version: | //autogentag// |
Method Summary
public void |
__construct(
[ $overwrite
= false] , [ $classPrefix
= null] )
Creates a new writer instance |
public int |
getWriterType(
)
Returns what type of schema writer this class implements. |
public void |
saveToFile(
$dir
, $dbSchema
)
Writes the schema definition in $dbSchema to files located in $dir. |
Methods
__construct
void
__construct(
[bool
$overwrite
= false] , [string
$classPrefix
= null] )
Creates a new writer instance
Parameters:
Name | Type | Description |
---|---|---|
$overwrite |
bool | Overwrite existsing files? |
$classPrefix |
string | Prefix for class names. |
getWriterType
int
getWriterType(
)
Returns what type of schema writer this class implements.
This method always returns ezcDbSchema::FILE
Implementation of:
Method | Description |
---|---|
ezcDbSchemaWriter::getWriterType() |
Returns what type of schema writer this class implements. |
saveToFile
void
saveToFile(
string
$dir
, ezcDbSchema
$dbSchema
)
Writes the schema definition in $dbSchema to files located in $dir.
This method dumps the given schema to PersistentObject definitions, which will be located in the given directory.
Parameters:
Name | Type | Description |
---|---|---|
$dir |
string | The directory to store definitions in. |
$dbSchema |
ezcDbSchema | The schema object to create defs for. |
Exceptions:
Type | Description |
---|---|
ezcBaseFilePermissionException |
If the given directory is not writable. |
ezcBaseFileNotFoundException |
If the given directory could not be found. |
Implementation of:
Method | Description |
---|---|
ezcDbSchemaFileWriter::saveToFile() |
Saves the schema definition in $schema to the file $file. |
Documentation generated by phpDocumentor 1.4.3