DatabaseSchema: ezcDbSchemaPersistentClassWriter
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDbSchemaPersistentClassWriter
|
This handler creates PHP classes to be used with PersistentObject from a DatabaseSchema. [
source]
Implemented Interfaces
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(
[boolean
$overwrite = false], [string
$classPrefix = null] )
Creates a new writer instance
Parameters
| Name |
Type |
Description |
$overwrite |
boolean |
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
saveToFile
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. |
Throws
| Class | Description |
ezcBaseFileNotFoundException |
If the given directory could not be found. |
ezcBaseFilePermissionException |
If the given directory is not writable. |
Last updated: Mon, 17 Dec 2007