本文整理汇总了PHP中requestUtils类的典型用法代码示例。如果您正苦于以下问题:PHP requestUtils类的具体用法?PHP requestUtils怎么用?PHP requestUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了requestUtils类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: array
/**
return array('status' => $status, 'message' => $message, 'objects' => $objects);
objects - array of
'thumb'
'title'
'description'
'id' - unique id to be passed to getMediaInfo
*/
public function searchMedia($media_type, $searchText, $page, $pageSize, $authData = null, $extraData = null)
{
$status = "ok";
$message = '';
$objects = array();
@(list($searchTerm, $requestedPageSize, $numResults, $repeatOldResults) = explode(",", $searchText));
if ($requestedPageSize > 0) {
$pageSize = $requestedPageSize;
}
$already_returned = ($page - 1) * $pageSize;
$num_of_entries_to_return = min($pageSize, $numResults - $already_returned);
$i = 0;
for ($i = 0; $i < $num_of_entries_to_return; ++$i) {
$host_num = 1 + $i % 7;
$host = requestUtils::getHost();
$url = "{$host}/qa/images.php?id=";
$id = ($page - 1) * $pageSize + $i;
if ($repeatOldResults > 0) {
$id = $id % $repeatOldResults;
}
$id = 1 + $id;
// do we want it to be 0-based or 1-based ??
$playback = $i % 2 ? "none" : "";
$object = array("id" => "id-{$id}", "thumb" => $url . $id, "tags" => "tags-{$id}, {$searchTerm}", "title" => "title-{$id}", "description" => "description-{$id}", "flash_playback_type" => $playback);
$objects[] = $object;
}
return array('status' => $status, 'message' => $message, 'objects' => $objects);
}
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:myKalturaQaServices.class.php
示例3: execute
public function execute()
{
$this->getResponse()->setHttpHeader("Content-Type", "application/x-javascript");
$kshow_id = $this->getRequestParameter('kshow_id', 0);
$uid = kuser::ANONYMOUS_PUSER_ID;
$kshow = kshowPeer::retrieveByPK($kshow_id);
if (!$kshow) {
return sfView::ERROR;
}
// kshow_id might be a string (something like "15483str") but it will be returned using retriveByPK anyways
// lets make sure we pass just the id to the contribution wizard
$kshow_id = $kshow->getId();
$partner_id = $kshow->getPartnerId();
$partner = PartnerPeer::retrieveByPK($partner_id);
$subp_id = $kshow->getSubpId();
$partner_secret = $partner->getSecret();
$partner_name = $partner->getPartnerName();
$kaltura_services = new startsessionAction();
$kaltura_services->setInputParams(array("format" => kalturaWebserviceRenderer::RESPONSE_TYPE_PHP_ARRAY, "partner_id" => $partner_id, "subp_id" => $subp_id, "uid" => $uid, "secret" => $partner_secret));
$result = $kaltura_services->internalExecute();
$this->ks = @$result["result"]["ks"];
$this->widget_host = requestUtils::getHost();
$this->kshow_id = $kshow_id;
$this->uid = $uid;
$this->partner_id = $partner_id;
$this->subp_id = $subp_id;
$this->partner_name = $partner_name;
return sfView::SUCCESS;
}
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:contributionWidgetJSAction.class.php
示例4: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$limit = $this->getP("page_size", 20);
$limit = min($limit, 100);
$page = $this->getP("page", 1);
$offset = ($page - 1) * $limit;
$c = new Criteria();
$c->addAnd(BatchJobPeer::PARTNER_ID, $partner_id);
$c->addAnd(BatchJobPeer::JOB_TYPE, BatchJobType::BULKUPLOAD);
$c->addDescendingOrderByColumn(BatchJobPeer::ID);
$count = BatchJobPeer::doCount($c);
$c->setLimit($limit);
$c->setOffset($offset);
$jobs = BatchJobPeer::doSelect($c);
$obj = array();
foreach ($jobs as $job) {
$jobData = $job->getData();
if (!$jobData instanceof kBulkUploadJobData) {
continue;
}
$bulkResults = BulkUploadResultPeer::retrieveWithEntryByBulkUploadId($job->getId());
$obj[] = array("uploadedBy" => $jobData->getUploadedBy(), "uploadedOn" => $job->getCreatedAt(null), "numOfEntries" => count($bulkResults), "status" => $job->getStatus(), "error" => $job->getStatus() == BatchJob::BATCHJOB_STATUS_FAILED ? $job->getMessage() : '', "logFileUrl" => requestUtils::getCdnHost() . "/index.php/extwidget/bulkuploadfile/id/{$job->getId()}/pid/{$job->getPartnerId()}/type/log", "csvFileUrl" => requestUtils::getCdnHost() . "/index.php/extwidget/bulkuploadfile/id/{$job->getId()}/pid/{$job->getPartnerId()}/type/csv");
}
$this->addMsg("count", $count);
$this->addMsg("page_size", $limit);
$this->addMsg("page", $page);
$this->addMsg("bulk_uploads", $obj);
}
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:listbulkuploadsAction.class.php
示例5: __construct
public function __construct()
{
$this->setIp(requestUtils::getRemoteAddress());
$this->setReferrer(isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : null);
$this->setUserAgent(isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null);
$this->setKs(kCurrentContext::$ks_object ? kCurrentContext::$ks_object : null);
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:kScope.php
示例6: execute
/**
* Will forward to the uploader swf according to the ui_conf_id
*/
public function execute()
{
$ui_conf_id = $this->getRequestParameter("ui_conf_id");
$uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
if (!$uiConf) {
die;
}
$partner_id = $uiConf->getPartnerId();
$subp_id = $uiConf->getSubpId();
$host = requestUtils::getRequestHost();
$ui_conf_swf_url = $uiConf->getSwfUrl();
if (!$ui_conf_swf_url) {
die;
}
if (kString::beginsWith($ui_conf_swf_url, "http")) {
$swf_url = $ui_conf_swf_url;
// absolute URL
} else {
$use_cdn = $uiConf->getUseCdn();
$cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
$swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
// relative to the current host
}
$conf_vars = $uiConf->getConfVars();
if ($conf_vars) {
$conf_vars = "&" . $conf_vars;
}
$params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
$this->redirect("{$swf_url}?{$params}");
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:kuploadAction.class.php
示例7: execute
/**
* Will forward to the uploader swf according to the ui_conf_id
*/
public function execute()
{
$ui_conf_id = $this->getRequestParameter("ui_conf_id");
$uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
if (!$uiConf) {
KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
}
$partner_id = $uiConf->getPartnerId();
$subp_id = $uiConf->getSubpId();
$host = requestUtils::getRequestHost();
$ui_conf_swf_url = $uiConf->getSwfUrl();
if (!$ui_conf_swf_url) {
KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
}
if (kString::beginsWith($ui_conf_swf_url, "http")) {
$swf_url = $ui_conf_swf_url;
// absolute URL
} else {
$use_cdn = $uiConf->getUseCdn();
$cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
$swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
// relative to the current host
}
$conf_vars = $uiConf->getConfVars();
if ($conf_vars) {
$conf_vars = "&" . $conf_vars;
}
$params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
KExternalErrors::terminateDispatch();
$this->redirect("{$swf_url}?{$params}");
}
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php
示例8: 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
示例9: dieError
public static function dieError($errorCode, $message = null)
{
$description = self::$errorDescriptionMap[$errorCode];
$args = func_get_args();
if (count($args) > 1) {
array_shift($args);
$description = @call_user_func_array('sprintf', array_merge(array($description), $args));
}
if ($message) {
$description .= ", {$message}";
}
KalturaLog::err("exiting on error {$errorCode} - {$description}");
$headers = array();
if (self::$responseCode) {
$headers[] = self::$errorCodeMap[self::$responseCode];
}
$headers[] = "X-Kaltura-App: exiting on error {$errorCode} - {$description}";
foreach ($headers as $header) {
header($header);
}
header("X-Kaltura:error-{$errorCode}");
$headers[] = "X-Kaltura:cached-error-{$errorCode}";
self::terminateDispatch();
if ($errorCode != self::ACCESS_CONTROL_RESTRICTED && $errorCode != self::IP_COUNTRY_BLOCKED && $_SERVER["REQUEST_METHOD"] == "GET") {
requestUtils::sendCachingHeaders(self::CACHE_EXPIRY, true, time());
if (function_exists('apc_store')) {
$protocol = infraRequestUtils::getProtocol();
$host = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'];
$uri = $_SERVER["REQUEST_URI"];
apc_store("exterror-{$protocol}://{$host}{$uri}", $headers, self::CACHE_EXPIRY);
}
}
die;
}
开发者ID:AdiTal,项目名称:server,代码行数:34,代码来源:KExternalErrors.class.php
示例10: 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
示例11: saveAsNewUploadToken
/**
* Set default values and save the new upload token
*/
public function saveAsNewUploadToken()
{
$this->_uploadToken->setStatus(UploadToken::UPLOAD_TOKEN_PENDING);
$this->_uploadToken->setUploadedFileSize(null);
$this->_uploadToken->setUploadTempPath(null);
$this->_uploadToken->setUserIp(requestUtils::getRemoteAddress());
$this->_uploadToken->setDc(kDataCenterMgr::getCurrentDcId());
$this->_uploadToken->save();
}
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:kUploadTokenMgr.php
示例12: createSelect
function createSelect($id, $name, $default_value, $list_name)
{
$prefix = "partner_";
$host = requestUtils::getHost();
// TODO - all static lists should move out of this function !!
if (strpos($host, "localhost") != false) {
$limited = false;
} else {
if (strpos($host, "kaldev") !== false) {
$limited = false;
} else {
$limited = true;
}
}
//global $arrays;
$media_type_list = array("1" => "Video", "2" => "Image", "5" => "Audio");
$media_source_list = array("20" => "Kaltura", "21" => "MyClips", "23" => "KalturaPartner", "1" => "* File", "2" => "* Webcam", "3" => "Flickr", "4" => "YouTube", "5" => "* URL", "7" => "MySpace", "8" => "PhotoBucket", "9" => "Jamendo", "10" => "CCMixter", "11" => "NYPL", "12" => "Current", "13" => "MediaCommons", "22" => "Archive.org");
if ($limited) {
$format_list = array("1" => "JSON", "2" => "XML", "3" => "PHP");
if (strpos($host, "sandbox") !== false) {
$service_url_list = array("sandbox.kaltura.com" => "Sandbox", "www.kaltura.com" => "Kaltura");
} else {
$service_url_list = array("www.kaltura.com" => "Kaltura", "sandbox.kaltura.com" => "Sandbox");
}
$index_path_list = array("index.php" => "index");
} else {
$format_list = array("1" => "JSON", "2" => "XML", "3" => "PHP", "4" => "PHP_ARR", "5" => "PHP_OBJ");
$service_url_list = array("localhost" => "localhost", "kaldev.kaltura.com" => "kaldev", "www.kaltura.com" => "Kaltura", "sandbox.kaltura.com" => "Sandbox");
$index_path_list = array("index.php" => "index", "kaltura_dev.php" => "debug");
}
$clazz_list = array("kshow" => "kshow", "kuser" => "kuser", "entry" => "entry", "PuserKuser" => "PuserKuser");
$moderation_object_type = array("1" => "kshow", "2" => "entry", "3" => "kuser", "" => "none");
$notification_status = array("" => "All", "1" => "Pending", "2" => "Sent", "3" => "Error", "4" => "Should Resend");
$entry_type = array("" => "All", "1" => "Clip", "2" => "Roughcut");
$entry_media_type = array("" => "All", "1" => "Video", "2" => "Image", "5" => "Audio", "6" => "Roughcut");
$boolean_type = array("" => "", "true" => "true", "false" => "false");
$boolean_int_type = array("" => "", "1" => "true", "0" => "false");
$partner_status_int_type = array("1" => "Normal", "2" => "Content Blocked", "3" => "Fully Blocked", "0" => "Deleted");
$partner_group_int_type = array("1" => "Publisher", "2" => "VAR", "3" => "Group");
$arrays = array("format_list" => $format_list, "media_type" => $media_type_list, "media_source" => $media_source_list, "service_urls" => $service_url_list, "service_urls1" => array_merge(array("" => ""), $service_url_list), "index_paths" => $index_path_list, "clazz_list" => $clazz_list, "moderation_object_type" => $moderation_object_type, "boolean_type" => $boolean_type, "boolean_int_type" => $boolean_int_type, "notification_status" => $notification_status, "partner_status_int_type" => $partner_status_int_type, "partner_group_int_type" => $partner_group_int_type, "appear_in_saerch_list" => array("0" => "Not at all", "1" => "Partner only", "2" => "Kaltura network"), "net_storage_priority" => array(StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_ONLY => 'Kaltura DCs only', StorageProfile::STORAGE_SERVE_PRIORITY_KALTURA_FIRST => 'Kaltura first', StorageProfile::STORAGE_SERVE_PRIORITY_EXTERNAL_FIRST => 'External storages first', StorageProfile::STORAGE_SERVE_PRIORITY_EXTERNAL_ONLY => 'External storages only'));
$list = $arrays[$list_name];
//echo "createSelect: list_name:[$list_name] count:[" . count ( $list ) . "]<br>";
$str = "<select id='{$prefix}{$id}' style='font-family:arial; font-size:12px;' name='{$prefix}{$name}' onkeyup='updateSelect( this )' onchange='updateSelect( this )'>";
$default_value_selected = "";
foreach ($list as $value => $option) {
// not always the default value is found
if ($value == $default_value) {
$default_value_selected = $default_value;
}
$selected = $value == $default_value ? "selected='selected'" : "";
$str .= "<option value='{$value}' {$selected} >{$option}</option>\n";
}
$str .= "</select> <span style='color:blue;' id='{$prefix}{$id}_current_value'>{$default_value_selected}</span>\n";
return $str;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:55,代码来源:partnersSuccess.php
示例13: execute
/**
* Will forward to the regular swf player according to the widget_id
*/
public function execute()
{
$uiconf_id = $this->getRequestParameter('uiconf_id');
if (!$uiconf_id) {
KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
}
$uiConf = uiConfPeer::retrieveByPK($uiconf_id);
if (!$uiConf) {
KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
}
$partner_id = $this->getRequestParameter('partner_id', $uiConf->getPartnerId());
if (!$partner_id) {
KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
}
$partner_host = myPartnerUtils::getHost($partner_id);
$partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
$use_cdn = $uiConf->getUseCdn();
$host = $use_cdn ? $partner_cdnHost : $partner_host;
$ui_conf_html5_url = $uiConf->getHtml5Url();
if (kConf::hasMap("optimized_playback")) {
$optimizedPlayback = kConf::getMap("optimized_playback");
if (array_key_exists($partner_id, $optimizedPlayback)) {
// force a specific kdp for the partner
$params = $optimizedPlayback[$partner_id];
if (array_key_exists('html5_url', $params)) {
$ui_conf_html5_url = $params['html5_url'];
}
}
}
if (kString::beginsWith($ui_conf_html5_url, "http")) {
$url = $ui_conf_html5_url;
// absolute URL
} else {
if ($ui_conf_html5_url) {
$url = $host . $ui_conf_html5_url;
} else {
$html5_version = kConf::get('html5_version');
$url = "{$host}/html5/html5lib/{$html5_version}/mwEmbedLoader.php";
}
}
// append uiconf_id and partner id for optimizing loading of html5 library. append them only for "standard" urls by looking for the mwEmbedLoader.php suffix
if (kString::endsWith($url, "mwEmbedLoader.php")) {
$url .= "/p/{$partner_id}/uiconf_id/{$uiconf_id}";
$entry_id = $this->getRequestParameter('entry_id');
if ($entry_id) {
$url .= "/entry_id/{$entry_id}";
}
}
requestUtils::sendCachingHeaders(60);
header("Pragma:");
kFile::cacheRedirect($url);
header("Location:{$url}");
die;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:57,代码来源:embedIframeJsAction.class.php
示例14: execute
/**
* Will forward to the regular swf player according to the widget_id
*/
public function execute()
{
requestUtils::handleConditionalGet();
$file_sync_id = $this->getRequestParameter("id");
$hash = $this->getRequestParameter("hash");
$file_name = $this->getRequestParameter("fileName");
if ($file_name) {
$file_name = base64_decode($file_name);
}
kDataCenterMgr::serveFileToRemoteDataCenter($file_sync_id, $hash, $file_name);
die;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:15,代码来源:servefileAction.class.php
示例15: 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
示例16: __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
示例17: output
/**
* @param string $playbackContext
*/
public function output($playbackContext)
{
if ($this->tokenizer) {
$this->tokenizer->setPlaybackContext($playbackContext);
}
$this->tokenizeUrls();
$headers = $this->getHeaders();
foreach ($headers as $header) {
header($header);
}
requestUtils::sendCachingHeaders(kApiCache::hasExtraFields() ? 0 : $this->cachingHeadersAge);
echo $this->getBody();
die;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:17,代码来源:kManifestRenderers.php
示例18: checkIsLive
public function checkIsLive($url)
{
$content = $this->urlExists($url, array('application/dash+xml'));
if (!$content) {
return false;
}
$mediaUrls = $this->getDashUrls($content);
foreach ($mediaUrls as $mediaUrl) {
$mediaUrl = requestUtils::resolve($mediaUrl, $url);
if ($this->urlExists($mediaUrl, array('audio/mp4', 'video/mp4'), '0-1') !== false) {
return true;
}
}
return false;
}
开发者ID:DBezemer,项目名称:server,代码行数:15,代码来源:DeliveryProfileLiveDash.php
示例19: getGenericMarkup
public static function getGenericMarkup()
{
$host = @requestUtils::getHost();
if (empty($host) || strlen($host) < 8) {
$host = "http://www.kaltura.com";
}
$base = $host . "/index.php";
$a_start = "<a href='";
$a_end = "'>";
$a_close = "</a>";
if (self::$generic_markup == null) {
self::$generic_markup = array("link-home" => $a_start . $base . $a_end . "Kaltura" . $a_close, "link-browse-kshow-start" => $a_start . $base . "/browse?kshow_id='", "link-browse-kshow-middle" => "'>", "link-browse-kshow-end" => "</a>", "link-forum" => $a_start . $base . "/forum" . $a_end . "Forum" . $a_close, "link-mykaltura" => $a_start . $base . "/mykaltura/viewprofile?screenname=<kl:screenName>" . $a_end . "<kl:screenName>" . $a_close, "link-contact" => $a_start . $base . "/static/contactus" . $a_end . "Contact Us" . $a_close, "link-block-email-url" => $base . "/mail/blockMail?e=");
}
return self::$generic_markup;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:15,代码来源:___myTemplateUtils.class.php
示例20: __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
注:本文中的requestUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论