예제 #1
0
파일: User.php 프로젝트: hafeez3000/lichess
 public function is(User $user = null)
 {
     return $user && $user->getUsernameCanonical() === $this->getUsernameCanonical();
 }
예제 #2
0
 public function __construct(User $user)
 {
     $this->id = $user->getUsernameCanonical();
     $this->addEntry($user->getCreatedAt()->getTimestamp(), User::STARTING_ELO, self::TYPE_START);
 }
예제 #3
0
 public function isOnline(User $user)
 {
     return $this->isUsernameOnline($user->getUsernameCanonical());
 }
예제 #4
0
 public function findOneByUser(User $user)
 {
     return $this->findOneBy(array('id' => $user->getUsernameCanonical()));
 }