Example #1
0
 /**
  * @param UserEntity $user
  * @return bool|int
  */
 public function findKey(UserEntity $user)
 {
     $it = $this->getIterator();
     $it->rewind();
     while ($it->valid()) {
         if ($it->current()->getId() == $user->getId()) {
             return $it->key();
         }
         $it->next();
     }
     return false;
 }
Example #2
0
 public function testGetSetId()
 {
     $this->user->setId(100);
     $this->assertEquals(100, $this->user->getId());
 }