Class: UserConfig

Source Location: /class_userconfig.php

Class Overview [line 13]


User configuration methods.

Author(s):

  • Elpidio Latorilla

Version:

  • beta 1.0.08

Copyright:

  • 2002,2003 Elpidio Latorilla

Variables

Methods


Inherited Variables

Inherited Methods



Class Details

User configuration methods.

Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance

Tags:

[ Top ]


Class Variables

$bool = false

[line 41]

Universal flag

Tags:

  • access - private

Type: boolean

Overrides:

[ Top ]

$buffer =

[line 36]

Universal buffer

Tags:

  • access - private

Type: mixed

Overrides:

[ Top ]

$is_preloaded = false

[line 46]

Preloaded data flag

Tags:

  • access - private

Type: boolean

Overrides:

[ Top ]

$ok =

[line 56]

Event flag

Tags:

  • access - private

Type: boolean

Overrides:

[ Top ]

$result =

[line 26]

SQL query result buffer

Tags:

  • var - record object
  • access - private

Type: adodb

Overrides:

[ Top ]

$row =

[line 31]

Resulting row buffer

Tags:

  • access - private

Type: array

Overrides:

[ Top ]

$sql =

[line 51]

SQL query

Tags:

  • access - private

Type: string

Overrides:

[ Top ]

$tb = 'care_config_user'

[line 21]

Table name for user configurations

Tags:

  • access - private

Type: string

Overrides:

[ Top ]


Class Methods

exists

boolean exists( [string $user_id = ''])

[line 131]

Checks if the user's configuration data exists in the database based on its user configuration id key.

Tags:

  • access - public

Parameters:

  • string $user_id - User configuration id

[ Top ]

getConfig

boolean getConfig( [string $user_id = 'default'])

[line 107]

Loads the user's configuration data based on its user configuration id key.

The loaded data is stored in the internal $buffer buffer array and the $is_preloaded flag is set.

Tags:

  • access - public

Parameters:

  • string $user_id - User configuration id

[ Top ]

getConfigData

array getConfigData( )

[line 201]

Returns the preloaded configuration data.

Tags:

  • access - public

Parameters:

[ Top ]

getDefault

boolean getDefault( )

[line 96]

Loads the default configuration data.

The loaded data is stored in the internal $buffer buffer array and the $is_preloaded flag is set.

Tags:

  • access - public

Parameters:

[ Top ]

isPreLoaded

boolean isPreLoaded( )

[line 193]

Checks if the configuration data is successfully preloaded.

Tags:

  • access - public

Parameters:

[ Top ]

replaceItem

boolean replaceItem( [string $user_id = 'default'], [string $type = ''], [string $value = ''])

[line 173]

Replaces (updates) a configuration item.

Tags:

  • access - public

Parameters:

  • string $user_id - User configuration id
  • string $type - Name of item to be replaced.
  • string $value - New value

[ Top ]

saveConfig

boolean saveConfig( [string $user_id = 'default'], string &$data)

[line 155]

Saves the user's configuration data.

The configuration data is serialized first before being passed to the method.

Tags:

  • access - public

Parameters:

  • string $user_id - User configuration id
  • string &$data - Serialized data

[ Top ]

Transact

boolean Transact( [string $sql = ''])

[line 65]

Does SQL transaction. Uses the adodb transaction routine.

Tags:

  • access - private

Parameters:

  • string $sql -

[ Top ]

_getDefault

boolean _getDefault( )

[line 86]

Loads the default configuration data.

The loaded data is stored in the internal $buffer buffer array and the $is_preloaded flag is set.

Tags:

  • access - private
  • deprec - Use the publicgetDefault() method instead.

Parameters:

[ Top ]


Documentation generated on Sun, 16 Nov 2003 01:03:01 +0100 by phpDocumentor 1.2.3