Class Horde_Prefs_Scope
This class provides the storage for a preference scope.
Copyright 2010-2012 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.
-
Horde_Prefs_Scope
implements
Iterator,
Serializable
Methods summary
public
|
#
__construct( string $scope )
Constructor.
Parameters
- $scope
- The scope for this set of preferences.
|
public
boolean
|
#
remove( string $pref )
Removes a preference entry.
Removes a preference entry.
Parameters
- $pref
- The name of the preference to remove.
Returns
boolean True if preference was removed.
|
public
|
#
set( string $pref, string $val )
Sets the value for a preference.
Sets the value for a preference.
Parameters
- $pref
- The preference name.
- $val
- The preference value.
|
public
boolean
|
#
exists( mixed $pref )
Does a preference exist in this scope?
Does a preference exist in this scope?
Returns
boolean True if the preference exists.
|
public
string
|
#
get( string $pref )
Returns the value of a preference.
Returns the value of a preference.
Parameters
- $pref
- The preference name to retrieve.
Returns
string The value of the preference, null if it doesn't exist.
|
public
|
#
setLocked( string $pref, boolean $locked )
Mark a preference as locked.
Mark a preference as locked.
Parameters
- $pref
- The preference name.
- $locked
- Is the preference locked?
|
public
boolean
|
#
isLocked( string $pref )
Is a preference locked?
Parameters
- $pref
- The preference name.
Returns
boolean Whether the preference is locked.
|
public
boolean
|
#
isDefault( string $pref )
Is a preference's value the default?
Is a preference's value the default?
Parameters
- $pref
- The preference name.
Returns
boolean True if the preference contains the default value.
|
public
string
|
#
getDefault( string $pref )
Returns the default value of a preference.
Returns the default value of a preference.
Parameters
- $pref
- The preference name.
Returns
string The preference's default value.
|
public
array
|
#
getDirty( )
Get the list of dirty preferences.
Get the list of dirty preferences.
Returns
array The list of dirty preferences.
|
public
boolean
|
#
isDirty( mixed $pref = null )
Is a preference marked dirty?
Is a preference marked dirty?
Parameters
- $pref
- <p>The preference name. If null, will return true if
scope contains at least one dirty pref.</p>
Returns
boolean True if the preference is marked dirty.
|
public
|
#
setDirty( string $pref, boolean $dirty )
Set the dirty flag for a preference
Set the dirty flag for a preference
Parameters
- $pref
- The preference name.
- $dirty
- True to mark the pref as dirty.
|
public
|
#
current( )
Implementation of
Iterator::current()
|
public
|
#
key( )
Implementation of
Iterator::key()
|
public
|
#
next( )
Implementation of
Iterator::next()
|
public
|
#
rewind( )
Implementation of
Iterator::rewind()
|
public
|
#
valid( )
Implementation of
Iterator::valid()
|
public
|
#
serialize( )
Implementation of
Serializable::serialize()
|
public
|
#
unserialize( mixed $data )
Implementation of
Serializable::unserialize()
|
Properties summary
public
boolean
|
$init
Is the object being initialized?
Is the object being initialized?
|
|
public
string
|
$scope
|
|