本文整理汇总了PHP中KalturaObject::fromObject方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaObject::fromObject方法的具体用法?PHP KalturaObject::fromObject怎么用?PHP KalturaObject::fromObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaObject
的用法示例。
在下文中一共展示了KalturaObject::fromObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doFromObject
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());
}
}
示例2: fromObject
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);
}
示例3: fromObject
public function fromObject($sourceObject)
{
if (!$sourceObject) {
return;
}
parent::fromObject($sourceObject);
}
示例4: fromObject
public function fromObject($dbObject)
{
parent::fromObject($dbObject);
if ($dbObject instanceof accessControl) {
$dbRestrictions = $dbObject->getRestrictions();
$this->restrictions = KalturaRestrictionArray::fromDbArray($dbRestrictions);
}
}
示例5: fromObject
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;
}
示例6: fromObject
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();
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:KalturaDistributionProvider.php
示例7: fromObject
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;
}
示例8: fromObject
public function fromObject($sourceObject)
{
if (!$sourceObject) {
return;
}
parent::fromObject($sourceObject);
$entryFilter = $sourceObject->getEntryFilterObject();
if ($entryFilter) {
$this->entryFilter = new KalturaBaseEntryFilter();
$this->entryFilter->fromObject($entryFilter);
}
}
示例9: fromObject
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());
}
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:21,代码来源:KalturaEventNotificationParameter.php
示例10: fromObject
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());
}
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:40,代码来源:KalturaEmailNotificationRecipient.php
示例11: fromObject
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();
}
示例12: fromObject
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());
}
示例13: fromObject
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);
}
}
示例14: fromObject
public function fromObject($source_object)
{
parent::fromObject($source_object);
$this->urlManagerParams = KalturaKeyValueArray::fromKeyValueArray($source_object->getUrlManagerParams());
$this->pathManagerParams = KalturaKeyValueArray::fromKeyValueArray($source_object->getPathManagerParams());
}
示例15: fromObject
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;
}
}
}