本文整理汇总了PHP中DBObject::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP DBObject::Get方法的具体用法?PHP DBObject::Get怎么用?PHP DBObject::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBObject
的用法示例。
在下文中一共展示了DBObject::Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetApplicationUrl
/**
* Get the actual hyperlink to the remote application for the given replica and dest object
*/
public function GetApplicationUrl(DBObject $oDestObj, SynchroReplica $oReplica)
{
if ($this->Get('url_application') == '') {
return '';
}
$aSearches = array();
$aReplacements = array();
foreach (MetaModel::ListAttributeDefs($this->GetTargetClass()) as $sAttCode => $oAttDef) {
if ($oAttDef->IsScalar()) {
$aSearches[] = '$this->' . $sAttCode . '$';
$aReplacements[] = $oDestObj->Get($sAttCode);
}
}
$aData = $oReplica->LoadExtendedDataFromTable($this->GetDataTable());
foreach ($aData as $sColumn => $value) {
$aSearches[] = '$replica->' . $sColumn . '$';
$aReplacements[] = $value;
}
return str_replace($aSearches, $aReplacements, $this->Get('url_application'));
}
示例2: CopyFrom
/**
* Helpr to clone (in memory) an object and to apply to it the values taken from a second object
* @param DBObject $oObjToClone
* @param DBObject $oObjWithValues
* @return DBObject The modified clone
*/
protected function CopyFrom($oObjToClone, $oObjWithValues)
{
$oObj = MetaModel::GetObject(get_class($oObjToClone), $oObjToClone->GetKey());
foreach (MetaModel::ListAttributeDefs(get_class($oObj)) as $sAttCode => $oAttDef) {
if (!in_array($sAttCode, $this->aExcludedColumns) && $oAttDef->IsWritable()) {
$oObj->Set($sAttCode, $oObjWithValues->Get($sAttCode));
}
}
return $oObj;
}