本文整理汇总了PHP中Tinebase_Backend_Sql_Abstract::getByProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Backend_Sql_Abstract::getByProperty方法的具体用法?PHP Tinebase_Backend_Sql_Abstract::getByProperty怎么用?PHP Tinebase_Backend_Sql_Abstract::getByProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Backend_Sql_Abstract
的用法示例。
在下文中一共展示了Tinebase_Backend_Sql_Abstract::getByProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: appendForeignRecordToRecord
/**
* appends foreign record (1:1 relation) to given record
*
* @param Tinebase_Record_Abstract $_record Record to append the foreign record to
* @param string $_appendTo Property in the record where to append the foreign record to
* @param string $_recordKey Property in the record where the foreign key value is in
* @param string $_foreignKey Key property in foreign table of the record to append
* @param Tinebase_Backend_Sql_Abstract $_foreignBackend Foreign table backend
*/
public function appendForeignRecordToRecord($_record, $_appendTo, $_recordKey, $_foreignKey, $_foreignBackend)
{
try {
$_record->{$_appendTo} = $_foreignBackend->getByProperty($_record->{$_recordKey}, $_foreignKey);
} catch (Tinebase_Exception_NotFound $e) {
$_record->{$_appendTo} = NULL;
}
}