当前位置: 首页>>代码示例>>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;未经允许,请勿转载。