Class PMA_Config

Description

Configuration class

Located in /trunk/libraries/Config.class.php (line 13)


	
			
Variable Summary
Method Summary
static void getCookiePath ()
static string getFontsizeForm (string $current_size)
static void isHttps ()
static array _getFontsizeOptions ([string $current_size = '82%'])
static string _getFontsizeSelection (string $current_size)
PMA_Config __construct ([string $source = null])
void checkClient ()
boolean checkConfigSource ()
void checkCookiePath ()
void checkFontsize ()
void checkGd2 ()
void checkIsHttps ()
void checkPhpVersion ()
void checkSystem ()
void checkUpload ()
void checkUploadSize ()
void checkWebServer ()
void enableBc ()
mixed get (string $setting)
int getMtime ()
string getSource ()
void load ([string $source = null])
boolean loadDefaults ()
void save ()
void set (string $setting, string $value)
void setSource (string $source)
void __wakeup ()
Variables
array $default_server = array() (line 55)
string $default_source = './libraries/config.default.php' (line 18)
  • var: default config source
mixed $default_source_mtime = 0 (line 34)
boolean $done = false (line 62)
  • var: wether init is done or mot set this to false to force some initial checks like checking for required functions
boolean $error_config_default_file = false (line 45)
boolean $error_config_file = false (line 40)
boolean $error_pma_uri = false (line 50)
array $settings = array() (line 23)
  • var: configuration settings
mixed $set_mtime = 0 (line 35)
string $source = '' (line 28)
  • var: config source
int $source_mtime = 0 (line 33)
  • var: source modification time
Methods
static getCookiePath (line 837)
static void getCookiePath ()
static getFontsizeForm (line 1024)

return complete font size selection form

static string getFontsizeForm (string $current_size)
  • string $current_size: currently slected font size with unit
static isHttps (line 788)
static void isHttps ()
static _getFontsizeOptions (line 931)

returns options for font size selection

static array _getFontsizeOptions ([string $current_size = '82%'])
  • string $current_size: current selected font size with unit
static _getFontsizeSelection (line 995)

returns html selectbox for font sizes

static string _getFontsizeSelection (string $current_size)
  • string $current_size: currently slected font size with unit
Constructor __construct (line 69)

constructor

PMA_Config __construct ([string $source = null])
  • string $source: source to read config from
checkClient (line 136)

Determines platform (OS), browser and version of the user

Based on a phpBuilder article:

void checkClient ()
checkCollationConnection (line 699)

check selected collation_connection

  • todo: check validity of $_REQUEST['collation_connection']
void checkCollationConnection ()
checkConfigFolder (line 442)

checks if the config folder still exists and terminates app if true

void checkConfigFolder ()
checkConfigSource (line 455)

check config source

  • return: wether source is valid or not
boolean checkConfigSource ()
checkCookiePath (line 829)

detect correct cookie path

void checkCookiePath ()
checkFontsize (line 719)

checks for font size configuration, and sets font size as requested by user

void checkFontsize ()
checkGd2 (line 193)

Whether GD2 is present

void checkGd2 ()
checkIsHttps (line 780)

check for https

void checkIsHttps ()
checkOutputCompression (line 111)

wether to use gzip output compression or not

void checkOutputCompression ()
checkPhpVersion (line 272)

detects PHP version

void checkPhpVersion ()
checkPmaAbsoluteUri (line 545)

$cfg['PmaAbsoluteUri'] is a required directive else cookies won't be

set properly and, depending on browsers, inserting or updating a record might fail

void checkPmaAbsoluteUri ()
checkSystem (line 86)

sets system and application settings

void checkSystem ()
checkUpload (line 748)

checks if upload is enabled

void checkUpload ()
checkUploadSize (line 763)

Maximum upload size as limited by PHP Used with permission from Moodle (http://moodle.org) by Martin Dougiamas

this section generates $max_upload_size in bytes

void checkUploadSize ()
checkWebServer (line 237)

Whether the Web server php is running on is IIS

void checkWebServer ()
checkWebServerOs (line 253)

Whether the os php is running on is windows or not

void checkWebServerOs ()
enableBc (line 886)

enables backward compatibility

void enableBc ()
get (line 498)

returns specific config setting

mixed get (string $setting)
  • string $setting
getMtime (line 535)

returns a unique value to force a CSS reload if either the config

or the theme changes

  • return: Unix timestamp
int getMtime ()
getSource (line 525)

returns source for current config

  • return: config source
string getSource ()
load (line 357)

loads configuration from $source, usally the config file should be called on object creation and from __wakeup if config file has changed

void load ([string $source = null])
  • string $source: config file
loadDefaults (line 329)

loads default values from default source

  • return: success
  • uses: file_exists()
  • uses: $this->settings
  • uses: $this->error_config_default_file
  • uses: $this->default_source
boolean loadDefaults ()
save (line 920)
  • todo: finish
void save ()
set (line 513)

sets configuration variable

void set (string $setting, string $value)
  • string $setting: configuration option
  • string $value: new value for configuration option
setSource (line 434)

set source

void setSource (string $source)
  • string $source
__wakeup (line 299)

re-init object after loading from session file

checks config file for changes and relaods if neccessary

void __wakeup ()

Documentation generated on Thu, 25 Oct 2007 14:22:41 +0200 by phpDocumentor 1.4.0