Propel API
Class

XmlToAppData

class XmlToAppData

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

Constants

DEBUG

enables debug output

Methods

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

Creates a new instance for the specified database type.

setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the AppData generator configuration

AppData parseFile(string $xmlFile)

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

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

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

startElement($parser, $name, $attributes)

Handles opening elements of the xml file.

_throwInvalidTagException($parser, $tag_name)

endElement($parser, $name)

Handles closing elements of the xml file.

Details

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

Creates a new instance for the specified database type.

Parameters

PropelPlatformInterface $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 74
public setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the AppData generator configuration

Parameters

GeneratorConfigInterface $generatorConfig

at line 86
public AppData parseFile(string $xmlFile)

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

Parameters

string $xmlFile The input file to parse.

Return Value

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

at line 105
public AppData parseString(string $xmlString, string $xmlFile = null)

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

Parameters

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

Return Value

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

Exceptions

Exception

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

Handles opening elements of the xml file.

Parameters

$parser
$name
$attributes

Exceptions

SchemaException

at line 348
public _throwInvalidTagException($parser, $tag_name)

Parameters

$parser
$tag_name

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

Handles closing elements of the xml file.

Parameters

$parser
$name