Jump to main content Jump to doc navigation

xPDOGenerator.parseSchema

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

xPDOGenerator::parseSchema

Parses an XPDO XML schema and generates classes and map files from it.

Syntax

API Docs: http://api.modxcms.com/xpdo/om/xPDOGenerator.html#parseSchema

boolean parseSchema (string $schemaFile, [string $outputDir = ''], [boolean $compile = false])

Example

Generate the map and class files for an XML schema:

$manager = $xpdo->getManager();
$generator = $manager->getGenerator();
$generator->parseSchema('mypackage.mysql.schema.xml','/path/to/mypackage/model/');

See Also