Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r5  >  r4  >  r3  >  r2  >  r1
TWikiPrefsDotPm 5 - 16 Jan 2007 - Main.TWikiContributor
Line: 33 to 33
 
Deleted:
<
<

ObjectMethod pushGlobalPreferences ()

Add global preferences to this preferences stack.

 

ObjectMethod pushPreferences ($web,$topic,$type)

  • $web - web to read from
  • $topic - topic to read
Line: 55 to 50
 
Added:
>
>

ObjectMethod pushGlobalPreferences ()

Add global preferences to this preferences stack.

 

ObjectMethod pushPreferencesValues ($type,\%values)

Push a new preference level using type and values given

TWikiPrefsDotPm 4 - 25 Oct 2006 - Main.TWikiContributor
Line: 98 to 98
 
Changed:
<
<

getTextPreferencesValue( $key, $text, $web, $topic ) -> $value

Get a preference value from the settings in the text. The values are not cached.
>
>

getTextPreferencesValue( $key, $text, $meta, $web, $topic ) -> $value

Get a preference value from the settings in the text (and/or optional $meta). The values read are not cached.
 

ObjectMethod getWebPreferencesValue ($key,$web) -> $value


TWikiPrefsDotPm 3 - 25 Jun 2006 - Main.TWikiContributor
Line: 25 to 25
 
Added:
>
>

ObjectMethod finish

Complete processing after the client's HTTP request has been responded to.
  1. breaking circular references to allow garbage collection in persistent environments

 

ObjectMethod pushGlobalPreferences ()

Add global preferences to this preferences stack.

TWikiPrefsDotPm 2 - 01 Apr 2006 - Main.TWikiContributor
Line: 91 to 91
 

getTextPreferencesValue( $key, $text, $web, $topic ) -> $value

Changed:
<
<
Get a preference value from the settings in the text. The parsed values are cached against the web, topic.
>
>
Get a preference value from the settings in the text. The values are not cached.
 

ObjectMethod getWebPreferencesValue ($key,$web) -> $value


TWikiPrefsDotPm 1 - 01 Feb 2006 - Main.TWikiContributor
Line: 1 to 1
Added:
>
>

Package TWiki::Prefs

The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these.

Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier.

The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!)

ClassMethod new ($session[,$cache])

Creates a new Prefs object. If $cache is defined, it will be pushed onto the stack.

ObjectMethod pushGlobalPreferences ()

Add global preferences to this preferences stack.

ObjectMethod pushPreferences ($web,$topic,$type)

  • $web - web to read from
  • $topic - topic to read
  • $type - DEFAULT, SITE, USER, SESSION, WEB, TOPIC or PLUGIN
  • $prefix - key prefix for all preferences (used for plugins)
Reads preferences from the given topic, and pushes them onto the preferences stack.

ObjectMethod pushWebPreferences ($web)

Pushes web preferences. Web preferences for a particular web depend on the preferences of all containing webs.

ObjectMethod pushPreferencesValues ($type,\%values)

Push a new preference level using type and values given

ObjectMethod mark ()

Return a marker representing the current top of the preferences stack. Used to remember the stack when new web and topic preferences are pushed during a topic include.

ObjectMethod resetTo ($mark)

Resets the preferences stack to the given mark, to recover after a topic include.

ObjectMethod getPreferencesValue ($key) -> $value

  • =$key - key to look up

Returns the value of the preference $key, or undef.

Looks up local preferences when the level topic is the same as the current web,topic in the session.

ObjectMethod isFinalised ($key)

Return true if $key is finalised somewhere in the prefs stack

ObjectMethod getTopicPreferencesValue ($key,$web,$topic) -> $value

Recover a preferences value that is defined in a specific topic. Does not recover web, user or global settings.

Intended for use in protections mechanisms, where the order doesn't match the prefs stack.

getTextPreferencesValue( $key, $text, $web, $topic ) -> $value

Get a preference value from the settings in the text. The parsed values are cached against the web, topic.

ObjectMethod getWebPreferencesValue ($key,$web) -> $value

Recover a preferences value that is defined in the webhome topic of a specific web.. Does not recover user or global settings, but does recover settings from containing webs.

Intended for use in protections mechanisms, where the order doesn't match the prefs stack.

ObjectMethod stringify() -> $text

Generate a TML-formatted version of the current preferences


Revision 5r5 - 16 Jan 2007 - 04:11:58 - TWikiContributor
Revision 4r4 - 25 Oct 2006 - 00:21:56 - TWikiContributor
Revision 3r3 - 25 Jun 2006 - 16:26:33 - TWikiContributor
Revision 2r2 - 01 Apr 2006 - 05:55:40 - TWikiContributor
Revision 1r1 - 01 Feb 2006 - 12:01:25 - TWikiContributor
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM