Config
class Config (View source)
Configuration handling
Properties
static self|null | $instance | ||
array | $default | ||
array | $baseSettings | ||
array | $settings | ||
string | $source | ||
int | $sourceMtime | ||
bool | $errorConfigFile | ||
Settings | $config | ||
int<0, max> | $server | ||
array | $selectedServer |
Methods
No description
No description
No description
No description
sets system and application settings
whether to use gzip output compression or not
Determines platform (OS), browser and version of the user Based on a phpBuilder article:
Whether GD2 is present
Whether the os php is running on is windows or not
loads configuration from $source, usually the config file should be called on object creation
Loads user preferences and merges them with current config must be called after control connection has been established
Sets config value which is stored in user preferences (if available) or in a cookie.
Reads value stored by setUserValue()
set source
No description
verifies the permissions on config file (if asked by configuration) (must be called after config.inc.php has been merged)
Checks for errors (must be called after config.inc.php has been merged)
returns specific config setting
sets configuration variable
returns source for current config
checks if upload is enabled
Maximum upload size as limited by PHP Used with permission from Moodle (https://moodle.org/) by Martin Dougiamas
Checks if protocol is https
Get phpMyAdmin root path
removes cookie
sets cookie if value is different from current cookie value, or removes if value is equal to default
get cookie
Get the real cookie name
isset cookie
Renders user configured footer
Renders user configured footer
Returns temporary dir path
Returns temporary directory
No description
Return connection parameters for the database server
Get LoginCookieValidity from preferences cache.
No description
No description
No description
Details
__construct()
No description
static Config
getInstance()
deprecated
deprecated
No description
void
setSetup(bool $isSetup)
No description
bool
isSetup()
No description
void
loadAndCheck(string|null $source = null)
No description
void
checkSystem()
sets system and application settings
void
checkOutputCompression()
whether to use gzip output compression or not
void
checkClient()
Determines platform (OS), browser and version of the user Based on a phpBuilder article:
void
checkGd2()
Whether GD2 is present
void
checkWebServerOs()
Whether the os php is running on is windows or not
bool
load(string|null $source = null)
loads configuration from $source, usually the config file should be called on object creation
void
loadUserPreferences(ThemeManager $themeManager, bool $isMinimumCommon = false)
Loads user preferences and merges them with current config must be called after control connection has been established
Message
setUserValue(string|null $cookieName, string $cfgPath, mixed $newCfgValue, string|null $defaultValue = null)
Sets config value which is stored in user preferences (if available) or in a cookie.
If user preferences are not yet initialized, option is applied to global config and added to a update queue, which is processed by loadUserPreferences()
mixed
getUserValue(string $cookieName, mixed $cfgValue)
Reads value stored by setUserValue()
void
setSource(string $source)
set source
bool
checkConfigSource()
No description
void
checkPermissions()
verifies the permissions on config file (if asked by configuration) (must be called after config.inc.php has been merged)
void
checkErrors()
Checks for errors (must be called after config.inc.php has been merged)
mixed
get(string $setting)
returns specific config setting
void
set(string $setting, mixed $value)
sets configuration variable
string
getSource()
returns source for current config
void
checkUpload()
checks if upload is enabled
void
checkUploadSize()
Maximum upload size as limited by PHP Used with permission from Moodle (https://moodle.org/) by Martin Dougiamas
this section generates max_upload_size in bytes
bool
isHttps()
Checks if protocol is https
This function checks if the https protocol on the active connection.
string
getRootPath()
Get phpMyAdmin root path
bool
removeCookie(string $cookieName)
removes cookie
bool
setCookie(string $cookie, string $value, string|null $default = null, int|null $validity = null, bool $httponly = true)
sets cookie if value is different from current cookie value, or removes if value is equal to default
mixed
getCookie(string $cookieName)
get cookie
string
getCookieName(string $cookieName)
Get the real cookie name
bool
issetCookie(string $cookieName)
isset cookie
static string
renderFooter()
Renders user configured footer
static string
renderHeader()
Renders user configured footer
string|null
getTempDir(string $name)
Returns temporary dir path
string|null
getUploadTempDir()
Returns temporary directory
int
selectServer(mixed $serverParamFromRequest)
No description
static Server
getConnectionParams(Server $currentServer, ConnectionType $connectionType)
Return connection parameters for the database server
void
getLoginCookieValidityFromCache(int $server)
Get LoginCookieValidity from preferences cache.
No generic solution for loading preferences from cache as some settings need to be kept for processing in loadUserPreferences().
Settings
getSettings()
No description
bool
hasSelectedServer()
No description
string
getChangeLogFilePath()
No description