Class FormEnumeration

Description

Enumerations for XDO properties

Enumerations provide a list of valid values as well as nice captions for them. By default they are read from a xml block containing "<item>" elements where the node's content is the caption and a "value" attribute provides the value used. Otherwise they may be created empty and filled with values using the addOption() method.

Located in /phpsatk-lib/global/org.eenterphace.sat.forms/form.enumeration.php (line 39)


	
			
Method Summary
FormEnumeration __construct ([DOMElement $enumnode = null])
void addOption (mixed $value, string $caption)
string getCaption (mixed $value)
array[mixed=>string] getOptions ()
boolean isValid (string $value)
Methods
Constructor __construct (line 55)

Initializes the enumeration

Reads the list's options if a DOM node is passed.

  • access: public
FormEnumeration __construct ([DOMElement $enumnode = null])
  • DOMElement $enumnode: XML Block to read from (DOMElement)
addOption (line 82)

Adds an option to the enumeration

  • access: public
void addOption (mixed $value, string $caption)
  • mixed $value: Value of the option
  • string $caption: Caption of the option
getCaption (line 102)

Gets the caption for a value

  • access: public
string getCaption (mixed $value)
  • mixed $value: Value to get caption for
getOptions (line 119)

Gets an array of options and their captions

Key: option value Value: caption

  • access: public
array[mixed=>string] getOptions ()
isValid (line 92)

Checks whether a given option is valid

  • access: public
boolean isValid (string $value)
  • string $value: Value to check for

Documentation generated on Mon, 21 May 2007 10:34:59 +0200 by phpDocumentor 1.3.0RC5