lib/private/AppConfig.php
/**
	 * Load all the app config values
	 */
Load all the app config values
Load all the app config values
protected function loadConfigValues() {
		if ($this->configLoaded) {
			return;
		}
		$this->cache = [];
		$sql = $this->conn->getQueryBuilder();
		$sql->select('*')
			->from('appconfig');
		$result = $sql->execute();
		$rows = $result->fetchAll();
		foreach ($rows as $row) {
			if (!isset($this->cache[$row['appid']])) {
				$this->cache[$row['appid']] = [];
			}
			$this->cache[$row['appid']][$row['configkey']] = $row['configvalue'];
		}
		$result->closeCursor();
		$this->configLoaded = true;
	}
protected function loadConfigValues ( ) { if ( $ this -> configLoaded ) { return ; } $ this -> cache = [ ] ; $ sql = $ this -> conn -> getQueryBuilder ( ) ; $ sql -> select ( '*' ) -> from ( 'appconfig' ) ; $ result = $ sql -> execute ( ) ; $ rows = $ result -> fetchAll ( ) ; foreach ( $ rows as $ row ) { if ( ! isset ( $ this -> cache [ $ row [ 'appid' ] ] ) ) { $ this -> cache [ $ row [ 'appid' ] ] = [ ] ; } $ this -> cache [ $ row [ 'appid' ] ] [ $ row [ 'configkey' ] ] = $ row [ 'configvalue' ] ; } $ result -> closeCursor ( ) ; $ this -> configLoaded = true ; }
Load all the app config values
Load all the app config values
// we are going to store the result in memory anyway