FormOptions Class Reference

Helper class to keep track of options when mixing links and form elements. More...

List of all members.

Public Member Functions

 add ($name, $default, $type=self::AUTO)
 delete ($name)
 validateName ($name, $strict=false)
 setValue ($name, $value, $force=false)
 getValue ($name)
 reset ($name)
 consumeValue ($name)
 consumeValues ($names)
 validateIntBounds ($name, $min, $max)
 getUnconsumedValues ($all=false)
 getChangedValues ()
 getAllValues ()
 fetchValuesFromRequest (WebRequest $r, $values=false)
 offsetExists ($name)
 offsetGet ($name)
 offsetSet ($name, $value)
 offsetUnset ($name)

Static Public Member Functions

static guessType ($data)

Public Attributes

const AUTO = -1
const STRING = 0
 Automatically detects simple data types.
const INT = 1
const BOOL = 2
const INTNULL = 3

Protected Member Functions

 getValueReal ($option)

Protected Attributes

 $options = array()
 Useful for namespace selector.


Detailed Description

Helper class to keep track of options when mixing links and form elements.

Author:
Niklas Laxström Copyright © 2008, Niklas Laxström

Definition at line 9 of file FormOptions.php.


Member Function Documentation

FormOptions::add ( $  name,
$  default,
$  type = self::AUTO 
)

Definition at line 20 of file FormOptions.php.

References $name, $type, and guessType().

FormOptions::consumeValue ( $  name  ) 

Definition at line 93 of file FormOptions.php.

References $name, getValueReal(), and validateName().

FormOptions::consumeValues ( $  names  ) 

Definition at line 99 of file FormOptions.php.

References $name, $out, getValueReal(), and validateName().

FormOptions::delete ( $  name  ) 

Definition at line 35 of file FormOptions.php.

References $name, and validateName().

FormOptions::fetchValuesFromRequest ( WebRequest $  r,
$  values = false 
)

FormOptions::getAllValues (  ) 

Definition at line 147 of file FormOptions.php.

References $name, and getValueReal().

FormOptions::getChangedValues (  ) 

Definition at line 137 of file FormOptions.php.

References $name.

FormOptions::getUnconsumedValues ( $  all = false  ) 

Definition at line 125 of file FormOptions.php.

References $name, and getValueReal().

FormOptions::getValue ( $  name  ) 

Definition at line 75 of file FormOptions.php.

References $name, getValueReal(), and validateName().

Referenced by offsetGet().

FormOptions::getValueReal ( $  option  )  [protected]

static FormOptions::guessType ( $  data  )  [static]

Definition at line 40 of file FormOptions.php.

Referenced by add().

FormOptions::offsetExists ( $  name  ) 

Definition at line 186 of file FormOptions.php.

References $name.

FormOptions::offsetGet ( $  name  ) 

Definition at line 190 of file FormOptions.php.

References $name, and getValue().

FormOptions::offsetSet ( $  name,
$  value 
)

Definition at line 194 of file FormOptions.php.

References $name, and setValue().

FormOptions::offsetUnset ( $  name  ) 

Definition at line 198 of file FormOptions.php.

References $name.

FormOptions::reset ( $  name  ) 

Definition at line 88 of file FormOptions.php.

References $name, and validateName().

Referenced by SpecialRecentChanges::buildMainQueryConds().

FormOptions::setValue ( $  name,
$  value,
$  force = false 
)

Definition at line 65 of file FormOptions.php.

References $name, and validateName().

Referenced by offsetSet(), and validateIntBounds().

FormOptions::validateIntBounds ( $  name,
$  min,
$  max 
)

Definition at line 111 of file FormOptions.php.

References $name, getValueReal(), setValue(), and validateName().

FormOptions::validateName ( $  name,
$  strict = false 
)

Definition at line 54 of file FormOptions.php.

References $name.

Referenced by consumeValue(), consumeValues(), delete(), getValue(), reset(), setValue(), and validateIntBounds().


Member Data Documentation

FormOptions::$options = array() [protected]

Useful for namespace selector.

Definition at line 16 of file FormOptions.php.

const FormOptions::AUTO = -1

Definition at line 10 of file FormOptions.php.

const FormOptions::BOOL = 2

Definition at line 13 of file FormOptions.php.

const FormOptions::INT = 1

Definition at line 12 of file FormOptions.php.

Automatically detects simple data types.

Definition at line 11 of file FormOptions.php.


The documentation for this class was generated from the following file:

Generated on Thu Jul 29 17:01:57 2010 for MediaWiki by  doxygen 1.5.9