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