xpdo/om/mysql/xpdogenerator.class.php

Includes Classes 
package
xpdo
subpackage
om.mysql
Classes
xPDOGenerator_mysql

Description

MySQL classes for generating xPDOObject classes and maps from an xPDO schema.

\xPDOGenerator_mysql

Extends from
\xPDOGenerator
package
xpdo
subpackage
om.mysql
Methods
compile
getIndex
writeSchema

Description

An extension for generating {@link xPDOObject} class and map files for MySQL.

A MySQL-specific extension to an {@link xPDOManager} instance that can generate class stub and meta-data map files from a provided XML schema of a database structure.

Methods

compile

compile( string $path ) : boolean

Compile the packages into a single file for quicker loading.

Arguments
$path
string
The absolute path to compile into.
Output
boolean
True if the compiling went successfully.
Details
visibility
public
final
false
static
false

getIndex

getIndex( string $index ) : string

Format the passed database index value as an XML attribute.

Arguments
$index
string
The DB representation string of the index
Output
string
The formatted XML attribute string
Details
visibility
public
final
false
static
false

writeSchema

writeSchema( string $schemaFile, string $package, string $baseClass, string $tablePrefix, boolean $restrictPrefix = false ) : boolean

Write an xPDO XML Schema from your database.

Arguments
$schemaFile
string
The name (including path) of the schemaFile you want to write.
$package
string
Name of the package to generate the classes in.
$baseClass
string
The class which all classes in the package will extend; by default this is set to {@link xPDOObject} and any auto_increment fields with the column name 'id' will extend {@link xPDOSimpleObject} automatically.
$tablePrefix
string
The table prefix for the current connection, which will be removed from all of the generated class and table names. Specify a prefix when creating a new {@link xPDO} instance to recreate the tables with the same prefix, but still use the generic class names.
$restrictPrefix
boolean
Only reverse-engineer tables that have the specified tablePrefix; if tablePrefix is empty, this is ignored.
Output
boolean
True on success, false on failure.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox 0.11.2.