Path

ez components / documentation / api reference / 1.1.2 / databaseschema


eZ Components 1.1.2

DatabaseSchema: ezcDbSchemaHandlerManager

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcDbSchemaHandlerManager

Deals with schema handlers for a ezcDbSchema object. [source]
Determines which handlers to use for the specified storage type.

Member Variables

public array(string=>string) $diffReadHandlers = array(
'array' => 'ezcDbSchemaPhpArrayReader',
'xml' => 'ezcDbSchemaXmlReader',
)

Set of standard difference read handlers.
public array(string=>string) $diffWriteHandlers = array(
'array' => 'ezcDbSchemaPhpArrayWriter',
'mysql' => 'ezcDbSchemaMysqlWriter',
// 'oracle' => 'ezcDbSchemaOracleWriter',
// 'pgsql' => 'ezcDbSchemaPgsqlWriter',
// 'sqlite' => 'ezcDbSchemaSqliteWriter',
'xml' => 'ezcDbSchemaXmlWriter',
)

Set of standard difference write handlers.
public array(string=>string) $readHandlers = array(
'array' => 'ezcDbSchemaPhpArrayReader',
'mysql' => 'ezcDbSchemaMysqlReader',
// 'oracle' => 'ezcDbSchemaOracleReader',
// 'pgsql' => 'ezcDbSchemaPgsqlReader',
// 'sqlite' => 'ezcDbSchemaSqliteReader',
'xml' => 'ezcDbSchemaXmlReader',
)

Set of standard read handlers.
public array(string=>string) $writeHandlers = array(
'array' => 'ezcDbSchemaPhpArrayWriter',
'mysql' => 'ezcDbSchemaMysqlWriter',
// 'oracle' => 'ezcDbSchemaOracleWriter',
// 'pgsql' => 'ezcDbSchemaPgsqlWriter',
// 'sqlite' => 'ezcDbSchemaSqliteWriter',
'xml' => 'ezcDbSchemaXmlWriter',
'persistent' => 'ezcDbSchemaPersistentWriter',
)

Set of standard write handlers.

Method Summary

public static void addDiffReader( $type, $readerClass )
Adds the difference read handler class $readerClass to the manager for $type
public static void addDiffWriter( $type, $writerClass )
Adds the difference write handler class $writerClass to the manager for $type
public static void addReader( $type, $readerClass )
Adds the read handler class $readerClass to the manager for $type
public static void addWriter( $type, $writerClass )
Adds the write handler class $writerClass to the manager for $type
public static string getDiffReaderByFormat( $format )
Returns the class name of the differences read handler for format $format.
public static string getDiffWriterByFormat( $format )
Returns the class name of the differences write handler for format $format.
public static string getReaderByFormat( $format )
Returns the class name of the read handler for format $format.
public static array getSupportedDiffFormats( )
Returns list of schema types supported by all known difference handlers.
public static array getSupportedFormats( )
Returns list of schema types supported by all known handlers.
public static string getWriterByFormat( $format )
Returns the class name of the write handler for format $format.

Methods

addDiffReader

void addDiffReader( string $type, string $readerClass )
Adds the difference read handler class $readerClass to the manager for $type

Parameters

Name Type Description
$type string  
$readerClass string  

Throws

ClassDescription
ezcDbSchemaInvalidReaderClassException if the $readerClass doesn't exist or doesn't extend the abstract class ezcDbSchemaDiffReader.

addDiffWriter

void addDiffWriter( string $type, string $writerClass )
Adds the difference write handler class $writerClass to the manager for $type

Parameters

Name Type Description
$type string  
$writerClass string  

Throws

ClassDescription
ezcDbSchemaInvalidWriterClassException if the $writerClass doesn't exist or doesn't extend the abstract class ezcDbSchemaDiffWriter.

addReader

void addReader( string $type, string $readerClass )
Adds the read handler class $readerClass to the manager for $type

Parameters

Name Type Description
$type string  
$readerClass string  

Throws

ClassDescription
ezcDbSchemaInvalidReaderClassException if the $readerClass doesn't exist or doesn't extend the abstract class ezcDbSchemaReader.

addWriter

void addWriter( string $type, string $writerClass )
Adds the write handler class $writerClass to the manager for $type

Parameters

Name Type Description
$type string  
$writerClass string  

Throws

ClassDescription
ezcDbSchemaInvalidWriterClassException if the $writerClass doesn't exist or doesn't extend the abstract class ezcDbSchemaWriter.

getDiffReaderByFormat

string getDiffReaderByFormat( string $format )
Returns the class name of the differences read handler for format $format.

Parameters

Name Type Description
$format string  

getDiffWriterByFormat

string getDiffWriterByFormat( string $format )
Returns the class name of the differences write handler for format $format.

Parameters

Name Type Description
$format string  

getReaderByFormat

string getReaderByFormat( string $format )
Returns the class name of the read handler for format $format.

Parameters

Name Type Description
$format string  

getSupportedDiffFormats

array getSupportedDiffFormats( )
Returns list of schema types supported by all known difference handlers.
Goes through the list of known difference handlers and gathers information of which schema types do they support.

getSupportedFormats

array getSupportedFormats( )
Returns list of schema types supported by all known handlers.
Goes through the list of known handlers and gathers information of which schema types do they support.

getWriterByFormat

string getWriterByFormat( string $format )
Returns the class name of the write handler for format $format.

Parameters

Name Type Description
$format string  

Last updated: Thu, 01 Nov 2007