Propel 2 API
Class

Propel\Generator\Builder\Util\SchemaReader

class SchemaReader

A class that is used to parse an input xml schema file and creates a Schema PHP object.

Constants

DEBUG

enables debug output

Methods

__construct(PlatformInterface $defaultPlatform = null, string $defaultPackage = null, string $encoding = 'iso-8859-1')

Creates a new instance for the specified database type.

setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the Schema generator configuration

Schema parseFile(string $xmlFile)

Parses a XML input file and returns a newly created and populated Schema structure.

Schema parseString(string $xmlString, string $xmlFile = null)

Parses a XML input string and returns a newly created and populated Schema structure.

startElement($parser, $name, $attributes)

endElement($parser, $name)

Details

at line 77
public __construct(PlatformInterface $defaultPlatform = null, string $defaultPackage = null, string $encoding = 'iso-8859-1')

Creates a new instance for the specified database type.

Parameters

PlatformInterface $defaultPlatform The default database platform for the application.
string $defaultPackage the default PHP package used for the om
string $encoding The database encoding.

at line 90
public setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the Schema generator configuration

Parameters

GeneratorConfigInterface $generatorConfig

at line 102
public Schema parseFile(string $xmlFile)

Parses a XML input file and returns a newly created and populated Schema structure.

Parameters

string $xmlFile The input file to parse.

Return Value

Schema populated by <code>xmlFile</code>.

at line 120
public Schema parseString(string $xmlString, string $xmlFile = null)

Parses a XML input string and returns a newly created and populated Schema structure.

Parameters

string $xmlString The input string to parse.
string $xmlFile The input file name.

Return Value

Schema

at line 147
public startElement($parser, $name, $attributes)

Parameters

$parser
$name
$attributes

at line 348
public endElement($parser, $name)

Parameters

$parser
$name