当前位置: 首页>>代码示例>>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;未经允许,请勿转载。