本文整理汇总了PHP中KalturaObject::doFromObject方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaObject::doFromObject方法的具体用法?PHP KalturaObject::doFromObject怎么用?PHP KalturaObject::doFromObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaObject
的用法示例。
在下文中一共展示了KalturaObject::doFromObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doFromObject
public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($sourceObject, $responseProfile);
if ($this->shouldGet('scheduleUpdateEnabled', $responseProfile)) {
$this->scheduleUpdateEnabled = $sourceObject->isScheduleUpdateEnabled();
}
if ($this->shouldGet('availabilityUpdateEnabled', $responseProfile)) {
$this->availabilityUpdateEnabled = $sourceObject->isAvailabilityUpdateEnabled();
}
if ($this->shouldGet('deleteInsteadUpdate', $responseProfile)) {
$this->deleteInsteadUpdate = $sourceObject->useDeleteInsteadOfUpdate();
}
if ($this->shouldGet('intervalBeforeSunrise', $responseProfile)) {
$this->intervalBeforeSunrise = $sourceObject->getJobIntervalBeforeSunrise();
}
if ($this->shouldGet('intervalBeforeSunset', $responseProfile)) {
$this->intervalBeforeSunset = $sourceObject->getJobIntervalBeforeSunset();
}
if ($this->shouldGet('updateRequiredEntryFields', $responseProfile)) {
$this->updateRequiredEntryFields = $sourceObject->getUpdateRequiredEntryFields();
}
if ($this->shouldGet('updateRequiredMetadataXPaths', $responseProfile)) {
$this->updateRequiredMetadataXPaths = $sourceObject->getUpdateRequiredMetadataXPaths();
}
}
示例2: doFromObject
public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($source_object, $responseProfile);
if ($this->shouldGet('updateParams', $responseProfile)) {
$this->updateParams = KalturaStringArray::fromStringArray($source_object->getUpdateParams());
}
}
示例3: doFromObject
public function doFromObject($dbData, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($dbData, $responseProfile);
$statusesArray = $dbData->getStatuses();
if (is_array($statusesArray)) {
$this->statuses = KalturaSchedulerStatusArray::fromValuesArray($statusesArray, $this->schedulerId, $this->schedulerConfiguredId, $this->id, $this->configuredId, $this->type);
}
$this->configs = KalturaSchedulerConfigArray::fromDbArray($dbData->getConfigs());
$this->lockedJobs = KalturaBatchJobArray::fromBatchJobArray($dbData->getLockedJobs());
return $this;
}
示例4: doFromObject
public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
{
if (!$sourceObject) {
return;
}
parent::doFromObject($sourceObject, $responseProfile);
if ($this->shouldGet('entryFilter', $responseProfile)) {
$entryFilter = $sourceObject->getEntryFilterObject();
if ($entryFilter) {
$this->entryFilter = new KalturaBaseEntryFilter();
$this->entryFilter->fromObject($entryFilter);
}
}
}
示例5: doFromObject
public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null)
{
/* @var $source_object CaptionAssetItem */
$ret = parent::doFromObject($source_object, $responseProfile);
if ($this->shouldGet('asset', $responseProfile)) {
$this->asset = new KalturaCaptionAsset();
$this->asset->fromObject($source_object->getAsset());
}
if ($this->shouldGet('entry', $responseProfile)) {
$entry = $source_object->getEntry();
if ($entry) {
$this->entry = KalturaEntryFactory::getInstanceByType($entry->getType());
$this->entry->fromObject($entry);
}
}
return $ret;
}
示例6: doFromObject
public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($dbObject, $responseProfile);
/* @var $dbObject kExtendingItemMrssParameter */
if ($this->shouldGet('identifier', $responseProfile)) {
$identifierType = get_class($dbObject->getIdentifier());
KalturaLog::info("Creating identifier for DB identifier type {$identifierType}");
switch ($identifierType) {
case 'kEntryIdentifier':
$this->identifier = new KalturaEntryIdentifier();
break;
case 'kCategoryIdentifier':
$this->identifier = new KalturaCategoryIdentifier();
}
if ($this->identifier) {
$this->identifier->fromObject($dbObject->getIdentifier());
}
}
}
示例7: doFromObject
public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
{
/* @var $dbObject kEventValueCondition */
parent::doFromObject($dbObject, $responseProfile);
$valueType = get_class($dbObject->getValue());
KalturaLog::debug("Loading KalturaStringValue from type [{$valueType}]");
switch ($valueType) {
case 'kStringValue':
$this->value = new KalturaStringValue();
break;
case 'kEvalStringField':
$this->value = new KalturaEvalStringField();
break;
default:
$this->value = KalturaPluginManager::loadObject('KalturaStringValue', $valueType);
break;
}
if ($this->value) {
$this->value->fromObject($dbObject->getValue());
}
}
示例8: doFromObject
public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
{
/* @var $dbObject kEmailNotificationRecipient */
parent::doFromObject($dbObject, $responseProfile);
$emailType = get_class($dbObject->getEmail());
KalturaLog::debug("Loading KalturaStringValue from type [{$emailType}]");
switch ($emailType) {
case 'kStringValue':
$this->email = new KalturaStringValue();
break;
case 'kEvalStringField':
$this->email = new KalturaEvalStringField();
break;
case 'kUserEmailContextField':
$this->email = new KalturaUserEmailContextField();
break;
default:
$this->email = KalturaPluginManager::loadObject('KalturaStringValue', $emailType);
break;
}
if ($this->email) {
$this->email->fromObject($dbObject->getEmail());
}
$nameType = get_class($dbObject->getName());
KalturaLog::debug("Loading KalturaStringValue from type [{$nameType}]");
switch ($nameType) {
case 'kStringValue':
$this->name = new KalturaStringValue();
break;
case 'kEvalStringField':
$this->name = new KalturaEvalStringField();
break;
default:
$this->name = KalturaPluginManager::loadObject('KalturaStringValue', $nameType);
break;
}
if ($this->name) {
$this->name->fromObject($dbObject->getName());
}
}
示例9: doFromObject
public function doFromObject($batchJobObject, KalturaDetachedResponseProfile $responseProfile = null)
{
/* @var $batchJobObject BatchJobLog */
if (is_null($batchJobObject)) {
return null;
}
if ($batchJobObject->getJobType() != BatchJobType::BULKUPLOAD) {
throw new Exception("Bulk upload object can be initialized from bulk upload job only");
}
parent::doFromObject($batchJobObject, $responseProfile);
$this->uploadedOn = $batchJobObject->getCreatedAt(null);
$this->logFileUrl = requestUtils::getHost() . "/api_v3/service/bulkUpload/action/serveLog/id/{$batchJobObject->getJobId()}/ks/" . kCurrentContext::$ks;
// $this->logFileUrl = requestUtils::getHost() . "/index.php/extwidget/bulkuploadfile/id/{$batchJob->getId()}/pid/{$batchJob->getPartnerId()}/type/log";
$this->bulkFileUrl = requestUtils::getHost() . "/api_v3/service/bulkUpload/action/serve/id/{$batchJobObject->getJobId()}/ks/" . kCurrentContext::$ks;
// $this->bulkFileUrl = requestUtils::getCdnHost() . "/index.php/extwidget/bulkuploadfile/id/{$batchJob->getId()}/pid/{$batchJob->getPartnerId()}/type/$type";
$this->csvFileUrl = $this->bulkFileUrl;
if (method_exists(get_class($batchJobObject), "getParam1")) {
$this->bulkUploadObjectType = $batchJobObject->getParam1();
}
//if (isset ())
$jobData = $batchJobObject->getData();
if ($jobData && $jobData instanceof kBulkUploadJobData) {
$this->uploadedBy = $jobData->getUploadedBy();
$this->uploadedByUserId = $jobData->getUserId();
$this->numOfEntries = $jobData->getNumOfEntries();
$this->numOfObjects = $jobData->getNumOfObjects();
$this->fileName = $jobData->getFileName();
$this->bulkUploadObjectType = BulkUploadObjectType::ENTRY;
if ($jobData->getBulkUploadObjectType()) {
$this->bulkUploadObjectType = $jobData->getBulkUploadObjectType();
}
if (!$jobData->getFilePath()) {
$this->csvFileUrl = null;
$this->bulkFileUrl = null;
}
}
}
示例10: doFromObject
public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
{
if (!$sourceObject) {
return;
}
parent::doFromObject($sourceObject, $responseProfile);
// full name is deprecated and was split to firstName + lastName
// this is for backward compatibility
if ($this->shouldGet('fullName', $responseProfile)) {
$this->fullName = $sourceObject->getFullName();
}
if ($this->shouldGet('loginEnabled', $responseProfile)) {
$this->loginEnabled = !is_null($sourceObject->getLoginDataId());
}
}
示例11: doFromObject
public function doFromObject($partner, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($partner);
$this->name = kString::stripUtf8InvalidChars($this->name);
$this->description = kString::stripUtf8InvalidChars($this->description);
$this->adminName = kString::stripUtf8InvalidChars($this->adminName);
$this->additionalParams = KalturaKeyValueArray::fromKeyValueArray($partner->getAdditionalParams());
if (!$this->host) {
$this->host = null;
}
if (!$this->cdnHost) {
$this->cdnHost = null;
}
}
示例12: doFromObject
public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($source_object, $responseProfile);
$this->fileUrl = $source_object->getExternalUrl($this->getEntryId($source_object));
$this->isCurrentDc = $source_object->getDc() == kDataCenterMgr::getCurrentDcId();
if ($this->fileType == KalturaFileSyncType::LINK) {
$fileSync = kFileSyncUtils::resolve($source_object);
$this->fileRoot = $fileSync->getFileRoot();
$this->filePath = $fileSync->getFilePath();
}
if ($this->isCurrentDc) {
$path = $this->fileRoot . $this->filePath;
$this->fileDiscSize = kFile::fileSize($path);
$content = file_get_contents($path, false, null, 0, 1024);
if (ctype_print($content) || ctype_cntrl($content)) {
$this->fileContent = $content;
}
}
}
示例13: doFromObject
public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($source_object, $responseProfile);
// copy permission items IDs
if ($this->shouldGet('permissionItemsIds', $responseProfile)) {
$itemIdsArray = $source_object->getPermissionItemIds();
if ($itemIdsArray && count($itemIdsArray) > 0) {
$this->permissionItemsIds = implode(',', $itemIdsArray);
}
}
}
示例14: doFromObject
public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
{
parent::doFromObject($sourceObject, $responseProfile);
if ($this->shouldGet('xslTransformation', $responseProfile)) {
$this->xslTransformation = $sourceObject->getXsl();
}
if ($this->shouldGet('cropDimensions', $responseProfile)) {
$this->cropDimensions = new KalturaCropDimensions();
$this->cropDimensions->fromObject($sourceObject);
}
}
示例15: doFromObject
protected function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
{
if (!$sourceObject) {
return;
}
parent::doFromObject($sourceObject, $responseProfile);
if ($this->shouldGet('optionalThumbDimensions', $responseProfile)) {
$this->optionalThumbDimensions = KalturaDistributionThumbDimensionsArray::fromDbArray($sourceObject->getOptionalThumbDimensionsObjects());
}
if ($this->shouldGet('requiredThumbDimensions', $responseProfile)) {
$this->requiredThumbDimensions = KalturaDistributionThumbDimensionsArray::fromDbArray($sourceObject->getRequiredThumbDimensionsObjects());
}
if ($this->shouldGet('optionalAssetDistributionRules', $responseProfile)) {
$this->optionalAssetDistributionRules = KalturaAssetDistributionRulesArray::fromDbArray($sourceObject->getOptionalAssetDistributionRules());
}
if ($this->shouldGet('requiredAssetDistributionRules', $responseProfile)) {
$this->requiredAssetDistributionRules = KalturaAssetDistributionRulesArray::fromDbArray($sourceObject->getRequiredAssetDistributionRules());
}
}