class CRM_Core_DAO_AllCoreTables

Methods

static 
init(bool $fresh = FALSE)

Initialise.

static 
registerEntityType(string $daoName, string $className, string $tableName, string $fields_callback = NULL, string $links_callback = NULL)

(Quasi-Private) Do not call externally (except for unit-testing)

static array
get()

No description

static array
tables()

No description

static array
indices($localize = TRUE)

No description

static array
multilingualize(CRM_Core_DAO $class, array $originalIndices)

Modify indices to account for localization options.

static array
daoToClass()

No description

static array
getCoreTables()

No description

static bool
isCoreTable(string $tableName)

Determine whether $tableName is a core table.

static string
getCanonicalClassName(string $className)

Get the DAO for the class.

static array
getClasses()

Get a list of all DAO classes.

static string
getClassForTable(string $tableName)

Get the classname for the table.

static string|NULL
getFullName(string $daoName)

Given a brief-name, determine the full class-name.

static string|NULL
getBriefName(string $className)

Given a full class-name, determine the brief-name.

static string|FALSE
getTableForClass(string $className)

No description

static 
reinitializeCache(bool $fresh = FALSE)

Reinitialise cache.

static array
getExports(string $dao, string $labelName, bool $prefix, array $foreignDAOs)

(Quasi-Private) Do not call externally. For use by DAOs.

static array
getImports(string $dao, string $labelName, bool $prefix, array $foreignDAOs)

(Quasi-Private) Do not call externally. For use by DAOs.

static 
invoke(string $className, string $event, mixed $values)

(Quasi-Private) Do not call externally. For use by DAOs.

Details

at line 45
static init(bool $fresh = FALSE)

Initialise.

Parameters

bool $fresh

at line 81
static registerEntityType(string $daoName, string $className, string $tableName, string $fields_callback = NULL, string $links_callback = NULL)

(Quasi-Private) Do not call externally (except for unit-testing)

Parameters

string $daoName
string $className
string $tableName
string $fields_callback
string $links_callback

at line 97
static array get()

Return Value

array Ex: $result['CRM_Contact_DAO_Contact']['table'] == 'civicrm_contact';

at line 106
static array tables()

Return Value

array List of SQL table names.

at line 115
static array indices($localize = TRUE)

Parameters

$localize

Return Value

array List of indices.

at line 135
static array multilingualize(CRM_Core_DAO $class, array $originalIndices)

Modify indices to account for localization options.

Parameters

CRM_Core_DAO $class DAO class
array $originalIndices index definitions before localization

Return Value

array index definitions after localization

at line 180
static array daoToClass()

Return Value

array Mapping from brief-names to class-names. Ex: $result['Contact'] == 'CRM_Contact_DAO_Contact'.

at line 190
static array getCoreTables()

Return Value

array Mapping from table-names to class-names. Ex: $result['civicrm_contact'] == 'CRM_Contact_DAO_Contact'.

at line 200
static bool isCoreTable(string $tableName)

Determine whether $tableName is a core table.

Parameters

string $tableName

Return Value

bool

at line 211
static string getCanonicalClassName(string $className)

Get the DAO for the class.

Parameters

string $className

Return Value

string

at line 221
static array getClasses()

Get a list of all DAO classes.

Return Value

array List of class names.

at line 231
static string getClassForTable(string $tableName)

Get the classname for the table.

Parameters

string $tableName

Return Value

string

at line 248
static string|NULL getFullName(string $daoName)

Given a brief-name, determine the full class-name.

Parameters

string $daoName Ex: 'Contact'.

Return Value

string|NULL Ex: 'CRM_Contact_DAO_Contact'.

at line 260
static string|NULL getBriefName(string $className)

Given a full class-name, determine the brief-name.

Parameters

string $className Ex: 'CRM_Contact_DAO_Contact'.

Return Value

string|NULL Ex: 'Contact'.

at line 268
static string|FALSE getTableForClass(string $className)

Parameters

string $className DAO or BAO name

Return Value

string|FALSE SQL table name

at line 278
static reinitializeCache(bool $fresh = FALSE)

Reinitialise cache.

Parameters

bool $fresh

at line 293
static array getExports(string $dao, string $labelName, bool $prefix, array $foreignDAOs)

(Quasi-Private) Do not call externally. For use by DAOs.

Parameters

string $dao Ex: 'CRM_Core_DAO_Address'.
string $labelName Ex: 'address'.
bool $prefix
array $foreignDAOs

Return Value

array

at line 333
static array getImports(string $dao, string $labelName, bool $prefix, array $foreignDAOs)

(Quasi-Private) Do not call externally. For use by DAOs.

Parameters

string $dao Ex: 'CRM_Core_DAO_Address'.
string $labelName Ex: 'address'.
bool $prefix
array $foreignDAOs

Return Value

array

at line 371
static invoke(string $className, string $event, mixed $values)

(Quasi-Private) Do not call externally. For use by DAOs.

Apply any third-party alterations to the fields().

Parameters

string $className
string $event
mixed $values