public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null) { parent::doFromObject($source_object, $responseProfile); /* @var $source_object kBulkUploadFilterJobData */ $this->filter = null; switch (get_class($source_object->getFilter())) { case 'categoryEntryFilter': $this->filter = new KalturaCategoryEntryFilter(); break; case 'entryFilter': $this->filter = new KalturaBaseEntryFilter(); break; default: break; } if ($this->filter) { $this->filter->fromObject($source_object->getFilter()); } $this->templateObject = null; switch (get_class($source_object->getTemplateObject())) { case 'categoryEntry': $this->templateObject = new KalturaCategoryEntry(); break; default: break; } if ($this->templateObject) { $this->templateObject->fromObject($source_object->getTemplateObject()); } }
public function fromObject($dbData) { /* @var $dbData kCopyJobData */ $filter = $dbData->getFilter(); $filterType = get_class($filter); switch ($filterType) { case 'entryFilter': $this->filter = new KalturaBaseEntryFilter(); $this->templateObject = new KalturaBaseEntry(); break; case 'categoryFilter': $this->filter = new KalturaCategoryFilter(); $this->templateObject = new KalturaCategory(); break; case 'categoryEntryFilter': $this->filter = new KalturaCategoryEntryFilter(); $this->templateObject = new KalturaCategoryEntry(); break; case 'categoryKuserFilter': $this->filter = new KalturaCategoryUserFilter(); $this->templateObject = new KalturaCategoryUser(); break; default: $this->filter = KalturaPluginManager::loadObject('KalturaFilter', $filterType); } if ($this->filter) { $this->filter->fromObject($filter); } if ($this->templateObject) { $this->templateObject->fromObject($dbData->getTemplateObject()); } return parent::fromObject($dbData); }
public function fromObject($sourceObject) { if (!$sourceObject) { return; } parent::fromObject($sourceObject); }
public function fromObject($dbObject) { parent::fromObject($dbObject); if ($dbObject instanceof accessControl) { $dbRestrictions = $dbObject->getRestrictions(); $this->restrictions = KalturaRestrictionArray::fromDbArray($dbRestrictions); } }
public function fromObject($dbData) { parent::fromObject($dbData); $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::fromSchedulerConfigArray($dbData->getConfigs()); $this->lockedJobs = KalturaBatchJobArray::fromBatchJobArray($dbData->getLockedJobs()); return $this; }
public function fromObject($sourceObject) { parent::fromObject($sourceObject); $this->scheduleUpdateEnabled = $sourceObject->isScheduleUpdateEnabled(); $this->availabilityUpdateEnabled = $sourceObject->isAvailabilityUpdateEnabled(); $this->deleteInsteadUpdate = $sourceObject->useDeleteInsteadOfUpdate(); $this->intervalBeforeSunrise = $sourceObject->getJobIntervalBeforeSunrise(); $this->intervalBeforeSunset = $sourceObject->getJobIntervalBeforeSunset(); $this->updateRequiredEntryFields = $sourceObject->getUpdateRequiredEntryFields(); $this->updateRequiredMetadataXPaths = $sourceObject->getUpdateRequiredMetadataXPaths(); }
public function fromObject($source_object) { /* @var $source_object CaptionAssetItem */ $ret = parent::fromObject($source_object); $this->asset = new KalturaCaptionAsset(); $this->asset->fromObject($source_object->getAsset()); $entry = $source_object->getEntry(); $this->entry = KalturaEntryFactory::getInstanceByType($entry->getType()); $this->entry->fromObject($entry); return $ret; }
public function fromObject($sourceObject) { if (!$sourceObject) { return; } parent::fromObject($sourceObject); $entryFilter = $sourceObject->getEntryFilterObject(); if ($entryFilter) { $this->entryFilter = new KalturaBaseEntryFilter(); $this->entryFilter->fromObject($entryFilter); } }
public function fromObject($dbObject) { /* @var $dbObject kEventValueCondition */ parent::fromObject($dbObject); $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()); } }
public function fromObject($dbObject) { /* @var $dbObject kEmailNotificationRecipient */ parent::fromObject($dbObject); $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()); } }
public function fromObject($sourceObject) { if (!$sourceObject) { return; } parent::fromObject($sourceObject); $this->sunStatus = $sourceObject->getSunStatus(); $this->sunrise = $sourceObject->getSunrise(null); $this->sunset = $sourceObject->getSunset(null); $this->submittedAt = $sourceObject->getSubmittedAt(null); $this->validationErrors = KalturaDistributionValidationErrorArray::fromDbArray($sourceObject->getValidationErrors()); $this->hasSubmitResultsLog = (bool) $sourceObject->getSubmitResultsVersion(); $this->hasSubmitSentDataLog = (bool) $sourceObject->getSubmitDataVersion(); $this->hasUpdateResultsLog = (bool) $sourceObject->getUpdateResultsVersion(); $this->hasUpdateSentDataLog = (bool) $sourceObject->getUpdateDataVersion(); $this->hasDeleteResultsLog = (bool) $sourceObject->getDeleteResultsVersion(); $this->hasDeleteSentDataLog = (bool) $sourceObject->getDeleteDataVersion(); }
public function fromObject($sourceObject) { if (!$sourceObject) { return; } parent::fromObject($sourceObject); // full name is deprecated and was split to firstName + lastName // this is for backward compatibility $this->fullName = $sourceObject->getFullName(); $this->loginEnabled = !is_null($sourceObject->getLoginDataId()); }
public function fromObject($source_object) { parent::fromObject($source_object); // copy permission items IDs $itemIdsArray = $source_object->getPermissionItemIds(); if ($itemIdsArray && count($itemIdsArray) > 0) { $this->permissionItemsIds = implode(',', $itemIdsArray); } }
public function fromObject($source_object) { parent::fromObject($source_object); $this->urlManagerParams = KalturaKeyValueArray::fromKeyValueArray($source_object->getUrlManagerParams()); $this->pathManagerParams = KalturaKeyValueArray::fromKeyValueArray($source_object->getPathManagerParams()); }
public function fromObject($source_object) { parent::fromObject($source_object); $this->fileUrl = $source_object->getExternalUrl(); $this->readyAt = $source_object->getReadyAt(null); $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 = filesize($path); $content = file_get_contents($path, false, null, 0, 1024); if (ctype_print($content) || ctype_cntrl($content)) { $this->fileContent = $content; } } }
public function fromObject($dbAnnotation) { parent::fromObject($dbAnnotation); if ($dbAnnotation->getKuserId() !== null) { $dbKuser = kuserPeer::retrieveByPK($dbAnnotation->getKuserId()); $this->userId = $dbKuser->getPuserId(); } }
public function fromObject($source_object) { parent::fromObject($source_object); $key = $source_object->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA); $this->xml = kFileSyncUtils::file_get_contents($key, true, false); }
public function fromPartner(Partner $partner) { parent::fromObject($partner); return $this; }
public function fromUiConf(uiConf $uiConf) { parent::fromObject($uiConf); }
public function fromObject($sourceObject) { parent::fromObject($sourceObject); $this->cropDimensions = new KalturaCropDimensions(); $this->cropDimensions->fromObject($sourceObject); }
public function fromWidget(widget $entry) { parent::fromObject($entry); }
public function fromObject($source_object) { parent::fromObject($source_object); }
public function fromObject($source_object) { parent::fromObject($source_object); if (isset($this->id) && $this->id) { $this->feedUrl = 'http://' . kConf::get('www_host') . '/api_v3/getFeed.php'; if ($this->partnerId) { $this->feedUrl .= '?partnerId=' . $this->partnerId . '&'; } else { $this->feedUrl .= '?'; } $this->feedUrl .= 'feedId=' . $this->id; } }
public function fromKceInstallationError(KceInstallationError $kceError) { parent::fromObject($kceError); }
/** * @param AuditTrail $dbAuditTrail */ public function fromObject($dbAuditTrail) { parent::fromObject($dbAuditTrail); $dbData = $dbAuditTrail->getData(); switch (get_class($dbData)) { case 'kAuditTrailChangeInfo': $this->data = new KalturaAuditTrailChangeInfo(); break; case 'kAuditTrailFileSyncCreateInfo': $this->data = new KalturaAuditTrailFileSyncCreateInfo(); break; case 'kAuditTrailTextInfo': $this->data = new KalturaAuditTrailTextInfo(); break; default: // $this->data = new KalturaAuditTrailInfo(); $this->data = null; break; } if ($this->data && $dbData) { $this->data->fromObject($dbData); } }
public function fromObject($object) { parent::fromObject($object); $this->expiresAt = $object->getExpiresAt(null); }
public function fromObject($source_object) { parent::fromObject($source_object); $key = $source_object->getSyncKey(GenericDistributionProviderAction::FILE_SYNC_DISTRIBUTION_PROVIDER_ACTION_MRSS_TRANSFORMER); $this->mrssTransformer = kFileSyncUtils::file_get_contents($key, true, false); $key = $source_object->getSyncKey(GenericDistributionProviderAction::FILE_SYNC_DISTRIBUTION_PROVIDER_ACTION_MRSS_VALIDATOR); $this->mrssValidator = kFileSyncUtils::file_get_contents($key, true, false); $key = $source_object->getSyncKey(GenericDistributionProviderAction::FILE_SYNC_DISTRIBUTION_PROVIDER_ACTION_RESULTS_TRANSFORMER); $this->resultsTransformer = kFileSyncUtils::file_get_contents($key, true, false); }
public function fromBatchJob($dbBatchJob, BatchJobLock $dbBatchJobLock = null) { parent::fromObject($dbBatchJob); $this->queueTime = $dbBatchJob->getQueueTime(null); // to return the timestamp and not string $this->finishTime = $dbBatchJob->getFinishTime(null); // to return the timestamp and not string if (!$dbBatchJob instanceof BatchJob) { return $this; } $dbData = $dbBatchJob->getData(); $this->fromData($dbBatchJob, $dbData); if ($this->data) { $this->jobSubType = $this->data->fromSubType($dbBatchJob->getJobSubType()); } if ($dbBatchJobLock) { $this->fromLockObject($dbBatchJob, $dbBatchJobLock); } else { $this->lockVersion = $dbBatchJob->getLockInfo()->getLockVersion(); $this->estimatedEffort = $dbBatchJob->getLockInfo()->getEstimatedEffort(); } return $this; }
public function fromObject($source_object) { parent::fromObject($source_object); $key = $source_object->getSyncKey(MetadataProfile::FILE_SYNC_METADATA_DEFINITION); $this->xsd = kFileSyncUtils::file_get_contents($key, true, false); $key = $source_object->getSyncKey(MetadataProfile::FILE_SYNC_METADATA_VIEWS); $this->views = kFileSyncUtils::file_get_contents($key, true, false); }
public function fromObject($source_object) { parent::fromObject($source_object); if (class_exists('MetadataPlugin')) { $this->enableMetadata = $source_object->getPluginEnabled(MetadataPlugin::getPluginName()); } if (class_exists('ContentDistributionPlugin')) { $this->enableContentDistribution = $source_object->getPluginEnabled(ContentDistributionPlugin::getPluginName()); } if (class_exists('AuditPlugin')) { $this->enableAuditTrail = $source_object->getPluginEnabled(AuditPlugin::getPluginName()); } if (class_exists('AnnotationPlugin')) { $this->enableAnnotation = $source_object->getPluginEnabled(AnnotationPlugin::getPluginName()); } $this->enableMobileFlavors = $source_object->getEnabledService(PermissionName::FEATURE_MOBILE_FLAVORS); $this->enablePs2PermissionValidation = $source_object->getEnabledService(PermissionName::FEATURE_PS2_PERMISSIONS_VALIDATION); }