本文整理汇总了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;
}
示例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);
}
}
示例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;
}
示例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);
}
示例5: getFieldNameFromPeer
public function getFieldNameFromPeer($field_name)
{
$res = BatchJobPeer::translateFieldName($field_name, $this->field_name_translation_type, BasePeer::TYPE_COLNAME);
return $res;
}