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


PHP Member::isLoaded方法代码示例

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


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

示例1: getMemberPostCount

 /**
  * returns a count of how many posts a member has made
  *
  * @param object $member - Member entity
  * @access public
  * @return int
  */
 public function getMemberPostCount(Member $member)
 {
     if (!$member->isLoaded()) {
         return 0;
     }
     return $this->countWhere("IdWriter = '{$member->getPKValue()}'");
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:14,代码来源:post.entity.php

示例2: setSpokenLanguage

 /**
  * sets a spoken language for a member
  *
  * @param object $member
  * @param object $language
  * @param string $level
  * @access public
  * @return bool
  */
 public function setSpokenLanguage(Member $member, Language $language, $level)
 {
     if (!$member->isLoaded() || !$language->isLoaded() || empty($level)) {
         return false;
     }
     $this->IdMember = $member->getPKValue();
     $this->IdLanguage = $language->getPKValue();
     $this->Level = $level;
     $this->created = date('Y-m-d H:i:s');
     return $this->insert();
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:20,代码来源:memberlanguage.entity.php

示例3: createTrip

 public function createTrip($vars, Member $user)
 {
     if (!is_array($vars) || !$user->isLoaded()) {
         $vars['errors'][] = 'not_created';
         return false;
     }
     $tripId = $this->insertTrip($vars['n'], $vars['d'], $user->id);
     if (!$tripId) {
         $vars['errors'][] = 'not_created';
         return false;
     }
     if (isset($vars['cg']) && $vars['cg']) {
         $Gallery = new GalleryModel();
         $galleryId = $Gallery->createGallery($vars['n']);
         if (!$galleryId) {
             $vars['errors'][] = 'gallery_not_created';
         } else {
             $this->assignGallery($tripId, $galleryId);
         }
     }
     return $tripId;
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:22,代码来源:trip.model.php

示例4: recordVisit

 /**
  * Records visit of current member to another member's profile, respecting
  * "Show profile visits" preference.
  *
  * @param Member $member Visiting member entity
  * @return bool True if visit recorded, false if not recorded
  */
 public function recordVisit(Member $member)
 {
     if (!$this->isLoaded() || !$member->isLoaded()) {
         return false;
     }
     $visitorShow = $member->getPreference('PreferenceShowProfileVisits', 'Yes');
     $ownerShow = $this->getPreference('PreferenceShowProfileVisits', 'Yes');
     if ($visitorShow == 'Yes' && $ownerShow == 'Yes') {
         $visit = $this->createEntity('ProfileVisit');
         if ($visit->recordVisit($this, $member) === false) {
             return false;
         } else {
             return true;
         }
     } else {
         return false;
     }
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:25,代码来源:member.entity.php

示例5: getVisitCountForMember

 /**
  * returns number of members visiting $member
  *
  * @param Member $member - profile to check count for
  *
  * @access public
  * @return int
  */
 public function getVisitCountForMember(Member $member)
 {
     if (!$member->isLoaded()) {
         return 0;
     }
     return $this->sqlCount("SELECT COUNT(m.id) FROM members AS m, {$this->getTableName()} AS p WHERE p.IdMember = {$member->getPKValue()} AND p.IdVisitor = m.id");
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:15,代码来源:profilevisit.entity.php

示例6: getMemberAddress

 /**
  * returns an address entity for the given member
  *
  * @param Member $member - Member entity
  * @param int    $rank   - address rank
  *
  * @access public
  * @return Address
  */
 public function getMemberAddress(Member $member, $rank = 0)
 {
     if ($this->isLoaded() || !$member->isLoaded()) {
         return false;
     }
     return $this->createEntity('Address')->findByWhere("IdMember = {$member->id} AND Rank = '{$this->dao->escape($rank)}'");
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:16,代码来源:address.entity.php


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