Return Value

public array
getWarnings()

Return Value

public string
quoteIdentifier(string $text)

Wraps call to Platform->quoteIdentifier() with a check to see whether quoting is enabled.

All subclasses should call this quoteIdentifier() method rather than calling the Platform
method directly. This method is used by both DataSQLBuilder and DDLBuilder, and potentially
in the OM builders also, which is why it is defined in this class.

Parameters

Return Value

public string
prefixClassname($identifier)

Returns the name of the current class being built, with a possible prefix.

Parameters

$identifier

Return Value

string

See also

OMBuilder#getClassname()

at line 42

public string
build()

Builds the PHP source for current class and returns it as a string.

This is the main entry point and defines a basic structure that classes should follow.
In most cases this method will not need to be overridden by subclasses. This method
does assume that the output language is PHP code, so it will need to be overridden if
this is not the case.

Return Value

string

The resulting PHP sourcecode.

at line 90

public string
buildObjectInstanceCreationCode($objName, $clsName)

Creates a $obj = new Book(); code snippet.

Can be used by frameworks, for instance, to
extend this behavior, e.g. initialize the object after creating the instance or so.

Parameters

$objName

$clsName

Return Value

string

Some code

at line 100

abstract public string
getUnprefixedClassname()

Returns the qualified (prefixed) classname that is being built by the current class.

This method must be implemented by child classes.

Return Value

string

at line 107

public string
getClassname()

Returns the prefixed classname that is being built by the current class.

Return Value

string

See also

DataModelBuilder#prefixClassname()

at line 116

public string
getFullyQualifiedClassname()

Returns the namespaced classname if there is a namespace, and the raw classname otherwise

Return Value

string

at line 129

public string
getClasspath()

Gets the dot-path representation of current class being built.

Return Value

string

at line 144

public string
getClassFilePath()

Gets the full path to the file for the current class.

Return Value

string

at line 154

public string
getPackage()

Gets package name for this table.

This is overridden by child classes that have different packages.

Return Value

string

at line 168

public string
getPackagePath()

Returns filesystem path for current package.

Return Value

string

at line 189

public string
getNamespace()

Return the user-defined namespace for this table, or the database namespace otherwise.

Return Value

string

at line 194

public
declareClassNamespace($class, $namespace = '')

Parameters

$class

$namespace

at line 203

public
declareClass($fullyQualifiedClassName)

Parameters

$fullyQualifiedClassName

at line 214

public
declareClassFromBuilder($builder)

Parameters

$builder

at line 219

public
declareClasses()

at line 227

public
getDeclaredClasses($namespace = null)

Parameters

$namespace

at line 236

public
getNamespaceStatement()

at line 246

public
getUseStatements($ignoredNamespace = null)

Parameters

$ignoredNamespace

at line 270

public string
getPeerClassname()

Shortcut method to return the [stub] peer classname for current table.

This is the classname that is used whenever object or peer classes want
to invoke methods of the peer classes.

Return Value

string

(e.g. 'MyPeer')

See also

StubPeerBuilder::getClassname()

at line 282

public string
getQueryClassname()

Shortcut method to return the [stub] query classname for current table.

This is the classname that is used whenever object or peer classes want
to invoke methods of the query classes.

Return Value

string

(e.g. 'Myquery')

See also

StubQueryBuilder::getClassname()

at line 294

public string
getObjectClassname()

Returns the object classname for current table.

This is the classname that is used whenever object or peer classes want
to invoke methods of the object classes.