internal package Foswiki::Configure::Valuer

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::Configure::Valuer

A container for configuration data values. This class is used to refer to two hashes of configuration values. The first is a hash of default values, and the second (which will have mostly the same keys) contains the current value (i.e. the value after any edits have been applied).

ClassMethod new($defaults, $values)

$defaults is a reference to the raw hash of defaults ($Foswiki::cfg, as taken from Foswiki.spec + Config.spec)

$values is a reference to the hash of current values (also $Foswiki::cfg, but as taken from Foswiki.spec + Config.spec + LocalSite.cfg)

ObjectMethod getCurrentValue() → $data

Get the current value

ObjectMethod defaultValue() → $data

Get the default value

ObjectMethod loadCGIParams($query, \%updated)

Get changed values from CGI. Each parameter is identified by a TYPEOF: param that specifies the keys e.g. ?TYPEOF:{Kiss}=Smooch. The type is used to determine if the value of {Kiss} in CGI is different to the value known to the Valuer (i.e. has been updated). If it is, the keys are added to the $updated hash.

Topic revision: r1 - 19 Apr 2011, ProjectContributor
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback