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


PHP requestUtils::getRequestParams方法代码示例

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


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

示例1: KalturaFrontController

 private function KalturaFrontController()
 {
     $this->dispatcher = KalturaDispatcher::getInstance();
     $this->params = requestUtils::getRequestParams();
     $this->service = isset($this->params["service"]) ? $this->params["service"] : null;
     $this->action = isset($this->params["action"]) ? $this->params["action"] : null;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:7,代码来源:KalturaFrontController.php

示例2: getLicenseAction

 /**
  * Get license for encrypted content playback
  * 
  * @action getLicense
  * @param string $flavorAssetId
  * @param string $referrer 64base encoded  
  * @return string $response
  * 
  */
 public function getLicenseAction($flavorAssetId, $referrer = null)
 {
     KalturaResponseCacher::disableCache();
     KalturaLog::debug('get license for flavor asset: ' . $flavorAssetId);
     try {
         $requestParams = requestUtils::getRequestParams();
         if (!array_key_exists(WidevineLicenseProxyUtils::ASSETID, $requestParams)) {
             KalturaLog::err('assetid is missing on the request');
             return WidevineLicenseProxyUtils::createErrorResponse(KalturaWidevineErrorCodes::WIDEVINE_ASSET_ID_CANNOT_BE_NULL, 0);
         }
         $wvAssetId = $requestParams[WidevineLicenseProxyUtils::ASSETID];
         $this->validateLicenseRequest($flavorAssetId, $wvAssetId, $referrer);
         $privileges = null;
         $isAdmin = false;
         if (kCurrentContext::$ks_object) {
             $privileges = kCurrentContext::$ks_object->getPrivileges();
             $isAdmin = kCurrentContext::$ks_object->isAdmin();
         }
         $response = WidevineLicenseProxyUtils::sendLicenseRequest($requestParams, $privileges, $isAdmin);
     } catch (KalturaWidevineLicenseProxyException $e) {
         KalturaLog::err($e);
         $response = WidevineLicenseProxyUtils::createErrorResponse($e->getWvErrorCode(), $wvAssetId);
     } catch (Exception $e) {
         KalturaLog::err($e);
         $response = WidevineLicenseProxyUtils::createErrorResponse(KalturaWidevineErrorCodes::GENERAL_ERROR, $wvAssetId);
     }
     WidevineLicenseProxyUtils::printLicenseResponseStatus($response);
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:38,代码来源:WidevineDrmService.php

示例3: KalturaFrontController

 private function KalturaFrontController()
 {
     $this->dispatcher = KalturaDispatcher::getInstance();
     $this->params = requestUtils::getRequestParams();
     $this->service = isset($this->params["service"]) ? (string) $this->params["service"] : null;
     $this->action = isset($this->params["action"]) ? (string) $this->params["action"] : null;
     kCurrentContext::$serializeCallback = array($this, 'serialize');
 }
开发者ID:panigh,项目名称:server,代码行数:8,代码来源:KalturaFrontController.php

示例4: serialize

 public function serialize($object)
 {
     if (is_object($object) && $object instanceof Exception) {
         $assetid = 0;
         $requestParams = requestUtils::getRequestParams();
         if (array_key_exists(WidevineLicenseProxyUtils::ASSETID, $requestParams)) {
             $assetid = $requestParams[WidevineLicenseProxyUtils::ASSETID];
         }
         $object = WidevineLicenseProxyUtils::createErrorResponse(KalturaWidevineErrorCodes::GENERAL_ERROR, $assetid);
     }
     return $object;
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:KalturaWidevineSerializer.php

示例5: __construct

 public function __construct()
 {
     $this->_cacheKeyPrefix = 'playManifest-';
     parent::__construct();
     if (!kConf::get('enable_cache')) {
         return;
     }
     $this->_params = requestUtils::getRequestParams();
     if (isset($this->_params['nocache'])) {
         return;
     }
     $this->calculateCacheKey();
     $this->enableCache();
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:14,代码来源:kPlayManifestCacher.php

示例6: __construct

 public function __construct($params = null, $cacheDirectory = null, $expiry = 0)
 {
     self::$_useCache = kConf::get('enable_cache');
     if ($expiry) {
         $this->_expiry = $expiry;
     }
     $this->_cacheDirectory = $cacheDirectory ? $cacheDirectory : rtrim(kConf::get('response_cache_dir'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
     $this->_cacheDirectory .= "cache_v3-" . $this->_expiry . DIRECTORY_SEPARATOR;
     if (!self::$_useCache) {
         return;
     }
     if (!$params) {
         $params = requestUtils::getRequestParams();
     }
     foreach (kConf::get('v3cache_ignore_params') as $name) {
         unset($params[$name]);
     }
     // check the clientTag parameter for a cache start time (cache_st:<time>) directive
     if (isset($params['clientTag'])) {
         $clientTag = $params['clientTag'];
         $matches = null;
         if (preg_match("/cache_st:(\\d+)/", $clientTag, $matches)) {
             if ($matches[1] > time()) {
                 self::$_useCache = false;
                 return;
             }
         }
     }
     $isAdminLogin = isset($params['service']) && isset($params['action']) && $params['service'] == 'adminuser' && $params['action'] == 'login';
     if ($isAdminLogin || isset($params['nocache'])) {
         self::$_useCache = false;
         return;
     }
     $ks = isset($params['ks']) ? $params['ks'] : '';
     foreach ($params as $key => $value) {
         if (preg_match('/[\\d]+:ks/', $key)) {
             $ks = $value;
             unset($params[$key]);
         }
     }
     unset($params['ks']);
     unset($params['kalsig']);
     unset($params['clientTag']);
     $this->_params = $params;
     $this->setKS($ks);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:46,代码来源:KalturaResponseCacher.php

示例7: ini_set

}
ini_set("memory_limit", "256M");
$start = microtime(true);
set_time_limit(0);
// check cache before loading anything
require_once __DIR__ . "/../lib/KalturaResponseCacher.php";
$expiry = kConf::hasParam("v3cache_getfeed_default_expiry") ? kConf::get("v3cache_getfeed_default_expiry") : 86400;
$cache = new KalturaResponseCacher(null, kCacheManager::CACHE_TYPE_API_V3_FEED, $expiry);
$cache->checkOrStart();
ob_start();
// Database
DbManager::setConfig(kConf::getDB());
DbManager::initialize();
KalturaLog::debug(">------------------------------------- syndicationFeedRenderer -------------------------------------");
KalturaLog::info("syndicationFeedRenderer-start ");
KalturaLog::debug("getFeed Params [" . print_r(requestUtils::getRequestParams(), true) . "]");
kCurrentContext::$host = isset($_SERVER["HOSTNAME"]) ? $_SERVER["HOSTNAME"] : null;
kCurrentContext::$user_ip = requestUtils::getRemoteAddress();
kCurrentContext::$ps_vesion = "ps3";
$feedId = getRequestParameter('feedId');
$entryId = getRequestParameter('entryId');
$limit = getRequestParameter('limit');
$ks = getRequestParameter('ks');
$feedProcessingKey = "feedProcessing_{$feedId}_{$entryId}_{$limit}";
if (function_exists('apc_fetch')) {
    if (apc_fetch($feedProcessingKey)) {
        KExternalErrors::dieError(KExternalErrors::PROCESSING_FEED_REQUEST);
    }
}
try {
    $syndicationFeedRenderer = new KalturaSyndicationFeedRenderer($feedId, $feedProcessingKey, $ks);
开发者ID:kubrickfr,项目名称:server,代码行数:31,代码来源:getFeed.php

示例8: __construct

 public function __construct($params = null, $cacheType = kCacheManager::FS_API_V3, $expiry = 0)
 {
     $this->_cacheKeyPrefix = 'cache_v3-';
     parent::__construct();
     if ($expiry) {
         $this->_defaultExpiry = $this->_expiry = $expiry;
     }
     if (!kConf::get('enable_cache')) {
         return;
     }
     if (!$params) {
         $params = requestUtils::getRequestParams();
     }
     self::handleSessionStart($params);
     foreach (kConf::get('v3cache_ignore_params') as $name) {
         unset($params[$name]);
     }
     // check the clientTag parameter for a cache start time (cache_st:<time>) directive
     if (isset($params['clientTag'])) {
         $clientTag = $params['clientTag'];
         $matches = null;
         if (preg_match("/cache_st:(\\d+)/", $clientTag, $matches)) {
             if ($matches[1] > time()) {
                 self::disableCache();
                 return;
             }
         }
     }
     if (isset($params['nocache'])) {
         self::disableCache();
         return;
     }
     $this->_cacheStore = kCacheManager::getCache($cacheType);
     if (!$this->_cacheStore) {
         self::disableCache();
         return;
     }
     $ks = isset($params['ks']) ? $params['ks'] : '';
     foreach ($params as $key => $value) {
         if (!preg_match('/[\\d]+:ks/', $key)) {
             continue;
         }
         // not a ks
         if (strpos($value, ':result') !== false) {
             continue;
         }
         // the ks is the result of some sub request
         if ($ks && $ks != $value) {
             self::disableCache();
             // several different ks's in a multirequest - don't use cache
             return;
         }
         $ks = $value;
         unset($params[$key]);
     }
     unset($params['ks']);
     unset($params['kalsig']);
     unset($params['clientTag']);
     unset($params['callback']);
     $this->_params = $params;
     $this->setKS($ks);
     $this->enableCache();
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:63,代码来源:KalturaResponseCacher.php

示例9: getTokenizedManifestUrl

 /**
  * @param string $format
  * @param string $fileName
  * @return string
  */
 private function getTokenizedManifestUrl($format, $fileName)
 {
     $params = requestUtils::getRequestParams();
     $params['format'] = $format;
     $excludeList = array('kt', 'ks', 'referrer', 'extwidget', 'a');
     foreach ($excludeList as $excludedParam) {
         unset($params[$excludedParam]);
     }
     if ($this->clipTo) {
         $params['clipTo'] = $this->clipTo;
     }
     // in order to enforce preview access control
     $params = $this->convertToShortNames($params);
     $partnerId = $this->entry->getPartnerId();
     $url = "/p/{$partnerId}/playManifest/kt/" . self::KALTURA_TOKEN_MARKER;
     foreach ($params as $key => $value) {
         $url .= "/{$key}/{$value}";
     }
     $url .= "/{$fileName}";
     return self::calculateKalturaToken($url);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:26,代码来源:playManifestAction.class.php


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