MediaWiki  1.28.0
FormOptionsExposed Class Reference

This file host two test case classes for the MediaWiki FormOptions class: More...

Inheritance diagram for FormOptionsExposed:
Collaboration diagram for FormOptionsExposed:

Public Member Functions

 getOptions ()
 
- Public Member Functions inherited from FormOptions
 add ($name, $default, $type=self::AUTO)
 Add an option to be handled by this FormOptions instance. More...
 
 consumeValue ($name)
 Get the value of given option and mark it as 'consumed'. More...
 
 consumeValues ($names)
 Get the values of given options and mark them as 'consumed'. More...
 
 delete ($name)
 Remove an option being handled by this FormOptions instance. More...
 
 fetchValuesFromRequest (WebRequest $r, $optionKeys=null)
 Fetch values for all options (or selected options) from the given WebRequest, making them available for accessing with getValue() or consumeValue() etc. More...
 
 getAllValues ()
 Format options to an array ( name => value ) More...
 
 getChangedValues ()
 Return options modified as an array ( name => value ) More...
 
 getUnconsumedValues ($all=false)
 Get all remaining values which have not been consumed by consumeValue() or consumeValues(). More...
 
 getValue ($name)
 Get the value for the given option name. More...
 
 reset ($name)
 Delete the option value. More...
 
 setValue ($name, $value, $force=false)
 Use to set the value of an option. More...
 
 validateBounds ($name, $min, $max)
 Constrain a numeric value for a given option to a given range. More...
 
 validateIntBounds ($name, $min, $max)
 
 validateName ($name, $strict=false)
 Verify that the given option name exists. More...
 
 offsetExists ($name)
 Whether the option exists. More...
 
 offsetGet ($name)
 Retrieve an option value. More...
 
 offsetSet ($name, $value)
 Set an option to given value. More...
 
 offsetUnset ($name)
 Delete the option. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FormOptions
static guessType ($data)
 Used to find out which type the data is. More...
 
- Public Attributes inherited from FormOptions
const AUTO = -1
 Mark value for automatic detection (for simple data types only) More...
 
const STRING = 0
 String type, maps guessType() to WebRequest::getText() More...
 
const INT = 1
 Integer type, maps guessType() to WebRequest::getInt() More...
 
const FLOAT = 4
 Float type, maps guessType() to WebRequest::getFloat() More...
 
const BOOL = 2
 Boolean type, maps guessType() to WebRequest::getBool() More...
 
const INTNULL = 3
 Integer type or null, maps to WebRequest::getIntOrNull() This is useful for the namespace selector. More...
 
- Protected Member Functions inherited from FormOptions
 getValueReal ($option)
 Return current option value, based on a structure taken from $options. More...
 
- Protected Attributes inherited from FormOptions
 $options = []
 Map of known option names to information about them. More...
 

Detailed Description

This file host two test case classes for the MediaWiki FormOptions class:

The split let us take advantage of setting up a fixture for the methods tests. Dummy class to makes FormOptions::$options public. Used by FormOptionsInitializationTest which need to verify the $options array is correctly set through the FormOptions::add() function.

Definition at line 16 of file FormOptionsInitializationTest.php.

Member Function Documentation

FormOptionsExposed::getOptions ( )

Definition at line 17 of file FormOptionsInitializationTest.php.

References FormOptions\$options.


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