
| Line: 33 to 33 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > | ObjectMethod finish ()Break circular references. | |||||||
ObjectMethod finalise ($parent)Finalise preferences in this cache, by freezing any preferences | ||||||||
| Line: 57 to 62 | ||||||||
| Changed: | ||||||||
| < < | ObjectMethod insert ($type,$key,$val) | |||||||
| > > | ObjectMethod insert ($type,$key,$val) -> $boolean | |||||||
| Adds a key-value pair of the given type to the object. Type is Set or Local. Callback used for the Prefs::Parser object, or can be used to add | ||||||||
| Line: 65 to 70 | ||||||||
| Note that attempts to redefine final preferences will be ignored. | ||||||||
| Added: | ||||||||
| > > | Returns 1 if the preference was defined, 0 otherwise. | |||||||
ObjectMethod stringify ($html,\%shown) -> $text | ||||||||
| Line: 47 to 47 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Changed: | ||||||||
| < < | ObjectMethod *loadPrefsFromText ($text,$web,$topic) | |||||||
| > > | ObjectMethod *loadPrefsFromText ($text,$meta,$web,$topic) | |||||||
| Changed: | ||||||||
| < < | Loads preferences from a topic. All settings loaded are prefixed with the key prefix (default ''). | |||||||
| > > | Loads preferences from text and optional metadata. All settings loaded
are prefixed with the key prefix (default ''). If $meta is defined,
then metadata will be taken from that object. Otherwise, $text will
be parsed to extract meta-data. | |||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > | Package =TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
On this page:
ClassMethod new ($prefs,$parent,$type,$web,$topic,$prefix)Creates a new Prefs object.
ObjectMethod finalise ($parent)Finalise preferences in this cache, by freezing any preferences listed in FINALPREFERENCES at their current value.
ObjectMethod *loadPrefsFromTopic ($web,$topic,$keyPrefix)Loads preferences from a topic. All settings loaded are prefixed with the key prefix (default '').ObjectMethod *loadPrefsFromText ($text,$web,$topic)Loads preferences from a topic. All settings loaded are prefixed with the key prefix (default '').ObjectMethod insert ($type,$key,$val)Adds a key-value pair of the given type to the object. Type is Set or Local. Callback used for the Prefs::Parser object, or can be used to add arbitrary new entries to a prefs cache. Note that attempts to redefine final preferences will be ignored.ObjectMethod stringify ($html,\%shown) -> $textGenerate an (HTML if $html) representation of the content of this cache. | |||||||