Package TWiki::Prefs::Parser

This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics.

This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in.

ClassMethod new () -> topicparserobject

Construct a new parser object.

ObjectMethod parseText ($text,$prefs)

Parse settings from text and add them to the preferences in $prefs

ObjectMethod parseMeta ($metaObject,$prefs)

Traverses through all PREFERENCE attributes of the meta object, creating one setting named with $settingPrefPrefix . 'title' for each. It also creates an entry named with the field 'name', which is a cleaned-up, space-removed version of the title.

Settings are added to the $prefs passed.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2006-02-01 - TWikiContributor
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. <br /> Ideas, requests, problems regarding lt;nopgt;TWiki? lt;a href='mailto:twiki-admin@kcl.ac.uk?subject=TWiki%20Feedback%20on%20TWiki.TWikiPrefsParserDotPm'gt;Send feedbacklt;/agt; <br /> Note: Please contribute updates to this topic on TWiki.org at <a href="http://twiki.org/cgi-bin/view/TWiki/TWikiPrefsParserDotPm" target="twiki.org">TWiki:TWiki.TWikiPrefsParserDotPm</a>.