Package
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!)
| ||||||||
Changed: | ||||||||
< < | ObjectMethod pushPreferences ($web,$topic,$type) | |||||||
> > | ObjectMethod pushPreferences ($web,$topic,$type,$prefix) | |||||||
ObjectMethod pushWebPreferences ($web)Pushes web preferences. Web preferences for a particular web depend on the preferences of all containing webs.ObjectMethod pushGlobalPreferences ()Add global preferences to this preferences stack.ObjectMethod pushPreferencesValues ($type,\%values)Push a new preference level using type and values givenObjectMethod 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 restore ($mark)Resets the preferences stack to the given mark, to recover after a topic include.ObjectMethod getPreferencesValue ($key) -> $value
$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 stackObjectMethod getTopicPreferencesValue ($key,$web,$topic) -> $valueRecover 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, $meta, $web, $topic ) -> $valueGet a preference value from the settings in the text (and/or optional $meta). The values read are not cached.ObjectMethod getWebPreferencesValue ($key,$web) -> $valueRecover 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.setPreferencesValue($name, $val)Set a preferences value. The preference is set in the context at the top of the preference stack, whatever the current state may be. The preference is not serialised.ObjectMethod stringify() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
| ||||||||
Changed: | ||||||||
< < | ObjectMethod finishComplete processing after the client's HTTP request has been responded | |||||||
> > | ObjectMethod finish ()Break circular references. | |||||||
Deleted: | ||||||||
< < | to.
| |||||||
ObjectMethod pushPreferences ($web,$topic,$type)
ObjectMethod pushWebPreferences ($web)Pushes web preferences. Web preferences for a particular web depend on the preferences of all containing webs.ObjectMethod pushGlobalPreferences ()Add global preferences to this preferences stack.ObjectMethod pushPreferencesValues ($type,\%values)Push a new preference level using type and values givenObjectMethod 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. | ||||||||
Changed: | ||||||||
< < | ObjectMethod resetTo ($mark) | |||||||
> > | ObjectMethod restore ($mark) | |||||||
Resets the preferences stack to the given mark, to recover after a topic
include.
ObjectMethod getPreferencesValue ($key) -> $value
$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 stackObjectMethod getTopicPreferencesValue ($key,$web,$topic) -> $valueRecover 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, $meta, $web, $topic ) -> $valueGet a preference value from the settings in the text (and/or optional $meta). The values read are not cached.ObjectMethod getWebPreferencesValue ($key,$web) -> $valueRecover 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. | ||||||||
Added: | ||||||||
> > |
setPreferencesValue($name, $val)Set a preferences value. The preference is set in the context at the top of the preference stack, whatever the current state may be. The preference is not serialised. | |||||||
ObjectMethod stringify() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
| ||||||||
Deleted: | ||||||||
< < | ObjectMethod pushGlobalPreferences ()Add global preferences to this preferences stack. | |||||||
ObjectMethod pushPreferences ($web,$topic,$type)
ObjectMethod pushWebPreferences ($web)Pushes web preferences. Web preferences for a particular web depend on the preferences of all containing webs. | ||||||||
Added: | ||||||||
> > |
ObjectMethod pushGlobalPreferences ()Add global preferences to this preferences stack. | |||||||
ObjectMethod pushPreferencesValues ($type,\%values)Push a new preference level using type and values givenObjectMethod 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 , 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 stackObjectMethod getTopicPreferencesValue ($key,$web,$topic) -> $valueRecover 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, $meta, $web, $topic ) -> $valueGet a preference value from the settings in the text (and/or optional $meta). The values read are not cached.ObjectMethod getWebPreferencesValue ($key,$web) -> $valueRecover 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() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
| ||||||||
Changed: | ||||||||
< < | getTextPreferencesValue( $key, $text, $web, $topic ) -> $valueGet a preference value from the settings in the text. The values are not cached. | |||||||
> > | getTextPreferencesValue( $key, $text, $meta, $web, $topic ) -> $valueGet a preference value from the settings in the text (and/or optional $meta). The values read are not cached. | |||||||
ObjectMethod getWebPreferencesValue ($key,$web) -> $valueRecover 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() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
| ||||||||
Added: | ||||||||
> > | ObjectMethod finishComplete processing after the client's HTTP request has been responded to.
| |||||||
ObjectMethod pushGlobalPreferences ()Add global preferences to this preferences stack.ObjectMethod pushPreferences ($web,$topic,$type)
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 givenObjectMethod 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 , 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 stackObjectMethod getTopicPreferencesValue ($key,$web,$topic) -> $valueRecover 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 ) -> $valueGet a preference value from the settings in the text. The values are not cached.ObjectMethod getWebPreferencesValue ($key,$web) -> $valueRecover 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() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
| ||||||||
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) -> $valueRecover 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() -> $textGenerate a TML-formatted version of the current preferences |
Package
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!)
|