data/TWiki/TWikiPrefsParserDotPm.txt,v
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/TWikiPrefsParserDotPm.txt,v	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +head	1.1;
     1.5 +access;
     1.6 +symbols;
     1.7 +locks; strict;
     1.8 +comment	@# @;
     1.9 +
    1.10 +
    1.11 +1.1
    1.12 +date	2006.02.01.12.01.25;	author TWikiContributor;	state Exp;
    1.13 +branches;
    1.14 +next	;
    1.15 +
    1.16 +
    1.17 +desc
    1.18 +@new-topic
    1.19 +@
    1.20 +
    1.21 +
    1.22 +1.1
    1.23 +log
    1.24 +@buildrelease
    1.25 +@
    1.26 +text
    1.27 +@---+ Package =TWiki::Prefs::Parser=
    1.28 +
    1.29 +This Prefs-internal class is used to parse * Set and * Local statements
    1.30 +from arbitrary text, and extract settings from meta objects.  It is used
    1.31 +by TopicPrefs to parse preference settings from topics.
    1.32 +
    1.33 +This class does no validation or duplicate-checking on the settings; it
    1.34 +simply returns the recognized settings in the order it sees them in.
    1.35 +
    1.36 +
    1.37 +%TOC%
    1.38 +
    1.39 +---++ ClassMethod *new* <tt>() -> topicparserobject</tt>
    1.40 +
    1.41 +Construct a new parser object.
    1.42 +
    1.43 +
    1.44 +
    1.45 +---++ ObjectMethod *parseText* <tt>($text,$prefs)</tt>
    1.46 +
    1.47 +Parse settings from text and add them to the preferences in $prefs
    1.48 +
    1.49 +
    1.50 +
    1.51 +---++ ObjectMethod *parseMeta* <tt>($metaObject,$prefs)</tt>
    1.52 +
    1.53 +Traverses through all PREFERENCE attributes of the meta object, creating one 
    1.54 +setting named with $settingPrefPrefix . 'title' for each.  It also 
    1.55 +creates an entry named with the field 'name', which is a cleaned-up, 
    1.56 +space-removed version of the title.
    1.57 +
    1.58 +Settings are added to the $prefs passed.
    1.59 +
    1.60 +
    1.61 +@