/** * @return CArrayList|null */ public static function getAllQuestions() { if (!self::$_cacheQuestionsInit) { self::$_cacheQuestionsInit = true; foreach (CActiveRecordProvider::getAllFromTable(TABLE_EXAMINATION_QUESTIONS)->getItems() as $obj) { $q = new CExamQuestion($obj); self::getCacheQuestions()->add($q->getId(), $q); } } return self::getCacheQuestions(); }