本文整理汇总了PHP中CRM_Core_DAO_AllCoreTables::getClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_DAO_AllCoreTables::getClasses方法的具体用法?PHP CRM_Core_DAO_AllCoreTables::getClasses怎么用?PHP CRM_Core_DAO_AllCoreTables::getClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_DAO_AllCoreTables
的用法示例。
在下文中一共展示了CRM_Core_DAO_AllCoreTables::getClasses方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllDAO
/**
* Get all DAO classes.
*/
public function getAllDAO()
{
$classList = CRM_Core_DAO_AllCoreTables::getClasses();
$return = array();
foreach ($classList as $class) {
$return[] = array($class);
}
return $return;
}
示例2: getAllDAO
/**
* Get all DAO classes.
*/
public function getAllDAO()
{
$this->setUp();
// Ugh. Need full bootstrap to enumerate classes.
$classList = CRM_Core_DAO_AllCoreTables::getClasses();
$return = array();
foreach ($classList as $class) {
$return[] = array($class);
}
return $return;
}
示例3: getReferencesToTable
/**
* List all tables which have hard foreign keys to this table.
*
* For now, this returns a description of every entity_id/entity_table
* reference.
* TODO: filter dynamic entity references on the $tableName, based on
* schema metadata in dynamicForeignKey which enumerates a restricted
* set of possible entity_table's.
*
* @param string $tableName
* Table referred to.
*
* @return array
* structure of table and column, listing every table with a
* foreign key reference to $tableName, and the column where the key appears.
*/
public static function getReferencesToTable($tableName)
{
$refsFound = array();
foreach (CRM_Core_DAO_AllCoreTables::getClasses() as $daoClassName) {
$links = $daoClassName::getReferenceColumns();
$daoTableName = $daoClassName::getTableName();
foreach ($links as $refSpec) {
/** @var $refSpec CRM_Core_Reference_Interface */
if ($refSpec->matchesTargetTable($tableName)) {
$refsFound[] = $refSpec;
}
}
}
return $refsFound;
}
示例4: getReferencesToTable
/**
* List all tables which have hard foreign keys to this table.
*
* For now, this returns a description of every entity_id/entity_table
* reference.
* TODO: filter dynamic entity references on the $tableName, based on
* schema metadata in dynamicForeignKey which enumerates a restricted
* set of possible entity_table's.
*
* @param string $tableName table referred to
*
* @return array structure of table and column, listing every table with a
* foreign key reference to $tableName, and the column where the key appears.
*/
static function getReferencesToTable($tableName)
{
$refsFound = array();
foreach (CRM_Core_DAO_AllCoreTables::getClasses() as $daoClassName) {
$links = $daoClassName::getReferenceColumns();
$daoTableName = $daoClassName::getTableName();
foreach ($links as $refSpec) {
if ($refSpec->getTargetTable() === $tableName or $refSpec->isGeneric()) {
$refsFound[] = $refSpec;
}
}
}
return $refsFound;
}