PHP Class Horde_Prefs_Scope, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Iterator, implements Serializable
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$init boolean Is the object being initialized?
$scope string The scope name.

Protected Properties

Свойство Type Description
$_dirty array List of dirty prefs.
$_prefs array [l] => (boolean) Locked If not present, pref is not locked. [v] => (string) Current pref value ) For internal storage, if 'l' and 'v' are both not available: [pref_name] => (string) Current pref value

Méthodes publiques

Méthode Description
__construct ( string $scope ) Constructor.
current ( )
exists ( $pref ) : boolean Does a preference exist in this scope?
get ( string $pref ) : string Returns the value of a preference.
getDefault ( string $pref ) : string Returns the default value of a preference.
getDirty ( ) : array Get the list of dirty preferences.
isDefault ( string $pref ) : boolean Is a preference's value the default?
isDirty ( mixed $pref = null ) : boolean Is a preference marked dirty?
isLocked ( string $pref ) : boolean Is a preference locked?
key ( )
next ( )
remove ( string $pref ) : boolean Removes a preference entry.
rewind ( )
serialize ( )
set ( string $pref, string $val ) Sets the value for a preference.
setDirty ( string $pref, boolean $dirty ) Set the dirty flag for a preference
setLocked ( string $pref, boolean $locked ) Mark a preference as locked.
unserialize ( $data )
valid ( )

Méthodes protégées

Méthode Description
_fromInternal ( $pref )
_toInternal ( $pref, array $value )

Method Details

__construct() public méthode

Constructor.
public __construct ( string $scope )
$scope string The scope for this set of preferences.

_fromInternal() protected méthode

protected _fromInternal ( $pref )

_toInternal() protected méthode

protected _toInternal ( $pref, array $value )
$value array

current() public méthode

public current ( )

exists() public méthode

Does a preference exist in this scope?
public exists ( $pref ) : boolean
Résultat boolean True if the preference exists.

get() public méthode

Returns the value of a preference.
public get ( string $pref ) : string
$pref string The preference name to retrieve.
Résultat string The value of the preference, null if it doesn't exist.

getDefault() public méthode

Returns the default value of a preference.
public getDefault ( string $pref ) : string
$pref string The preference name.
Résultat string The preference's default value.

getDirty() public méthode

Get the list of dirty preferences.
public getDirty ( ) : array
Résultat array The list of dirty preferences.

isDefault() public méthode

Is a preference's value the default?
public isDefault ( string $pref ) : boolean
$pref string The preference name.
Résultat boolean True if the preference contains the default value.

isDirty() public méthode

Is a preference marked dirty?
public isDirty ( mixed $pref = null ) : boolean
$pref mixed The preference name. If null, will return true if scope contains at least one dirty pref.
Résultat boolean True if the preference is marked dirty.

isLocked() public méthode

Is a preference locked?
public isLocked ( string $pref ) : boolean
$pref string The preference name.
Résultat boolean Whether the preference is locked.

key() public méthode

public key ( )

next() public méthode

public next ( )

remove() public méthode

Removes a preference entry.
public remove ( string $pref ) : boolean
$pref string The name of the preference to remove.
Résultat boolean True if preference was removed.

rewind() public méthode

public rewind ( )

serialize() public méthode

public serialize ( )

set() public méthode

Sets the value for a preference.
public set ( string $pref, string $val )
$pref string The preference name.
$val string The preference value.

setDirty() public méthode

Set the dirty flag for a preference
public setDirty ( string $pref, boolean $dirty )
$pref string The preference name.
$dirty boolean True to mark the pref as dirty.

setLocked() public méthode

Mark a preference as locked.
public setLocked ( string $pref, boolean $locked )
$pref string The preference name.
$locked boolean Is the preference locked?

unserialize() public méthode

public unserialize ( $data )

valid() public méthode

public valid ( )

Property Details

$_dirty protected_oe property

List of dirty prefs.
protected array $_dirty
Résultat array

$_prefs protected_oe property

[l] => (boolean) Locked If not present, pref is not locked. [v] => (string) Current pref value ) For internal storage, if 'l' and 'v' are both not available: [pref_name] => (string) Current pref value
protected array $_prefs
Résultat array

$init public_oe property

Is the object being initialized?
public bool $init
Résultat boolean

$scope public_oe property

The scope name.
public string $scope
Résultat string