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


PHP KalturaPluginManager类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: listAction

 /**
  * List all distribution providers
  * 
  * @action list
  * @param KalturaDistributionProviderFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaDistributionProviderListResponse
  */
 function listAction(KalturaDistributionProviderFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaDistributionProviderFilter();
     }
     $c = new Criteria();
     if ($filter instanceof KalturaGenericDistributionProviderFilter) {
         $genericDistributionProviderFilter = new GenericDistributionProviderFilter();
         $filter->toObject($genericDistributionProviderFilter);
         $genericDistributionProviderFilter->attachToCriteria($c);
     }
     $count = GenericDistributionProviderPeer::doCount($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $list = GenericDistributionProviderPeer::doSelect($c);
     $response = new KalturaDistributionProviderListResponse();
     $response->objects = KalturaDistributionProviderArray::fromDbArray($list, $this->getResponseProfile());
     $response->totalCount = $count;
     $syndicationProvider = new KalturaSyndicationDistributionProvider();
     $syndicationProvider->fromObject(SyndicationDistributionProvider::get());
     $response->objects[] = $syndicationProvider;
     $response->totalCount++;
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaContentDistributionProvider');
     foreach ($pluginInstances as $pluginInstance) {
         $provider = $pluginInstance->getKalturaProvider();
         if ($provider) {
             $response->objects[] = $provider;
             $response->totalCount++;
         }
     }
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:42,代码来源:DistributionProviderService.php

示例10: 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

示例11: 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

示例12: 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

示例13: getMrssContributors

 /**
  * @return array<IKalturaMrssContributor>
  */
 public static function getMrssContributors()
 {
     if (self::$mrssContributors) {
         return self::$mrssContributors;
     }
     self::$mrssContributors = KalturaPluginManager::getPluginInstances('IKalturaMrssContributor');
     return self::$mrssContributors;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:11,代码来源:kMrssManager.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: 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


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