PHP Class Horde_Core_Factory_Prefs, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Inheritance: extends Horde_Core_Factory_Base
Exibir arquivo Open project: horde/horde

Public Properties

Property Type Description
$storage Horde_Prefs_Storage Storage driver.

Public Methods

Method Description
clearCache ( ) Clears the instances cache.
create ( string $scope = 'horde', array $opts = [] ) : Horde_Prefs Return the Horde_Prefs:: instance.
sizeCallback ( string $pref, integer $size ) : boolean Max size callback.

Protected Methods

Method Description
_getCache ( string $user, boolean $fallback ) : Horde_Cache Return the cache object to use for the prefs driver.
_notifyError ( mixed $e ) Notifies (once) if one of the preference backends is not available and logs details for the administrator.

Method Details

_getCache() protected method

Return the cache object to use for the prefs driver.
protected _getCache ( string $user, boolean $fallback ) : Horde_Cache
$user string Username.
$fallback boolean Return the fallback cache driver?
return Horde_Cache Cache object.

_notifyError() protected method

Notifies (once) if one of the preference backends is not available and logs details for the administrator.
protected _notifyError ( mixed $e )
$e mixed Error to log.

clearCache() public method

Clears the instances cache.
public clearCache ( )

create() public method

Return the Horde_Prefs:: instance.
public create ( string $scope = 'horde', array $opts = [] ) : Horde_Prefs
$scope string The scope for this set of preferences.
$opts array See Horde_Prefs::__construct(). Additional parameters: - driver: (boolean) Use this driver instead of the value in the Horde config. - driver_params: (array) Use these driver parameters instead of the values in the Horde config.
return Horde_Prefs The singleton instance.

sizeCallback() public method

Max size callback.
public sizeCallback ( string $pref, integer $size ) : boolean
$pref string Preference name.
$size integer Size (in bytes).
return boolean True if oversized.

Property Details

$storage public_oe property

Storage driver.
Since: 2.5.0
public Horde_Prefs_Storage $storage
return Horde_Prefs_Storage