class CRM_Core_CodeGen_Specification

Read the schema specification and parse into internal data structures

Properties

$tables
$database
protected $classNames

Methods

parse($schemaPath, string $buildVersion)

Read and parse.

array
getDatabase($dbXML)

No description

array
getTables($dbXML, $database)

No description

resolveForeignKeys($tables, string $classNames)

No description

resolveForeignKey($tables, string $classNames, string $name)

No description

array
orderTables($tables)

No description

bool
validTable($tables, int $valid, string $name)

No description

getTable($tableXML, $database, $tables)

No description

getField($fieldXML, $fields)

No description

string
composeTitle(string $name)

No description

getPrimaryKey(object $primaryXML, array $fields, array $table)

No description

getIndex($indexXML, $fields, $indices)

No description

getForeignKey($foreignXML, $fields, $foreignKeys, string $currentTableName)

No description

getDynamicForeignKey($foreignXML, $dynamicForeignKeys)

No description

null|string
value($key, $object, null $default = NULL)

No description

checkAndAppend($attributes, $object, string $name, null $pre = NULL, null $post = NULL)

No description

append($str, $delim, $name)

No description

null|string
getSize(string $fieldXML)

Sets the size property of a textfield.

Details

at line 19
parse($schemaPath, string $buildVersion)

Read and parse.

Parameters

$schemaPath
string $buildVersion Which version of the schema to build.

at line 62
array getDatabase($dbXML)

Parameters

$dbXML

Return Value

array

at line 87
array getTables($dbXML, $database)

Parameters

$dbXML
$database

Return Value

array

at line 108
resolveForeignKeys($tables, string $classNames)

Parameters

$tables
string $classNames

at line 119
resolveForeignKey($tables, string $classNames, string $name)

Parameters

$tables
string $classNames
string $name

at line 141
array orderTables($tables)

Parameters

$tables

Return Value

array

at line 162
bool validTable($tables, int $valid, string $name)

Parameters

$tables
int $valid
string $name

Return Value

bool

at line 181
getTable($tableXML, $database, $tables)

Parameters

$tableXML
$database
$tables

at line 283
getField($fieldXML, $fields)

Parameters

$fieldXML
$fields

at line 444
string composeTitle(string $name)

Parameters

string $name

Return Value

string

at line 470
getPrimaryKey(object $primaryXML, array $fields, array $table)

Parameters

object $primaryXML
array $fields
array $table

at line 524
getIndex($indexXML, $fields, $indices)

Parameters

$indexXML
$fields
$indices

at line 588
getForeignKey($foreignXML, $fields, $foreignKeys, string $currentTableName)

Parameters

$foreignXML
$fields
$foreignKeys
string $currentTableName

at line 617
getDynamicForeignKey($foreignXML, $dynamicForeignKeys)

Parameters

$foreignXML
$dynamicForeignKeys

at line 633
protected null|string value($key, $object, null $default = NULL)

Parameters

$key
$object
null $default

Return Value

null|string

at line 647
protected checkAndAppend($attributes, $object, string $name, null $pre = NULL, null $post = NULL)

Parameters

$attributes
$object
string $name
null $pre
null $post

at line 661
protected append($str, $delim, $name)

Parameters

$str
$delim
$name

at line 696
protected null|string getSize(string $fieldXML)

Sets the size property of a textfield.

Parameters

string $fieldXML

Return Value

null|string