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


PHP kCurrentContext::getCurrentSessionType方法代码示例

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


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

示例1: getListResponse

 /**
  * @param KalturaFilterPager $pager
  * @param KalturaDetachedResponseProfile $responseProfile
  * @return KalturaListResponse
  */
 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $response = new KalturaUserEntryListResponse();
     if (in_array(kCurrentContext::getCurrentSessionType(), array(kSessionBase::SESSION_TYPE_NONE, kSessionBase::SESSION_TYPE_WIDGET))) {
         $response->totalCount = 0;
         return $response;
     }
     $c = new Criteria();
     if (!is_null($this->userIdEqualCurrent) && $this->userIdEqualCurrent) {
         $this->userIdEqual = kCurrentContext::getCurrentKsKuserId();
     } else {
         $this->fixFilterUserId();
     }
     $userEntryFilter = $this->toObject();
     $userEntryFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $list = UserEntryPeer::doSelect($c);
     $resultCount = count($list);
     if ($resultCount && $resultCount < $pager->pageSize) {
         $totalCount = ($pager->pageIndex - 1) * $pager->pageSize + $resultCount;
     } else {
         KalturaFilterPager::detachFromCriteria($c);
         $totalCount = UserEntryPeer::doCount($c);
     }
     $response->totalCount = $totalCount;
     $response->objects = KalturaUserEntryArray::fromDbArray($list, $responseProfile);
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:33,代码来源:KalturaUserEntryFilter.php

示例2: getObjectTypeCacheKey

 private static function getObjectTypeCacheKey(IRelatedObject $object)
 {
     $userRoles = kPermissionManager::getCurrentRoleIds();
     sort($userRoles);
     $objectType = get_class($object);
     $partnerId = self::$cachedObject->getPartnerId();
     $profileKey = self::$responseProfileKey;
     $protocol = infraRequestUtils::getProtocol();
     $ksType = kCurrentContext::getCurrentSessionType();
     $userRoles = implode('-', $userRoles);
     $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
     return "relate_rp{$profileKey}_p{$partnerId}_o{$objectType}_h{$protocol}_k{$ksType}_u{$userRoles}_w{$host}";
 }
开发者ID:ace3535,项目名称:server,代码行数:13,代码来源:KalturaResponseProfileCacher.php

示例3: doFromObject

 public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     if (!$sourceObject) {
         return;
     }
     entryPeer::addValidatedEntry($sourceObject->getId());
     parent::doFromObject($sourceObject, $responseProfile);
     $partnerId = kCurrentContext::$ks_partner_id ? kCurrentContext::$ks_partner_id : kCurrentContext::$partner_id;
     if (implode(',', kEntitlementUtils::getKsPrivacyContext()) != kEntitlementUtils::DEFAULT_CONTEXT . $partnerId) {
         $this->categories = null;
         $this->categoriesIds = null;
     }
     if (!kConf::hasParam('protect_userid_in_api') || !in_array($sourceObject->getPartnerId(), kConf::get('protect_userid_in_api')) || !in_array(kCurrentContext::getCurrentSessionType(), array(kSessionBase::SESSION_TYPE_NONE, kSessionBase::SESSION_TYPE_WIDGET))) {
         if ($this->shouldGet('userId', $responseProfile)) {
             $this->userId = $sourceObject->getPuserId();
         }
         if ($this->shouldGet('creatorId', $responseProfile)) {
             $this->creatorId = $sourceObject->getCreatorPuserId();
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:21,代码来源:KalturaBaseEntry.php

示例4: getSessionKey

 protected static function getSessionKey($protocol = null, $ksType = null, array $userRoles = null, $host = null)
 {
     if (!$protocol) {
         $protocol = infraRequestUtils::getProtocol();
     }
     if (!$ksType) {
         $ksType = kCurrentContext::getCurrentSessionType();
     }
     if (!$userRoles) {
         $userRoles = kPermissionManager::getCurrentRoleIds();
     }
     if (!$host) {
         $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
     }
     sort($userRoles);
     $userRole = implode('-', $userRoles);
     return "{$protocol}_{$ksType}_{$host}_{$userRole}";
 }
开发者ID:dozernz,项目名称:server,代码行数:18,代码来源:kResponseProfileCacher.php

示例5: doFromObject

 public function doFromObject($dbCuePoint, KalturaDetachedResponseProfile $responseProfile = null)
 {
     parent::doFromObject($dbCuePoint, $responseProfile);
     if ($this->shouldGet('userId', $responseProfile)) {
         if ($dbCuePoint->getKuserId() !== null) {
             $dbKuser = kuserPeer::retrieveByPK($dbCuePoint->getKuserId());
             if ($dbKuser) {
                 if (!kConf::hasParam('protect_userid_in_api') || !in_array($dbCuePoint->getPartnerId(), kConf::get('protect_userid_in_api')) || !in_array(kCurrentContext::getCurrentSessionType(), array(kSessionBase::SESSION_TYPE_NONE, kSessionBase::SESSION_TYPE_WIDGET))) {
                     $this->userId = $dbKuser->getPuserId();
                 }
             }
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaCuePoint.php


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