protected function get_forum($forumid) {
        global $DB;

        if (empty($this->forumsdata[$forumid])) {
            $this->forumsdata[$forumid] = $DB->get_record('forum', array('id' => $forumid), '*', MUST_EXIST);
        }
        return $this->forumsdata[$forumid];
    }
protected function get_forum($forumid) {
        global $DB;

        if (empty($this->forumsdata[$forumid])) {
            $this->forumsdata[$forumid] = $DB->get_record('forum', array('id' => $forumid), '*', MUST_EXIST);
        }
        return $this->forumsdata[$forumid];
    }
protected function get_forum ( $ forumid ) { global $ DB ; if ( empty ( $ this -> forumsdata [ $ forumid ] ) ) { $ this -> forumsdata [ $ forumid ] = $ DB -> get_record ( 'forum' , array ( 'id' => $ forumid ) , '*' , MUST_EXIST ) ; } return $ this -> forumsdata [ $ forumid ] ; }
Returns the specified forum checking the internal cache.

Store minimal information as this might grow.

@throws \dml_exception
@param int $forumid
@return stdClass
Returns the specified forum checking the internal cache .