Documentation

CRM_Core_CodeGen_Specification
in package

Read the schema specification and parse into internal data structures

Table of Contents

Properties

$buildVersion  : mixed
$database  : mixed
$tables  : mixed
$classNames  : mixed

Methods

getDatabase()  : array<string|int, mixed>
getDynamicForeignKey()  : mixed
getField()  : mixed
getForeignKey()  : mixed
getIndex()  : mixed
getPrimaryKey()  : mixed
getTable()  : mixed
getTables()  : array<string|int, mixed>
orderTables()  : array<string|int, mixed>
parse()  : mixed
Read and parse.
resolveForeignKey()  : mixed
resolveForeignKeys()  : mixed
validTable()  : bool
append()  : mixed
checkAndAppend()  : mixed
value()  : null|string|SimpleXMLElement
getPhpNullable()  : bool
Returns whether the field is nullable in PHP.
getPhpType()  : string
Returns the PHPtype used within the DAO object

Properties

Methods

getDatabase()

public & getDatabase(mixed &$dbXML) : array<string|int, mixed>
Parameters
$dbXML : mixed
Return values
array<string|int, mixed>

getDynamicForeignKey()

public getDynamicForeignKey(mixed &$foreignXML, mixed &$dynamicForeignKeys) : mixed
Parameters
$foreignXML : mixed
$dynamicForeignKeys : mixed

getField()

public getField(mixed &$fieldXML, mixed &$fields) : mixed
Parameters
$fieldXML : mixed
$fields : mixed

getForeignKey()

public getForeignKey(mixed &$foreignXML, mixed &$fields, mixed &$foreignKeys, string &$currentTableName) : mixed
Parameters
$foreignXML : mixed
$fields : mixed
$foreignKeys : mixed
$currentTableName : string

getIndex()

public getIndex(mixed &$indexXML, mixed &$fields, mixed &$indices) : mixed
Parameters
$indexXML : mixed
$fields : mixed
$indices : mixed

getPrimaryKey()

public getPrimaryKey(object &$primaryXML, array<string|int, mixed> &$fields, array<string|int, mixed> &$table) : mixed
Parameters
$primaryXML : object
$fields : array<string|int, mixed>
$table : array<string|int, mixed>

getTable()

public getTable(mixed $tableXML, mixed &$database, mixed &$tables) : mixed
Parameters
$tableXML : mixed
$database : mixed
$tables : mixed

getTables()

public getTables(mixed $dbXML, mixed &$database) : array<string|int, mixed>
Parameters
$dbXML : mixed
$database : mixed
Return values
array<string|int, mixed>

orderTables()

public orderTables(array<string|int, mixed> &$tables) : array<string|int, mixed>
Parameters
$tables : array<string|int, mixed>
Return values
array<string|int, mixed>

parse()

Read and parse.

public parse(mixed $schemaPath, string $buildVersion[, bool $verbose = TRUE ]) : mixed
Parameters
$schemaPath : mixed
$buildVersion : string

Which version of the schema to build.

$verbose : bool = TRUE

resolveForeignKey()

public resolveForeignKey(array<string|int, mixed> &$tables, array<string|int, string> &$classNames, string $name) : mixed
Parameters
$tables : array<string|int, mixed>
$classNames : array<string|int, string>
$name : string

resolveForeignKeys()

public resolveForeignKeys(array<string|int, mixed> &$tables, array<string|int, string> &$classNames) : mixed
Parameters
$tables : array<string|int, mixed>
$classNames : array<string|int, string>

validTable()

public validTable(array<string|int, mixed> &$tables, int &$valid, string $name) : bool
Parameters
$tables : array<string|int, mixed>
$valid : int
$name : string
Return values
bool

append()

protected append(mixed &$str, mixed $delim, mixed $name) : mixed
Parameters
$str : mixed
$delim : mixed
$name : mixed

checkAndAppend()

protected checkAndAppend(mixed &$attributes, mixed &$object, string $name[, null $pre = NULL ][, null $post = NULL ]) : mixed
Parameters
$attributes : mixed
$object : mixed
$name : string
$pre : null = NULL
$post : null = NULL

value()

protected value(mixed $key, mixed &$object[, null $default = NULL ]) : null|string|SimpleXMLElement
Parameters
$key : mixed
$object : mixed
$default : null = NULL
Return values
null|string|SimpleXMLElement

getPhpNullable()

Returns whether the field is nullable in PHP.

private getPhpNullable(object $fieldXML) : bool

Either because:

  • The SQL field is nullable
  • The field is a primary key, and so is null before new objects are saved
Parameters
$fieldXML : object
Return values
bool

getPhpType()

Returns the PHPtype used within the DAO object

private getPhpType(object $fieldXML) : string
Parameters
$fieldXML : object
Return values
string

        
On this page

Search results