PHP Class Horde_Prefs_Storage_File, horde

Author: Thomas Jarosch ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Prefs_Storage_Base
Mostra file Open project: horde/horde

Protected Properties

Property Type Description
$_fileCache array Cached unserialized data of all scopes.
$_fullpath string Full path to the current preference file.

Public Methods

Method Description
__construct ( string $user, array $params = [] ) Constructor.
get ( Horde_Prefs_Scope $scope_ob ) : Horde_Prefs_Scope Retrieves the requested preferences scope from the storage backend.
listScopes ( ) : array Lists all available scopes.
remove ( string $scope = null, string $pref = null ) Removes preferences from the backend.
store ( Horde_Prefs_Scope $scope_ob ) Stores changed preferences in the storage backend.
updateFileFormat ( ) Updates format of file.

Protected Methods

Method Description
_loadFileCache ( ) : boolean Load the preferences from the files.

Method Details

__construct() public method

Constructor.
public __construct ( string $user, array $params = [] )
$user string The username.
$params array Configuration parameters:
'directory' - (string) [REQUIRED] Preference storage directory.

_loadFileCache() protected method

Load the preferences from the files.
protected _loadFileCache ( ) : boolean
return boolean True on success.

get() public method

Retrieves the requested preferences scope from the storage backend.
public get ( Horde_Prefs_Scope $scope_ob ) : Horde_Prefs_Scope
$scope_ob Horde_Prefs_Scope The scope object.
return Horde_Prefs_Scope The modified scope object.

listScopes() public method

Lists all available scopes.
public listScopes ( ) : array
return array The list of scopes stored in the backend.

remove() public method

Removes preferences from the backend.
public remove ( string $scope = null, string $pref = null )
$scope string The scope of the prefs to clear. If null, clears all scopes.
$pref string The pref to clear. If null, clears the entire scope.

store() public method

Stores changed preferences in the storage backend.
public store ( Horde_Prefs_Scope $scope_ob )
$scope_ob Horde_Prefs_Scope The scope object.

updateFileFormat() public method

Updates format of file.
public updateFileFormat ( )

Property Details

$_fileCache protected_oe property

Cached unserialized data of all scopes.
protected array $_fileCache
return array

$_fullpath protected_oe property

Full path to the current preference file.
protected string $_fullpath
return string