當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kuserPeer::getKuserByPartnerAndUids方法代碼示例

本文整理匯總了PHP中kuserPeer::getKuserByPartnerAndUids方法的典型用法代碼示例。如果您正苦於以下問題:PHP kuserPeer::getKuserByPartnerAndUids方法的具體用法?PHP kuserPeer::getKuserByPartnerAndUids怎麽用?PHP kuserPeer::getKuserByPartnerAndUids使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kuserPeer的用法示例。


在下文中一共展示了kuserPeer::getKuserByPartnerAndUids方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: toFilter

 public function toFilter($partnerId)
 {
     $object = new ShortLinkFilter();
     if (!is_null($this->userIdEqual)) {
         $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $this->userIdEqual);
         if ($kuser) {
             $this->userIdEqual = $kuser->getId();
         } else {
             $this->userIdEqual = -1;
         }
         // no result will be returned when the user is missing
     }
     if (!is_null($this->userIdIn)) {
         $puserIds = explode(',', $this->userIdIn);
         $kusers = kuserPeer::getKuserByPartnerAndUids($partnerId, $puserIds);
         if (count($kusers)) {
             $kuserIds = array();
             foreach ($kusers as $kuser) {
                 $kuserIds[] = $kuser->getId();
             }
             $this->userIdIn = implode(',', $kuserIds);
         } else {
             $this->userIdIn = -1;
             // no result will be returned when the user is missing
         }
     }
     return parent::toObject($object);
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:28,代碼來源:KalturaShortLinkFilter.php

示例2: validateMetadataObjects

 public static function validateMetadataObjects($profileField, $objectIds, &$errorMessage)
 {
     /** @var MetadataProfileField $profileField */
     $partnerId = kCurrentContext::getCurrentPartnerId();
     $dbObjects = kuserPeer::getKuserByPartnerAndUids($partnerId, $objectIds);
     if (count($dbObjects) != count($objectIds)) {
         $errorMessage = 'One of the following objects: ' . implode(', ', $objectIds) . ' was not found';
         return false;
     }
     return true;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:11,代碼來源:MetadataKuserPeer.php

示例3: preparePusersToKusersFilter

 private function preparePusersToKusersFilter($puserIdsCsv)
 {
     $kuserIdsArr = array();
     $puserIdsArr = explode(',', $puserIdsCsv);
     $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr);
     foreach ($kuserArr as $kuser) {
         $kuserIdsArr[] = $kuser->getId();
     }
     if (!empty($kuserIdsArr)) {
         return implode(',', $kuserIdsArr);
     }
     return -1;
     // no result will be returned if no puser exists
 }
開發者ID:visomar,項目名稱:server,代碼行數:14,代碼來源:KalturaBaseEntryFilter.php

示例4: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     if (!is_null($this->isAnonymous)) {
         if (KalturaNullableBoolean::toBoolean($this->isAnonymous) === false) {
             if ($this->userIdNotIn == null) {
                 $anonKuserIds = "";
                 $anonKusers = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), array('', 0));
                 foreach ($anonKusers as $anonKuser) {
                     $anonKuserIds .= $anonKuser->getKuserId() . ",";
                 }
                 $this->userIdNotIn = $anonKuserIds;
             }
         }
     }
     return parent::getListResponse($pager, $responseProfile);
 }
開發者ID:wzur,項目名稱:server,代碼行數:16,代碼來源:KalturaQuizUserEntryFilter.php

示例5: toObject

 /**
  * @param AuditTrailFilter $auditTrailFilter
  * @param array $propsToSkip
  * @return AuditTrailFilter
  */
 public function toObject($auditTrailFilter = null, $propsToSkip = array())
 {
     if (isset($this->userIdEqual)) {
         $kuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $this->userIdEqual, true);
         if ($kuser) {
             $this->userIdEqual = $kuser->getId();
         }
     }
     if (isset($this->userIdIn)) {
         $kusers = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::$ks_partner_id, $this->userIdIn);
         $kuserIds = array();
         foreach ($kusers as $kuser) {
             $kuserIds[] = $kuser->getId();
         }
         $this->userIdIn = implode(',', $kuserIds);
     }
     return parent::toObject($auditTrailFilter, $propsToSkip);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:23,代碼來源:KalturaAuditTrailFilter.php

示例6: toObject

 public function toObject($obj = null, $props_to_skip = array())
 {
     if (!$obj) {
         $obj = new kCategoryKuserAdvancedFilter();
     }
     if (!$this->memberIdEq && !$this->memberIdIn) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, 'memberIdEq,memberIdIn');
     }
     if (!$this->memberPermissionsMatchOr && !$this->memberPermissionsMatchAnd) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, 'memberIdEq,memberIdIn');
     }
     if ($this->memberIdEq) {
         $kuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::getCurrentPartnerId(), $this->memberIdEq);
         if (!$kuser) {
             throw new KalturaAPIException(KalturaErrors::USER_NOT_FOUND);
         }
         $kuserIds = array($kuser->getId());
         // retrieve categories that the user is a member by a group.
         $kgroupIds = KuserKgroupPeer::retrieveKgroupIdsByKuserId($kuser->getId());
         if (!is_null($kgroupIds) && is_array($kgroupIds)) {
             $kuserIds = array_merge($kgroupIds, $kuserIds);
         }
         $obj->setMemberIdIn($kuserIds);
     }
     if ($this->memberIdIn) {
         $kusers = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), explode(',', $this->memberIdIn));
         $kuserIds = array();
         if (!$kusers || !count($kusers)) {
             throw new KalturaAPIException(KalturaErrors::USER_NOT_FOUND);
         }
         foreach ($kusers as $kuser) {
             $kuserIds[] = $kuser->getId();
         }
         // retrieve categories that the users are members by a group.
         $kgroupIds = KuserKgroupPeer::retrieveKgroupIdsByKuserIds($kuserIds);
         if (!is_null($kgroupIds) && is_array($kgroupIds)) {
             $kuserIds = array_merge($kgroupIds, $kuserIds);
         }
         $obj->setMemberIdIn($kuserIds);
     }
     return parent::toObject($obj, $props_to_skip);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:42,代碼來源:KalturaCategoryUserAdvancedFilter.php

示例7: toObject

 public function toObject($object_to_fill = null, $props_to_skip = array())
 {
     if ($this->metadataObjectTypeEqual == KalturaMetadataObjectType::USER) {
         if ($this->objectIdEqual) {
             $kuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::getCurrentPartnerId(), $this->objectIdEqual);
             if ($kuser) {
                 $this->objectIdEqual = $kuser->getId();
             }
         }
         if ($this->objectIdIn) {
             $kusers = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), explode(',', $this->objectIdIn));
             $kusersIds = array();
             foreach ($kusers as $kuser) {
                 $kusersIds[] = $kuser->getId();
             }
             $this->objectIdIn = implode(',', $kusersIds);
         }
     }
     return parent::toObject($object_to_fill, $props_to_skip);
 }
開發者ID:ace3535,項目名稱:server,代碼行數:20,代碼來源:KalturaMetadataFilter.php

示例8: getAnonymousKuserIds

 /**
  * @param $partnerID
  */
 protected function getAnonymousKuserIds($partnerID)
 {
     $anonKuserIds = array();
     $anonKusers = kuserPeer::getKuserByPartnerAndUids($partnerID, array('', 0));
     foreach ($anonKusers as $anonKuser) {
         $anonKuserIds[] = $anonKuser->getKuserId();
     }
     return $anonKuserIds;
 }
開發者ID:wzur,項目名稱:server,代碼行數:12,代碼來源:QuizPlugin.php


注:本文中的kuserPeer::getKuserByPartnerAndUids方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。