Skip to topic | Skip to bottom
APS Sahaja Yoga
You are here: APS Sahaja Yoga > TWiki Web > TWikiPrefsPrefsCacheDotPm r1 - 11 Dec 2005 - 12:09 - TWikiGuest


Start of topic | Skip to actions

Package TWiki::Prefs::PrefsCache

The PrefsCache? package holds a cache of topics that have been read in, using the TopicPrefs? class. These functions manage that cache.

ClassMethod new ($prefs,$type,$web,$topic,$prefix)

Creates a new Prefs object.

  • $prefs - controlling TWiki::Prefs object
  • $type - Type of prefs object to create, see notes.
  • $web - web containing topic to load from (required is $topic is set)
  • $topic - topic to load from
  • $prefix - key prefix for all preferences (used for plugins)

If the specified topic is not found, returns an empty object.

ObjectMethod loadPrefsFromTopic ($web,$topic,$keyPrefix)

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 final preferences can't be set this way, they can only be set in the context of a full topic read, because they cannot be finalised until after the whole topic has been read.

ObjectMethod stringify ($html,\%shown) -> $text

Generate an (HTML if $html) representation of the content of this cache.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © 1993-2005 Associazione di Promozione Sociale "Sahaja Yoga" di Verona
http://www.sahajayogaverona.it - info@sahajayogaveronaPROTEZIONESPAMDACANCELLARE.it
Tel. 3476521542