Class DataReflector

Description

Reflects all inputted data through hidden fields

Can optionally exclude some fields

Typical usage:

  1.      $ref new DataReflector();
  2.      $ref->exclude(array('id''name'));
  3.      $ref->excludeRegEx(array('/^setting-.+/'));
  4.      echo $ref->display($_POST);

Located in /inc/formslib/datareflector.php (line 31)


	
			
Variable Summary
string $basename
integer $DEBUG
array $excludes
array $limitKeys
array $limitValues
Method Summary
DataReflector DataReflector ()
void addLimit ( $keys,  $values)
string display (array $PD)
void exclude (mixed $arr)
void excludeLogin ()
void excludeRegEx (mixed $arr)
void _includeKey ( $key,  $val)
Variables
string $basename = '' (line 33)
  • var: basename that will be appended to all keys
integer $DEBUG = 0 (line 43)
  • var: debug level
array $excludes = array() (line 35)
  • var: list of fields to exclude from the datareflector
array $excludesRegEx = array() (line 37)
  • var: list of regexp fields to exclude from the datareflector
array $limitKeys = array() (line 39)
  • var: list of list of keys that have value restrictions
array $limitValues = array() (line 41)
  • var: list of list of values that are acceptable for the limited keys
Methods
Constructor DataReflector (line 48)

Create a datareflector object

DataReflector DataReflector ()
addLimit (line 123)
void addLimit ( $keys,  $values)
  • $keys
  • $values
display (line 57)

Creates hidden fields html representation

  • return: html hidden fields
string display (array $PD)
  • array $PD: array of $field => $value
exclude (line 96)

Exclude these fields from the reflection

void exclude (mixed $arr)
  • mixed $arr: single field or list of fields to exclude
excludeLogin (line 117)
void excludeLogin ()
excludeRegEx (line 109)

Exclude the fields that match these regexps from the reflection

void excludeRegEx (mixed $arr)
  • mixed $arr: single regexp or list of regexps to use for exclusion
_includeKey (line 71)
void _includeKey ( $key,  $val)
  • $key
  • $val

Documentation generated on Tue, 06 Mar 2007 10:01:10 +0000 by phpDocumentor 1.3.0