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, bool $verbose = TRUE)

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 20
parse($schemaPath, string $buildVersion, bool $verbose = TRUE)

Read and parse.

Parameters

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

at line 69
array getDatabase($dbXML)

Parameters

$dbXML

Return Value

array

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

Parameters

$dbXML
$database

Return Value

array

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

Parameters

$tables
string $classNames

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

Parameters

$tables
string $classNames
string $name

at line 148
array orderTables($tables)

Parameters

$tables

Return Value

array

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

Parameters

$tables
int $valid
string $name

Return Value

bool

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

Parameters

$tableXML
$database
$tables

at line 288
getField($fieldXML, $fields)

Parameters

$fieldXML
$fields

at line 465
string composeTitle(string $name)

Parameters

string $name

Return Value

string

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

Parameters

object $primaryXML
array $fields
array $table

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

Parameters

$indexXML
$fields
$indices

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

Parameters

$foreignXML
$fields
$foreignKeys
string $currentTableName

at line 638
getDynamicForeignKey($foreignXML, $dynamicForeignKeys)

Parameters

$foreignXML
$dynamicForeignKeys

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

Parameters

$key
$object
null $default

Return Value

null|string

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

Parameters

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

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

Parameters

$str
$delim
$name

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

Sets the size property of a textfield.

Parameters

string $fieldXML

Return Value

null|string