Class Prefs_file

Description

Preferences storage implementation using files in a directory

$Horde: framework/Prefs/Prefs/file.php,v 1.1.2.4 2009/09/09 20:06:22 wrobel Exp $

Copyright 2008-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Prefs/Prefs/file.php (line 16)

Prefs
   |
   --Prefs_file
Variable Summary
 string $_dirname
 array $_file_cache
 string $_fullpath
 int $_version
Method Summary
 Prefs_file Prefs_file (string $user, [string $password = ''], [string $scope = ''], [array $params = null], [boolean $caching = true])
 mixed store ()
 NULL transformV1V2 ()
 mixed _read_cache ()
 mixed _retrieve ($scope $scope)
 mixed _write_cache ()
Variables
string $_dirname (line 30)

Directory to store the preferences

array $_file_cache (line 44)

Cached unserialized data of all scopes

string $_fullpath (line 37)

Full path to the current preference file

int $_version = 2 (line 23)

Current version number of the data format

Inherited Variables

Inherited from Prefs

Prefs::$_cache
Prefs::$_caching
Prefs::$_hooks
Prefs::$_prefs
Prefs::$_scope
Prefs::$_scopes
Prefs::$_user
Methods
Constructor Prefs_file (line 56)

Constructs a new file preferences object.

Prefs_file Prefs_file (string $user, [string $password = ''], [string $scope = ''], [array $params = null], [boolean $caching = true])
  • string $user: The user who owns these preferences.
  • string $password: The password associated with $user. (Unused)
  • string $scope: The current preferences scope.
  • array $params: A hash containing connection parameters.
  • boolean $caching: Should caching be used?
store (line 221)

Stores preferences in the current session.

  • return: True on success or a PEAR_Error object on failure.
mixed store ()

Redefinition of:
Prefs::store()
This function will be run at the end of every request as a shutdown
transformV1V2 (line 166)

Transforms the broken version 1 format into version 2.

NULL transformV1V2 ()
_read_cache (line 152)

Read data from disc

  • return: data array on success or a null on error.
mixed _read_cache ()
_retrieve (line 99)

Retrieves the requested set of preferences from the current session.

  • return: True on success or a PEAR_Error object on failure.
mixed _retrieve ($scope $scope)
  • $scope $scope: Scope specifier.
_write_cache (line 192)

Write data to disc

  • return: True on success or a false on error.
mixed _write_cache ()

Inherited Methods

Inherited From Prefs

 Prefs::Prefs()
 Prefs::cleanup()
 Prefs::clear()
 Prefs::convertFromDriver()
 Prefs::convertToDriver()
 Prefs::factory()
 Prefs::getCharset()
 Prefs::getDefault()
 Prefs::getScope()
 Prefs::getUser()
 Prefs::getValue()
 Prefs::isDefault()
 Prefs::isDirty()
 Prefs::isLocked()
 Prefs::isShared()
 Prefs::remove()
 Prefs::retrieve()
 Prefs::setDefault()
 Prefs::setDirty()
 Prefs::setLocked()
 Prefs::setScope()
 Prefs::setShared()
 Prefs::setValue()
 Prefs::singleton()
 Prefs::store()
 Prefs::_cacheLookup()
 Prefs::_cacheUpdate()
 Prefs::_dirtyPrefs()
 Prefs::_getPreferenceScope()
 Prefs::_loadScope()
 Prefs::_setValue()
 Prefs::__get()
 Prefs::__set()

Documentation generated on Sun, 30 Jan 2011 05:17:12 +0000 by phpDocumentor 1.4.3