当前位置: 首页>>代码示例>>PHP>>正文


PHP KalturaPluginManager::loadObject方法代码示例

本文整理汇总了PHP中KalturaPluginManager::loadObject方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaPluginManager::loadObject方法的具体用法?PHP KalturaPluginManager::loadObject怎么用?PHP KalturaPluginManager::loadObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KalturaPluginManager的用法示例。


在下文中一共展示了KalturaPluginManager::loadObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addXMLBulkUploadJob

 /**
  * Add bulk upload job
  * @param DropFolder $folder
  * @param DropFolderFile $leadDropFolderFile
  * @throws Exception
  */
 private function addXMLBulkUploadJob(DropFolder $folder, DropFolderFile $leadDropFolderFile)
 {
     /* @var $leadDropFolderFile FeedDropFolderFile */
     KalturaLog::info('Adding BulkUpload job');
     try {
         $coreBulkUploadType = BulkUploadXmlPlugin::getBulkUploadTypeCoreValue(BulkUploadXmlType::XML);
         $objectId = $leadDropFolderFile->getId();
         $objectType = DropFolderXmlBulkUploadPlugin::getBatchJobObjectTypeCoreValue(DropFolderBatchJobObjectType::DROP_FOLDER_FILE);
         $partner = PartnerPeer::retrieveByPK($folder->getPartnerId());
         $data = KalturaPluginManager::loadObject('kBulkUploadJobData', $coreBulkUploadType);
         /* @var $data kBulkUploadJobData */
         $data->setUploadedBy(kDropFolderXmlEventsConsumer::UPLOADED_BY);
         KalturaLog::info("Feed XML path: " . $leadDropFolderFile->getFeedXmlPath());
         $data->setFilePath($leadDropFolderFile->getFeedXmlPath());
         $data->setFileName(basename($data->getFilePath()) . '.xml');
         $objectData = new kBulkUploadEntryData();
         KalturaLog::info('Conversion profile id: ' . $folder->getConversionProfileId());
         $objectData->setConversionProfileId($folder->getConversionProfileId());
         $data->setObjectData($objectData);
         $job = kJobsManager::addBulkUploadJob($partner, $data, $coreBulkUploadType, $objectId, $objectType);
         $this->setFileToProcessing($leadDropFolderFile);
         return $job;
     } catch (Exception $e) {
         KalturaLog::err("Error adding BulkUpload job -" . $e->getMessage());
         throw new Exception(DropFolderXmlBulkUploadPlugin::ERROR_ADDING_BULK_UPLOAD_MESSAGE, DropFolderXmlBulkUploadPlugin::getErrorCodeCoreValue(DropFolderXmlBulkUploadErrorCode::ERROR_ADDING_BULK_UPLOAD));
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:33,代码来源:kDropFolderFeedXmlFileHandler.php

示例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);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:KalturaCopyJobData.php

示例3: createNewEngine

 /**
  * @param int $type
  * @param KSchedularTaskConfig $taskConfig
  * @param KalturaConvartableJobData $data
  * @return KOperationEngine
  */
 protected static function createNewEngine($type, KSchedularTaskConfig $taskConfig, KalturaConvartableJobData $data)
 {
     // TODO - remove after old version deprecated
     if (!$data->flavorParamsOutput->engineVersion) {
         return new KOperationEngineOldVersionWrapper($type, $taskConfig, $data);
     }
     switch ($type) {
         case KalturaConversionEngineType::MENCODER:
             return new KOperationEngineMencoder($taskConfig->params->mencderCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::ON2:
             return new KOperationEngineFlix($taskConfig->params->on2Cmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG:
             return new KOperationEngineFfmpeg($taskConfig->params->ffmpegCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG_AUX:
             return new KOperationEngineFfmpegAux($taskConfig->params->ffmpegAuxCmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::FFMPEG_VP8:
             return new KOperationEngineFfmpegVp8($taskConfig->params->ffmpegVp8Cmd, $data->destFileSyncLocalPath);
         case KalturaConversionEngineType::ENCODING_COM:
             return new KOperationEngineEncodingCom($taskConfig->params->EncodingComUserId, $taskConfig->params->EncodingComUserKey, $taskConfig->params->EncodingComUrl);
     }
     if ($data instanceof KalturaConvertCollectionJobData) {
         $engine = self::getCollectionEngine($type, $taskConfig, $data);
         if ($engine) {
             return $engine;
         }
     }
     $engine = KalturaPluginManager::loadObject('KOperationEngine', $type, array('params' => $taskConfig->params, 'outFilePath' => $data->destFileSyncLocalPath));
     return $engine;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:KOperationManager.php

示例4: getInstanceByDbObject

 static function getInstanceByDbObject(kCondition $dbObject)
 {
     switch ($dbObject->getType()) {
         case ConditionType::AUTHENTICATED:
             return new KalturaAuthenticatedCondition();
         case ConditionType::COUNTRY:
             return new KalturaCountryCondition();
         case ConditionType::IP_ADDRESS:
             return new KalturaIpAddressCondition();
         case ConditionType::SITE:
             return new KalturaSiteCondition();
         case ConditionType::USER_AGENT:
             return new KalturaUserAgentCondition();
         case ConditionType::FIELD_COMPARE:
             return new KalturaFieldCompareCondition();
         case ConditionType::FIELD_MATCH:
             return new KalturaFieldMatchCondition();
         case ConditionType::ASSET_PROPERTIES_COMPARE:
             return new KalturaAssetPropertiesCompareCondition();
         case ConditionType::USER_ROLE:
             return new KalturaUserRoleCondition();
         case ConditionType::GEO_DISTANCE:
             return new KalturaGeoDistanceCondition();
         case ConditionType::OR_OPERATOR:
             return new KalturaOrCondition();
         case ConditionType::HASH:
             return new KalturaHashCondition();
         case ConditionType::DELIVERY_PROFILE:
             return new KalturaDeliveryProfileCondition();
         case ConditionType::ACTIVE_EDGE_VALIDATE:
             return new KalturaValidateActiveEdgeCondition();
         default:
             return KalturaPluginManager::loadObject('KalturaCondition', $dbObject->getType());
     }
 }
开发者ID:dozernz,项目名称:server,代码行数:35,代码来源:KalturaConditionArray.php

示例5: getInstanceByClass

 /**
  * @param string $class class name of the core object
  * @return KalturaEventCondition
  */
 public static function getInstanceByClass($class)
 {
     if ($class == kEventFieldCondition) {
         return new KalturaEventFieldCondition();
     }
     return KalturaPluginManager::loadObject('KalturaEventCondition', $class);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:KalturaEventCondition.php

示例6: getGeoCoder

 /**
  * @param int $type of enum geoCoderType
  * @return kGeoCoder
  */
 public static function getGeoCoder($type = null)
 {
     if (!$type || $type == geoCoderType::KALTURA) {
         return new myIPGeocoder();
     }
     return KalturaPluginManager::loadObject('kGeoCoder', $type);
 }
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:kGeoCoderManager.php

示例7: doFromObject

 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $dbObject kHttpNotificationDataText */
     parent::doFromObject($dbObject, $responseProfile);
     if ($this->shouldGet('content', $responseProfile)) {
         $contentType = get_class($dbObject->getContent());
         KalturaLog::debug("Loading KalturaStringValue from type [{$contentType}]");
         switch ($contentType) {
             case 'kStringValue':
                 $this->content = new KalturaStringValue();
                 break;
             case 'kEvalStringField':
                 $this->content = new KalturaEvalStringField();
                 break;
             default:
                 $this->content = KalturaPluginManager::loadObject('KalturaStringValue', $contentType);
                 break;
         }
         if ($this->content) {
             $this->content->fromObject($dbObject->getContent());
         }
     }
     if ($this->shouldGet('data', $responseProfile)) {
         $this->data = $dbObject->getData();
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:26,代码来源:KalturaHttpNotificationDataText.php

示例8: doFromObject

 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     parent::doFromObject($dbObject, $responseProfile);
     /* @var $dbObject kEmailNotificationCategoryRecipientProvider */
     $categoryIdFieldType = get_class($dbObject->getCategoryId());
     KalturaLog::info("Retrieving API object for categoryId fild of type [{$categoryIdFieldType}]");
     switch ($categoryIdFieldType) {
         case 'kObjectIdField':
             $this->categoryId = new KalturaObjectIdField();
             break;
         case 'kEvalStringField':
             $this->categoryId = new KalturaEvalStringField();
             break;
         case 'kStringValue':
             $this->categoryId = new KalturaStringValue();
             break;
         default:
             $this->categoryId = KalturaPluginManager::loadObject('KalturaStringValue', $categoryIdFieldType);
             break;
     }
     if ($this->categoryId) {
         $this->categoryId->fromObject($dbObject->getCategoryId());
     }
     if ($dbObject->getCategoryUserFilter()) {
         $this->categoryUserFilter = new KalturaCategoryUserProviderFilter();
         $this->categoryUserFilter->fromObject($dbObject->getCategoryUserFilter());
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:KalturaEmailNotificationCategoryRecipientProvider.php

示例9: constructJobData

 /**
  * Function constructs a core object of type kBulkUploadJobData
  * @param int $conversionProfileId
  * @param string $filePath
  * @param string $userId
  * @param int $bulkUploadType
  * @param string $uploadedBy
  * @param string $fileName
  * @throws KalturaErrors::CONVERSION_PROFILE_ID_NOT_FOUND
  */
 protected function constructJobData($filePath, $fileName, Partner $partner, $puserId, $uploadedBy, $conversionProfileId = null, $coreBulkUploadType = null)
 {
     $data = KalturaPluginManager::loadObject('kBulkUploadJobData', $coreBulkUploadType);
     if (is_null($data)) {
         throw new KalturaAPIException(KalturaErrors::BULK_UPLOAD_BULK_UPLOAD_TYPE_NOT_VALID, $coreBulkUploadType);
     }
     $data->setFilePath($filePath);
     $data->setUserId($puserId);
     $data->setUploadedBy($uploadedBy);
     $data->setFileName($fileName);
     if (!$conversionProfileId) {
         $conversionProfileId = $partner->getDefaultConversionProfileId();
     }
     $kmcVersion = $partner->getKmcVersion();
     $check = null;
     if ($kmcVersion < 2) {
         $check = ConversionProfilePeer::retrieveByPK($conversionProfileId);
     } else {
         $check = conversionProfile2Peer::retrieveByPK($conversionProfileId);
     }
     if (!$check) {
         throw new KalturaAPIException(KalturaErrors::CONVERSION_PROFILE_ID_NOT_FOUND, $conversionProfileId);
     }
     $objectData = new kBulkUploadEntryData();
     $objectData->setConversionProfileId($conversionProfileId);
     $data->setObjectData($objectData);
     return $data;
 }
开发者ID:DBezemer,项目名称:server,代码行数:38,代码来源:BulkUploadService.php

示例10: doFromObject

 public function doFromObject($dbData, KalturaDetachedResponseProfile $responseProfile = null)
 {
     /* @var $dbData kIndexJobData */
     $filter = $dbData->getFilter();
     $filterType = get_class($filter);
     switch ($filterType) {
         case 'entryFilter':
             $this->filter = new KalturaBaseEntryFilter();
             break;
         case 'categoryFilter':
             $this->filter = new KalturaCategoryFilter();
             break;
         case 'categoryEntryFilter':
             $this->filter = new KalturaCategoryEntryFilter();
             break;
         case 'categoryKuserFilter':
             $this->filter = new KalturaCategoryUserFilter();
             break;
         case 'kuserFilter':
             $this->filter = new KalturaUserFilter();
             break;
         default:
             $this->filter = KalturaPluginManager::loadObject('KalturaFilter', $filterType);
     }
     if ($this->filter) {
         $this->filter->fromObject($filter);
     }
     parent::doFromObject($dbData, $responseProfile);
 }
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:KalturaIndexJobData.php

示例11: getInstanceByType

 /**
  * @param int $type
  * @param bool $isAdmin
  * @return KalturaBaseEntry
  */
 static function getInstanceByType($type, $isAdmin = false)
 {
     switch ($type) {
         case KalturaEntryType::MEDIA_CLIP:
             $obj = new KalturaMediaEntry();
             break;
         case KalturaEntryType::MIX:
             $obj = new KalturaMixEntry();
             break;
         case KalturaEntryType::PLAYLIST:
             $obj = new KalturaPlaylist();
             break;
         case KalturaEntryType::DATA:
             $obj = new KalturaDataEntry();
             break;
         case KalturaEntryType::LIVE_STREAM:
             if ($isAdmin) {
                 $obj = new KalturaLiveStreamAdminEntry();
             } else {
                 $obj = new KalturaLiveStreamEntry();
             }
             break;
         case KalturaEntryType::LIVE_CHANNEL:
             $obj = new KalturaLiveChannel();
             break;
         default:
             $obj = KalturaPluginManager::loadObject('KalturaBaseEntry', $type);
             if (!$obj) {
                 $obj = new KalturaBaseEntry();
             }
             break;
     }
     return $obj;
 }
开发者ID:DBezemer,项目名称:server,代码行数:39,代码来源:KalturaEntryFactory.php

示例12: fromDbArray

 public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaEventNotificationParameterArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $parameterType = get_class($obj);
         switch ($parameterType) {
             case 'kEventNotificationParameter':
                 $nObj = new KalturaEventNotificationParameter();
                 break;
             case 'kEventNotificationArrayParameter':
                 $nObj = new KalturaEventNotificationArrayParameter();
                 break;
             default:
                 $nObj = KalturaPluginManager::loadObject('KalturaEventNotificationParameter', $parameterType);
         }
         if ($nObj) {
             $nObj->fromObject($obj, $responseProfile);
             $newArr[] = $nObj;
         }
     }
     return $newArr;
 }
开发者ID:DBezemer,项目名称:server,代码行数:25,代码来源:KalturaEventNotificationParameterArray.php

示例13: getInstanceByType

 /**
  * Function returns KalturaUserEntry sub-type according to protocol
  * @var string $type
  * @return KalturaUserEntry
  *
  */
 public static function getInstanceByType($type)
 {
     $obj = KalturaPluginManager::loadObject("KalturaUserEntry", $type);
     if (is_null($obj)) {
         KalturaLog::err("The type '{$type}' is unknown");
     }
     return $obj;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaUserEntry.php

示例14: getInstanceByType

 /**
  * @param int $type
  * @return KalturaDrmDevice
  */
 static function getInstanceByType($provider)
 {
     $obj = KalturaPluginManager::loadObject('KalturaDrmDevice', $provider);
     if (!$obj) {
         $obj = new KalturaDrmDevice();
     }
     return $obj;
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:KalturaDrmDevice.php

示例15: getInstance

 /**
  * @param int $objectType of enum KalturaRecalculateCacheType
  * @return KRecalculateCacheEngine
  */
 public static function getInstance($objectType)
 {
     switch ($objectType) {
         case KalturaRecalculateCacheType::RESPONSE_PROFILE:
             return new KRecalculateResponseProfileCacheEngine();
         default:
             return KalturaPluginManager::loadObject('KRecalculateCacheEngine', $objectType);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KRecalculateCacheEngine.php


注:本文中的KalturaPluginManager::loadObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。