protected function get_entry($entryid) {
        global $DB;

        if (empty($this->entriesdata[$entryid])) {
            $this->entriesdata[$entryid] = $DB->get_record_sql("SELECT ge.*, g.course, g.defaultapproval FROM {glossary_entries} ge
                                                                  JOIN {glossary} g ON g.id = ge.glossaryid
                                                                WHERE ge.id = ?", array('id' => $entryid), MUST_EXIST);
        }
        return $this->entriesdata[$entryid];
    }
protected function get_entry($entryid) {
        global $DB;

        if (empty($this->entriesdata[$entryid])) {
            $this->entriesdata[$entryid] = $DB->get_record_sql("SELECT ge.*, g.course, g.defaultapproval FROM {glossary_entries} ge
                                                                  JOIN {glossary} g ON g.id = ge.glossaryid
                                                                WHERE ge.id = ?", array('id' => $entryid), MUST_EXIST);
        }
        return $this->entriesdata[$entryid];
    }
protected function get_entry ( $ entryid ) { global $ DB ; if ( empty ( $ this -> entriesdata [ $ entryid ] ) ) { $ this -> entriesdata [ $ entryid ] = $ DB -> get_record_sql ( "SELECT ge.*, g.course, g.defaultapproval FROM {glossary_entries} ge
                                                                  JOIN {glossary} g ON g.id = ge.glossaryid
                                                                WHERE ge.id = ?" , array ( 'id' => $ entryid ) , MUST_EXIST ) ; } return $ this -> entriesdata [ $ entryid ] ; }
Returns the specified glossary entry checking the internal cache.

Store minimal information as this might grow.

@throws \dml_exception
@param int $entryid
@return stdClass
Returns the specified glossary entry checking the internal cache .