當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBObject::Get方法代碼示例

本文整理匯總了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'));
 }
開發者ID:kira8565,項目名稱:ITOP203-ZHCN,代碼行數:23,代碼來源:synchrodatasource.class.inc.php

示例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;
 }
開發者ID:henryavila,項目名稱:itop,代碼行數:16,代碼來源:dbobjectset.class.php


注:本文中的DBObject::Get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。