data/TWiki/TWikiPrefsParserDotPm.txt,v
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.1;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.1
       
     9 date	2006.02.01.12.01.25;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	;
       
    12 
       
    13 
       
    14 desc
       
    15 @new-topic
       
    16 @
       
    17 
       
    18 
       
    19 1.1
       
    20 log
       
    21 @buildrelease
       
    22 @
       
    23 text
       
    24 @---+ Package =TWiki::Prefs::Parser=
       
    25 
       
    26 This Prefs-internal class is used to parse * Set and * Local statements
       
    27 from arbitrary text, and extract settings from meta objects.  It is used
       
    28 by TopicPrefs to parse preference settings from topics.
       
    29 
       
    30 This class does no validation or duplicate-checking on the settings; it
       
    31 simply returns the recognized settings in the order it sees them in.
       
    32 
       
    33 
       
    34 %TOC%
       
    35 
       
    36 ---++ ClassMethod *new* <tt>() -> topicparserobject</tt>
       
    37 
       
    38 Construct a new parser object.
       
    39 
       
    40 
       
    41 
       
    42 ---++ ObjectMethod *parseText* <tt>($text,$prefs)</tt>
       
    43 
       
    44 Parse settings from text and add them to the preferences in $prefs
       
    45 
       
    46 
       
    47 
       
    48 ---++ ObjectMethod *parseMeta* <tt>($metaObject,$prefs)</tt>
       
    49 
       
    50 Traverses through all PREFERENCE attributes of the meta object, creating one 
       
    51 setting named with $settingPrefPrefix . 'title' for each.  It also 
       
    52 creates an entry named with the field 'name', which is a cleaned-up, 
       
    53 space-removed version of the title.
       
    54 
       
    55 Settings are added to the $prefs passed.
       
    56 
       
    57 
       
    58 @