Example #1
0
 /**
  * returns array of all existing semester objects
  * orderd by begin
  * @param boolean $force_reload
  * @return array
  */
 public static function getAll($force_reload = false)
 {
     if (!is_array(self::$semester_cache) || $force_reload) {
         self::$semester_cache = array();
         foreach (self::findBySql('1 ORDER BY beginn') as $semester) {
             self::$semester_cache[$semester->getId()] = $semester;
             if ($semester->current) {
                 self::$current_semester = $semester;
             }
         }
     }
     return self::$semester_cache;
 }