Documentation

Horde_Core_Factory_Prefs extends Horde_Core_Factory_Base
in package

A Horde_Injector:: based Horde_Prefs:: factory.

Copyright 2010-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
category

Horde

author

Michael Slusarz slusarz@horde.org

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$storage  : Horde_Prefs_Storage
Storage driver.
$_instances  : array<string|int, mixed>
Instances.
clearCache()  : mixed
Clears the instances cache.
create()  : Horde_Prefs
Return the Horde_Prefs:: instance.
sizeCallback()  : bool
Max size callback.
_getCache()  : Horde_Prefs_Cache_HordeCache
Return the cache object to use for the prefs driver.
_notifyError()  : mixed
Notifies (once) if one of the preference backends is not available and logs details for the administrator.

Properties

Methods

create()

Return the Horde_Prefs:: instance.

public create([string $scope = 'horde' ][, array<string|int, mixed> $opts = array() ]) : Horde_Prefs
Parameters
$scope : string = 'horde'

The scope for this set of preferences.

$opts : array<string|int, mixed> = 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 values
Horde_Prefs

The singleton instance.

sizeCallback()

Max size callback.

public sizeCallback(string $pref, int $size) : bool
Parameters
$pref : string

Preference name.

$size : int

Size (in bytes).

Return values
bool

True if oversized.

_getCache()

Return the cache object to use for the prefs driver.

protected _getCache(string $user, bool $fallback) : Horde_Prefs_Cache_HordeCache
Parameters
$user : string

Username.

$fallback : bool

Return the fallback cache driver?

Return values
Horde_Prefs_Cache_HordeCache

Cache object.

_notifyError()

Notifies (once) if one of the preference backends is not available and logs details for the administrator.

protected _notifyError(mixed $e) : mixed
Parameters
$e : mixed

Error to log.

Return values
mixed

Search results