public function itemAt($index) { if ($index >= 0 && $index < $this->getCount()) { $arr = $this->flattenPriorities(); return $arr[$index]; } else { throw new TInvalidDataValueException('list_index_invalid', $index); } }