Class dbPrefs

Description

Class used to handle connections to prefs database and operations with preferences

  • since: 1.1.3

Located in /functions/db_prefs.php (line 91)


	
			
Variable Summary
object $dbh
integer $db_type
array $default
string $error
string $key_field
integer $key_size
string $table
string $user_field
integer $user_size
string $val_field
integer $val_size
Method Summary
boolean deleteKey (string $user, string $key)
void failQuery ([mixed $res = NULL])
void fillPrefsCache (string $user)
mixed getKey (string $user, string $key, [mixed $default = ''])
boolean open ()
boolean setKey (string $user, string $key, mixed $value)
Variables
object $dbh = NULL (line 117)

Database connection object

integer $db_type = SMDB_UNKNOWN (line 128)

Database type (SMDB_* constants) Is used in setKey().

array $default = array('theme_default' => 0,
'show_html_default' => '0')
(line 134)

Default preferences

string $error = NULL (line 122)

Error messages

string $key_field = 'prefkey' (line 106)

Field used to store preference name

integer $key_size = 64 (line 148)

Preference key field size

  • since: 1.5.1
string $table = 'userprefs' (line 96)

Table used to store preferences

string $user_field = 'user' (line 101)

Field used to store owner of preference

integer $user_size = 128 (line 142)

Preference owner field size

  • since: 1.5.1
string $val_field = 'prefval' (line 111)

Field used to store preference value

integer $val_size = 65536 (line 154)

Preference value field size

  • since: 1.5.1
Methods
deleteKey (line 261)

Delete user's prefs setting

boolean deleteKey (string $user, string $key)
  • string $user: user name
  • string $key: preference name
failQuery (line 221)

Function used to handle database connection errors

void failQuery ([mixed $res = NULL])
fillPrefsCache (line 413)

Fill preference cache array

  • since: 1.2.3
void fillPrefsCache (string $user)
  • string $user: user name
getKey (line 239)

Get user's prefs setting

  • return: preference value
mixed getKey (string $user, string $key, [mixed $default = ''])
  • string $user: user name
  • string $key: preference name
  • mixed $default: (since 1.2.5) default value
open (line 160)

initialize DB connection object

  • return: true, if object is initialized
boolean open ()
setKey (line 291)

Set user's preference

boolean setKey (string $user, string $key, mixed $value)
  • string $user: user name
  • string $key: preference name
  • mixed $value: preference value

Documentation generated on Sat, 07 Oct 2006 16:10:24 +0300 by phpDocumentor 1.3.0RC6