DEFAULT_SCOPE
DEFAULT_SCOPE
The Horde_Prefs class provides a common abstracted interface into the various preferences storage mediums.
It also includes all of the functions for retrieving, storing, and checking preference values.
__construct(string $scope, mixed $storage = null, array $opts = array())
Constructor.
string | $scope | The scope for this set of preferences. |
mixed | $storage | The storage object(s) to use. Either a single Horde_Prefs_Storage object, or an array of objects. |
array | $opts | Additional confguration options: cache - (Horde_Prefs_Cache) The cache driver to use. DEFAULT: No caching. logger - (Horde_Log_Logger) Logging object. DEFAULT: NONE sizecallback - (callback) If set, called when setting a value in the backend. DEFAULT: NONE user - (string) The name of the user who owns this set of preferences. DEFAULT: NONE |
getCache() : \Horde_Prefs_Cache_Base
Return the cache object.
Cache object.
getScopeObject( $scope = null) : \Horde_Prefs_Scope
Returns the current scope object.
$scope |
The current scope object.
setValue(string $pref, string $val, array $opts = array()) : boolean
Sets the given preference to the specified value if the preference is modifiable.
string | $pref | The preference name to modify. |
string | $val | The preference value (UTF-8). |
array | $opts | Additional options: - force: (boolean) If true, will set the value disregarding the current locked status of the pref. (@since 2.5.0) DEFAULT: false - nosave: (boolean) If true, the preference will not be saved to the storage backend(s). DEFAULT: false |
True if the value was successfully set, false on a failure.