common\ModulesSettings::getAllSettingsFromDatabase PHP Method

getAllSettingsFromDatabase() private method

Reads all the settings from the database and groups them by module
private getAllSettingsFromDatabase ( ) : array
return array
    private function getAllSettingsFromDatabase()
    {
        // fetch settings
        $settings = (array) $this->database->getRecords('SELECT ms.module, ms.name, ms.value
             FROM modules_settings AS ms
             INNER JOIN modules AS m ON ms.module = m.name');
        // loop settings & unserialize the values
        $groupedSettings = array();
        foreach ($settings as $row) {
            $groupedSettings[$row['module']][$row['name']] = unserialize($row['value']);
        }
        return $groupedSettings;
    }