src/snac/server/database/DBUtil.php
/**
     * Populate the language cache
     *
     * Gets all the languages associated with the queried constellation and stores them in a cache for use
     * when populating the various constellation pieces
     *
     * @param string[] $vhInfo Associative array of version information including 'ic_id' and 'version'
     */
Populate the language cache
Gets all the languages associated with the queried constellation and stores them in a cache for use
when populating the various constellation pieces

@param string[] $vhInfo Associative array of version information including 'ic_id' and 'version'
Populate the language cache Gets all the languages associated with the queried constellation and stores them in a cache for use when populating the various constellation pieces @param string [] $vhInfo Associative array of version information including ' ic_id ' and ' version '
private function populateLanguageCache($vhInfo) {
        $this->dataCache["languages"] = array();
        $languageRows = $this->sql->selectAllLanguagesForConstellation($vhInfo["ic_id"], $vhInfo['version']);
        foreach ($languageRows as $item)
        {
            if (!isset($this->dataCache["languages"][$item['fk_table']]))
                $this->dataCache["languages"][$item['fk_table']] = array();
            if (!isset($this->dataCache["languages"][$item['fk_table']][$item['fk_id']]))
                $this->dataCache["languages"][$item['fk_table']][$item['fk_id']] = array();
            $newObj = new \snac\data\Language();
            $newObj->setLanguage($this->populateTerm($item['language_id']));
            $newObj->setScript($this->populateTerm($item['script_id']));
            $newObj->setVocabularySource($item['vocabulary_source']);
            $newObj->setNote($item['note']);
            $newObj->setDBInfo($item['version'], $item['id']);
            $this->populateMeta($vhInfo, $newObj, 'language');
            array_push($this->dataCache["languages"][$item['fk_table']][$item['fk_id']], $newObj);
        }
    }
private function populateLanguageCache ( $ vhInfo ) { $ this -> dataCache [ " languages " ] = array ( ) ; $ languageRows = $ this -> sql -> selectAllLanguagesForConstellation ( $ vhInfo [ " ic_id " ] , $ vhInfo [ 'version' ] ) ; foreach ( $ languageRows as $ item ) { if ( ! isset ( $ this -> dataCache [ " languages " ] [ $ item [ 'fk_table' ] ] ) ) $ this -> dataCache [ " languages " ] [ $ item [ 'fk_table' ] ] = array ( ) ; if ( ! isset ( $ this -> dataCache [ " languages " ] [ $ item [ 'fk_table' ] ] [ $ item [ 'fk_id' ] ] ) ) $ this -> dataCache [ " languages " ] [ $ item [ 'fk_table' ] ] [ $ item [ 'fk_id' ] ] = array ( ) ; $ newObj = new \ snac \ data \ Language ( ) ; $ newObj -> setLanguage ( $ this -> populateTerm ( $ item [ 'language_id' ] ) ) ; $ newObj -> setScript ( $ this -> populateTerm ( $ item [ 'script_id' ] ) ) ; $ newObj -> setVocabularySource ( $ item [ 'vocabulary_source' ] ) ; $ newObj -> setNote ( $ item [ 'note' ] ) ; $ newObj -> setDBInfo ( $ item [ 'version' ] , $ item [ 'id' ] ) ; $ this -> populateMeta ( $ vhInfo , $ newObj , 'language' ) ; array_push ( $ this -> dataCache [ " languages " ] [ $ item [ 'fk_table' ] ] [ $ item [ 'fk_id' ] ] , $ newObj ) ; } }
Populate the language cache
 Gets all the languages associated with the queried constellation and stores them in a cache for use
 when populating the various constellation pieces
Populate the language cache Gets all the languages associated with the queried constellation and stores them in a cache for use when populating the various constellation pieces