Пример #1
0
 /**
  * @return integer position of this LotteryApplication in the on-campus waiting list.
  */
 public function getWaitListPosition()
 {
     if (!isset(self::$waitingList)) {
         self::$waitingList = self::getRemainingWaitListApplications($term = $this->getTerm());
     }
     $position = array_search($this->getUsername(), self::$waitingList);
     if ($position === FALSE) {
         return 'unknown';
     }
     // Fix the off-by-one indexing
     return $position + 1;
 }