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


PHP KalturaPluginManager::getPluginInstances方法代码示例

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


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

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

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

示例3: _loadTranslationData

 protected function _loadTranslationData($data, $locale, array $options = array())
 {
     $translate = parent::_loadTranslationData($data, $locale, $options);
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaApplicationTranslations');
     foreach ($pluginInstances as $pluginInstance) {
         /* @var $pluginInstance IKalturaApplicationTranslations */
         $translations = $pluginInstance->getTranslations($locale);
         $translate = array_merge_recursive($translate, $translations);
     }
     return $translate;
 }
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:TranslateAdapter.php

示例4: create

 /**
  * Creates a new KalturaCriteria for the given object name
  * 
  * @param string $objectType object type to create Criteria for.
  * @return KalturaCriteria derived object
  */
 public static function create($objectType)
 {
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaCriteriaFactory');
     foreach ($pluginInstances as $pluginInstance) {
         $criteria = $pluginInstance->getKalturaCriteria($objectType);
         if ($criteria) {
             return $criteria;
         }
     }
     return new KalturaCriteria();
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:17,代码来源:KalturaCriteria.php

示例5: doAction

 public function doAction(Zend_Controller_Action $action)
 {
     $action->getHelper('layout')->disableLayout();
     $request = $action->getRequest();
     $drmProfileId = $this->_getParam('drm_profile_id');
     $partnerId = $this->_getParam('new_partner_id');
     $drmProfileProvider = $this->_getParam('new_drm_profile_provider');
     $drmProfileForm = null;
     $action->view->formValid = false;
     try {
         if ($request->isPost()) {
             $partnerId = $this->_getParam('partnerId');
             $drmProfileProvider = $this->_getParam('provider');
             $drmProfileForm = new Form_DrmProfileConfigure($partnerId, $drmProfileProvider);
             $action->view->formValid = $this->processForm($drmProfileForm, $request->getPost(), $partnerId, $drmProfileId);
             if (!is_null($drmProfileId)) {
                 $drmProfile = $drmProfileForm->getObject("Kaltura_Client_Drm_Type_DrmProfile", $request->getPost(), false, true);
             }
         } else {
             if (!is_null($drmProfileId)) {
                 $client = Infra_ClientHelper::getClient();
                 $drmPluginClient = Kaltura_Client_Drm_Plugin::get($client);
                 $drmProfile = $drmPluginClient->drmProfile->get($drmProfileId);
                 $partnerId = $drmProfile->partnerId;
                 $drmProfileProvider = $drmProfile->provider;
                 $drmProfileForm = new Form_DrmProfileConfigure($partnerId, $drmProfileProvider);
                 $drmProfileForm->populateFromObject($drmProfile, false);
             } else {
                 $drmProfileForm = new Form_DrmProfileConfigure($partnerId, $drmProfileProvider);
                 $drmProfileForm->getElement('partnerId')->setValue($partnerId);
             }
         }
     } catch (Exception $e) {
         $action->view->formValid = false;
         KalturaLog::err($e->getMessage() . "\n" . $e->getTraceAsString());
         $action->view->errMessage = $e->getMessage();
     }
     $action->view->form = $drmProfileForm;
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaApplicationPartialView');
     KalturaLog::debug("plugin instances [" . count($pluginInstances) . "]");
     foreach ($pluginInstances as $pluginInstance) {
         $drmProfilePlugins = $pluginInstance->getApplicationPartialViews('plugin', get_class($this));
         if (!$drmProfilePlugins) {
             continue;
         }
         foreach ($drmProfilePlugins as $plugin) {
             /* @var $plugin Kaltura_View_Helper_PartialViewPlugin */
             $plugin->plug($action->view);
         }
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:51,代码来源:DrmProfileConfigureAction.php

示例6: _initNavigation

 protected function _initNavigation()
 {
     $this->bootstrap('layout');
     $this->bootstrap('acl');
     $layout = $this->getResource('layout');
     $view = $layout->getView();
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml');
     $navigation = new Zend_Navigation($config);
     $additionalNavigation = Zend_Registry::get('config')->navigation;
     $menu = $additionalNavigation->monitoring;
     $subMenu = $menu->enableDisable;
     $target = '';
     if ($subMenu->target) {
         $target = $subMenu->target;
     }
     $navigation->addPage(array('label' => $subMenu->label, 'uri' => $subMenu->uri, 'target' => $target));
     $menuPage = $navigation->findOneBy('label', 'Monitoring');
     $subMenuPage = $navigation->findOneBy('label', $subMenu->label);
     $subMenuPage->setParent($menuPage);
     $pluginAdminConsolePages = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaAdminConsolePages');
     foreach ($pluginInstances as $pluginInstance) {
         foreach ($pluginInstance->getAdminConsolePages() as $pluginAdminConsolePage) {
             $pluginAdminConsolePages[] = $pluginAdminConsolePage;
         }
     }
     foreach ($pluginAdminConsolePages as $pluginAdminConsolePage) {
         if (!$pluginAdminConsolePage instanceof KalturaAdminConsolePlugin) {
             continue;
         }
         if (!$pluginAdminConsolePage->accessCheck(Kaltura_AclHelper::getCurrentPermissions())) {
             continue;
         }
         $navigation->addPage(array('label' => $pluginAdminConsolePage->getNavigationActionLabel(), 'controller' => 'plugin', 'action' => get_class($pluginAdminConsolePage)));
         $subMenuPage = $navigation->findOneBy('label', $pluginAdminConsolePage->getNavigationActionLabel());
         $menuPage = null;
         if ($pluginAdminConsolePage->getNavigationRootLabel()) {
             $menuPage = $navigation->findOneBy('label', $pluginAdminConsolePage->getNavigationRootLabel());
             if (!$menuPage) {
                 $navigation->addPage(array('label' => $pluginAdminConsolePage->getNavigationRootLabel(), 'controller' => 'plugin', 'action' => get_class($pluginAdminConsolePage)));
                 $menuPage = $navigation->findOneBy('label', $pluginAdminConsolePage->getNavigationRootLabel());
             }
         }
         if ($menuPage) {
             $subMenuPage->setParent($menuPage);
         }
     }
     $this->checkAclForNavigation($navigation);
     $view->navigation($navigation);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:50,代码来源:Bootstrap.php

示例7: initialize

 public static function initialize()
 {
     $dbConfigs = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaDatabaseConfig');
     foreach ($pluginInstances as $pluginInstance) {
         $dbConfigs[] = $pluginInstance->getDatabaseConfig();
     }
     foreach ($dbConfigs as $dbConfig) {
         self::addExtraConfiguration($dbConfig);
     }
     Propel::setConfiguration(self::$config);
     Propel::setLogger(KalturaLog::getInstance());
     Propel::initialize();
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:14,代码来源:DbManager.php

示例8: clearMemory

 public static function clearMemory()
 {
     foreach (self::$peerNames as $peerName => $dontCare) {
         call_user_func(array($peerName, 'clearInstancePool'));
     }
     self::$peerNames = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaMemoryCleaner');
     foreach ($pluginInstances as $pluginInstance) {
         $pluginInstance->cleanMemory();
     }
     if (function_exists('gc_collect_cycles')) {
         // php 5.3 and above
         gc_collect_cycles();
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:15,代码来源:kMemoryManager.php

示例9: mergeDescriptions

 public static function mergeDescriptions($baseEnumName, array $descriptions)
 {
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaEnumerator');
     foreach ($pluginInstances as $pluginInstance) {
         $pluginName = $pluginInstance->getPluginName();
         $enums = $pluginInstance->getEnums($baseEnumName);
         foreach ($enums as $enum) {
             $additionalDescriptions = $enum::getAdditionalDescriptions();
             foreach ($additionalDescriptions as $key => $description) {
                 $descriptions[$key] = $description;
             }
         }
     }
     return $descriptions;
 }
开发者ID:DBezemer,项目名称:server,代码行数:15,代码来源:KalturaDynamicEnum.php

示例10: __construct

 public function __construct($file_name, $service_name = null, $load_plugins = true, $useDefualt = true)
 {
     KalturaServiceConfig::setStrictMode(false);
     if ($load_plugins) {
         $serviceConfigs = array();
         $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaServices');
         foreach ($pluginInstances as $pluginInstance) {
             $serviceConfigs[] = $pluginInstance->getServiceConfig();
         }
         foreach ($serviceConfigs as $serviceConfig) {
             KalturaServiceConfig::addSecondaryConfigTables($serviceConfig);
         }
     }
     parent::myServiceConfig($file_name, $service_name, $useDefualt);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:15,代码来源:KalturaServiceConfig.php

示例11: contributeDistribution

 /**
  * @param EntryDistribution $entryDistribution
  * @param SimpleXMLElement $xmlElement
  * @return SimpleXMLElement
  */
 public function contributeDistribution(EntryDistribution $entryDistribution, SimpleXMLElement $mrss)
 {
     $distributionsProvider = null;
     $distributionsProfile = DistributionProfilePeer::retrieveByPK($entryDistribution->getDistributionProfileId());
     if ($distributionsProfile) {
         $distributionsProvider = $distributionsProfile->getProvider();
     }
     $distribution = $mrss->addChild('distribution');
     $distribution->addAttribute('entryDistributionId', $entryDistribution->getId());
     $distribution->addAttribute('distributionProfileId', $entryDistribution->getDistributionProfileId());
     $distribution->addAttribute('lastReport', $entryDistribution->getLastReport(null));
     if ($distributionsProvider) {
         $distribution->addAttribute('provider', $distributionsProvider->getName());
         if ($distributionsProvider->getType() == DistributionProviderType::GENERIC) {
             $distribution->addAttribute('distributionProviderId', $distributionsProvider->getId());
         } elseif ($distributionsProvider->getType() == DistributionProviderType::SYNDICATION) {
             if ($distributionsProfile instanceof SyndicationDistributionProfile) {
                 $distribution->addAttribute('feedId', $distributionsProfile->getFeedId());
             }
         } else {
             $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaContentDistributionProvider');
             foreach ($pluginInstances as $pluginInstance) {
                 if ($pluginInstance->getProvider() === $distributionsProvider) {
                     $pluginInstance->contributeMRSS($entryDistribution, $distribution);
                 }
             }
         }
     }
     if ($entryDistribution->getRemoteId()) {
         $distribution->addChild('remoteId', $entryDistribution->getRemoteId());
     }
     if ($entryDistribution->getSunrise(null)) {
         $distribution->addChild('sunrise', $entryDistribution->getSunrise(null));
     }
     if ($entryDistribution->getSunset(null)) {
         $distribution->addChild('sunset', $entryDistribution->getSunset(null));
     }
     $flavorAssetIds = explode(',', $entryDistribution->getFlavorAssetIds());
     $flavorAssetIdsNode = $distribution->addChild('flavorAssetIds');
     foreach ($flavorAssetIds as $flavorAssetId) {
         $flavorAssetIdsNode->addChild('flavorAssetId', $flavorAssetId);
     }
     $thumbAssetIds = explode(',', $entryDistribution->getThumbAssetIds());
     $thumbAssetIdsNode = $distribution->addChild('thumbAssetIds');
     foreach ($thumbAssetIds as $thumbAssetId) {
         $thumbAssetIdsNode->addChild('thumbAssetId', $thumbAssetId);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:53,代码来源:kContentDistributionMrssManager.php

示例12: loadConsumers

 protected static function loadConsumers()
 {
     $cachePath = kConf::get('cache_root_path') . '/EventConsumers.cache';
     if (file_exists($cachePath)) {
         self::$consumers = unserialize(file_get_contents($cachePath));
         return;
     }
     $coreConsumers = kConf::get('event_consumers');
     $pluginConsumers = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaEventConsumers');
     foreach ($pluginInstances as $pluginInstance) {
         foreach ($pluginInstance->getEventConsumers() as $pluginConsumer) {
             $pluginConsumers[] = $pluginConsumer;
         }
     }
     $consumers = array_merge($coreConsumers, $pluginConsumers);
     $consumersLists = array();
     foreach ($consumers as $consumer) {
         if (!class_exists($consumer)) {
             continue;
         }
         $clazz = new ReflectionClass($consumer);
         $interfaces = $clazz->getInterfaces();
         foreach ($interfaces as $interface) {
             if ($interface->name == self::BASE_CONSUMER_INTERFACE) {
                 continue;
             }
             if (!$interface->implementsInterface(self::BASE_CONSUMER_INTERFACE)) {
                 continue;
             }
             if (!isset($consumersLists[$interface->name])) {
                 $consumersLists[$interface->name] = array();
             }
             $consumersLists[$interface->name][] = $consumer;
         }
     }
     foreach ($consumersLists as $interfaceName => $interfaceConsumersArray) {
         usort($interfaceConsumersArray, array('kEventsManager', 'compareConsumers'));
         self::$consumers[$interfaceName] = $interfaceConsumersArray;
     }
     $cacheDir = dirname($cachePath);
     if (!file_exists($cacheDir)) {
         kFile::fullMkfileDir($cacheDir, 0777, true);
     }
     @file_put_contents($cachePath, serialize(self::$consumers));
 }
开发者ID:kubrickfr,项目名称:server,代码行数:46,代码来源:kEventsManager.php

示例13: mergeDescriptions

 public static function mergeDescriptions($baseEnumName, array $descriptions)
 {
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaEnumerator');
     foreach ($pluginInstances as $pluginInstance) {
         $pluginName = $pluginInstance->getPluginName();
         $enums = $pluginInstance->getEnums($baseEnumName);
         foreach ($enums as $enum) {
             // TODO remove call_user_func after moving to php 5.3
             $additionalDescriptions = call_user_func(array($enum, 'getAdditionalDescriptions'));
             // $additionalDescriptions = $enum::getAdditionalDescriptions();
             foreach ($additionalDescriptions as $key => $description) {
                 $descriptions[$key] = $description;
             }
         }
     }
     return $descriptions;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:17,代码来源:KalturaDynamicEnum.php

示例14: getExtraDatabaseConfigs

 protected static function getExtraDatabaseConfigs()
 {
     if (function_exists('apc_fetch')) {
         $dbConfigs = apc_fetch(self::EXTRA_DB_CONFIG_KEY);
         if ($dbConfigs !== false) {
             return $dbConfigs;
         }
     }
     $dbConfigs = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaDatabaseConfig');
     foreach ($pluginInstances as $pluginInstance) {
         $dbConfigs[] = $pluginInstance->getDatabaseConfig();
     }
     if (function_exists('apc_store')) {
         apc_store(self::EXTRA_DB_CONFIG_KEY, $dbConfigs);
     }
     return $dbConfigs;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:18,代码来源:DbManager.php

示例15: cacheMap

 static function cacheMap($servicePath, $cacheFilePath)
 {
     if (!is_dir($servicePath)) {
         throw new Exception('Invalid directory [' . $servicePath . ']');
     }
     $servicePath = realpath($servicePath);
     $serviceMap = array();
     $classMap = KAutoloader::getClassMap();
     $checkedClasses = array();
     foreach ($classMap as $class => $classFilePath) {
         $classFilePath = realpath($classFilePath);
         if (strpos($classFilePath, $servicePath) === 0) {
             $reflectionClass = new ReflectionClass($class);
             if ($reflectionClass->isSubclassOf('KalturaBaseService')) {
                 $docComment = $reflectionClass->getDocComment();
                 $parser = new KalturaDocCommentParser($docComment);
                 $serviceId = strtolower($parser->serviceName);
                 $serviceMap[$serviceId] = $class;
             }
         }
         $checkedClasses[] = $class;
     }
     $pluginServices = array();
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaServices');
     foreach ($pluginInstances as $pluginName => $pluginInstance) {
         $pluginServices = $pluginInstance->getServicesMap();
         foreach ($pluginServices as $serviceName => $serviceClass) {
             $serviceName = strtolower($serviceName);
             $serviceId = "{$pluginName}_{$serviceName}";
             $pluginServices[$serviceId] = $serviceClass;
             $serviceMap[$serviceId] = $serviceClass;
         }
     }
     $cachedFile = '';
     $cachedFile .= '<?php' . PHP_EOL;
     $cachedFile .= 'self::$services = ' . var_export($serviceMap, true) . ';' . PHP_EOL;
     if (!is_dir(dirname($cacheFilePath))) {
         mkdir(dirname($cacheFilePath), 0777);
     }
     file_put_contents($cacheFilePath, $cachedFile);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:41,代码来源:KalturaServicesMap.php


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