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


PHP User::getId方法代码示例

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


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

示例1: getId

 /**
  * This is actually implemented in the base-class
  * @return int
  */
 public function getId()
 {
     return parent::getId();
 }
开发者ID:xdelacour,项目名称:email-bundle,代码行数:8,代码来源:ExampleUser.php

示例2: createRecentByUsersQuery

 /**
  * Find games played between these two players
  *
  * @return array of Game
  */
 public function createRecentByUsersQuery(User $playerA, User $playerB)
 {
     return $this->createRecentQuery()->field('userIds')->all(array($playerA->getId(), $playerB->getId()))->hint(array('userIds' => 1));
 }
开发者ID:hotfics,项目名称:lichess-old,代码行数:9,代码来源:GameRepository.php

示例3: saveRegistrationLog

 protected function saveRegistrationLog(User $user, Referral $referral)
 {
     $reg = new ReferralRegistration();
     $reg->setUserId($user->getId());
     $reg->setReferrer($referral->getReferrer());
     $this->em->persist($reg);
     return $reg;
 }
开发者ID:roozbeh360,项目名称:AffiliateBundle,代码行数:8,代码来源:Affiliate.php

示例4: setUser

 /**
  * Set the user bound to this player
  *
  * @param User $user
  * @return null
  */
 public function setUser(User $user = null)
 {
     $this->user = $user;
     if ($this->user) {
         $this->elo = $user->getElo();
         $this->getGame()->addUserId($user->getId());
     }
 }
开发者ID:hotfics,项目名称:lichess-old,代码行数:14,代码来源:Player.php

示例5: createRecentByUsersQuery

 /**
  * Find games played between these two players
  *
  * @return array of Game
  */
 public function createRecentByUsersQuery(User $playerA, User $playerB)
 {
     $qb = $this->createRecentQuery();
     return $qb->addOr($qb->expr()->field('userIds')->equals(array($playerA->getId(), $playerB->getId())))->addOr($qb->expr()->field('userIds')->equals(array($playerB->getId(), $playerA->getId())));
 }
开发者ID:hafeez3000,项目名称:lichess,代码行数:10,代码来源:GameRepository.php


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