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


PHP BatchJobPeer::translateFieldName方法代碼示例

本文整理匯總了PHP中BatchJobPeer::translateFieldName方法的典型用法代碼示例。如果您正苦於以下問題:PHP BatchJobPeer::translateFieldName方法的具體用法?PHP BatchJobPeer::translateFieldName怎麽用?PHP BatchJobPeer::translateFieldName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BatchJobPeer的用法示例。


在下文中一共展示了BatchJobPeer::translateFieldName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: copyModifiedColumns

 protected function copyModifiedColumns(BatchJobLog $batchJobLog, BatchJob $batchJob, array $modifiedColumns)
 {
     $shouldSkipInTranslation = array(BatchJobPeer::LOCK_INFO, BatchJobPeer::HISTORY, BatchJobPeer::BATCH_JOB_LOCK_ID, BatchJobPeer::EXECUTION_STATUS);
     foreach ($modifiedColumns as $modifiedColumn) {
         $fieldPosLog = -1;
         try {
             if (in_array($modifiedColumn, $shouldSkipInTranslation)) {
                 if ($modifiedColumn == BatchJobPeer::EXECUTION_STATUS) {
                     $batchJobLog->setAbort($batchJob->getExecutionStatus() == BatchJobExecutionStatus::ABORTED);
                 }
                 continue;
             }
             $fieldName = BatchJobPeer::translateFieldName($modifiedColumn, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME);
             $fieldPosJob = BatchJobPeer::translateFieldName($modifiedColumn, BasePeer::TYPE_COLNAME, BasePeer::TYPE_NUM);
             $fieldPosLog = BatchJobLogPeer::translateFieldName($fieldName, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM);
         } catch (PropelException $e) {
             KalturaLog::err("Could not set value for BatchJobLog field {$fieldName}, exception thrown: " . $e->getMessage());
         }
         if ($fieldPosLog != -1) {
             $batchJobLog->setByPosition($fieldPosLog, $batchJob->getByPosition($fieldPosJob));
         }
         if ($modifiedColumn == BatchJobPeer::DATA) {
             //set param_1 for the $batchJobLog
             $batchJobData = $batchJob->getData();
             /* @var $batchJobData kBulkUploadJobData */
             $batchJobLog->setParam1($batchJobData->getBulkUploadObjectType());
         }
     }
     return $batchJobLog;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:30,代碼來源:kBatchJobLogManager.php

示例2: getFieldNameFromPeer

 public function getFieldNameFromPeer($field_name)
 {
     if ($this->queryFromBatchJob) {
         return BatchJobPeer::translateFieldName($field_name, $this->field_name_translation_type, BasePeer::TYPE_COLNAME);
     } else {
         return BatchJobLockPeer::translateFieldName($field_name, $this->field_name_translation_type, BasePeer::TYPE_COLNAME);
     }
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:8,代碼來源:BatchJobFilter.class.php

示例3: copyModifiedColumns

 protected function copyModifiedColumns(BatchJobLog $batchJobLog, BatchJob $batchJob, array $modifiedColumns)
 {
     foreach ($modifiedColumns as $modifiedColumn) {
         try {
             $fieldName = BatchJobPeer::translateFieldName($modifiedColumn, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME);
             $fieldPosJob = BatchJobPeer::translateFieldName($modifiedColumn, BasePeer::TYPE_COLNAME, BasePeer::TYPE_NUM);
             $fieldPosLog = BatchJobLogPeer::translateFieldName($fieldName, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM);
         } catch (PropelException $e) {
             KalturaLog::err("Could not set value for BatchJobLog field {$fieldName}, exception thrown: " . $e->getMessage());
         }
         $batchJobLog->setByPosition($fieldPosLog, $batchJob->getByPosition($fieldPosJob));
         if ($modifiedColumn == BatchJobPeer::DATA) {
             //set param_1 for the $batchJobLog
             $batchJobData = $batchJob->getData();
             /* @var $batchJobData kBulkUploadJobData */
             $batchJobLog->setParam1($batchJobData->getBulkUploadObjectType());
         }
     }
     return $batchJobLog;
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:20,代碼來源:kBatchJobLogManager.php

示例4: setByName

 /**
  * Sets a field from the object by name passed in as a string.
  *
  * @param      string $name peer name
  * @param      mixed $value field value
  * @param      string $type The type of fieldname the $name is of:
  *                     one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  *                     BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  * @return     void
  */
 public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
 {
     $pos = BatchJobPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
     return $this->setByPosition($pos, $value);
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:15,代碼來源:BaseBatchJob.php

示例5: getFieldNameFromPeer

 public function getFieldNameFromPeer($field_name)
 {
     $res = BatchJobPeer::translateFieldName($field_name, $this->field_name_translation_type, BasePeer::TYPE_COLNAME);
     return $res;
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:5,代碼來源:BatchJobFilter.class.php


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