| [ Index ] |
PHP Cross Reference of MantisBT |
[Source view] [Print] [Project Stats]
(no description)
| Copyright: | Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net |
| File Size: | 220 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
MantisEnum:: (10 methods):
getLabel()
getLocalizedLabel()
getValue()
getAssocArrayIndexedByValues()
getAssocArrayIndexedByLabels()
getValues()
hasValue()
getArrayOfTuples()
getArrayForTuple()
getLabelForUnknownValue()
Class: MantisEnum - X-Ref
A class that handles MantisBT Enumerations.| getLabel( $enumString, $value ) X-Ref |
| Get the string associated with the $p_enum value param: string $enumString param: int $value return: string |
| getLocalizedLabel( $enumString, $localizedEnumString, $value ) X-Ref |
| Gets the localized label corresponding to a value. Note that this method takes in the standard / localized enums so that if the value is in the localized enum but not the standard one, then it returns not found. param: string $enumString The standard enum string. param: string $localizedEnumString The localized enum string. param: integer $value The value to lookup. return: the label or the decorated value to represent not found. |
| getValue( $enumString, $label ) X-Ref |
| Gets the value associated with the specified label. param: string $enumString The enumerated string. param: string $label The label to map. return: integer value of the enum or false if not found. |
| getAssocArrayIndexedByValues( $enumString ) X-Ref |
| Get an associate array for the tuples of the enum where the values are the array indices and the labels are the array values. param: string $enumString return: associate array indexed by labels. |
| getAssocArrayIndexedByLabels( $enumString ) X-Ref |
| Get an associate array for the tuples of the enum where the labels are the array indices and the values are the array values. param: string $enumString return: associate array indexed by labels. |
| getValues( $enumString ) X-Ref |
| Gets an array with all values in the enum. param: $enumString return: array of unique values. |
| hasValue( $enumString, $value ) X-Ref |
| Checks if the specified enum string contains the specified value. param: string $enumString The enumeration string. param: integer $value The value to chec, return: bool true if found, false otherwise. |
| getArrayOfTuples( $enumString ) X-Ref |
| Breaks up an enum string into num:value elements param: string $enumString enum string return: array array of num:value elements |
| getArrayForTuple( $tuple ) X-Ref |
| Given one num:value pair it will return both in an array num will be first (element 0) value second (element 1) param: string $tuple a num:value pair return: array array(value, label) |
| getLabelForUnknownValue( $value ) X-Ref |
| Given a value it decorates it and returns it as the label. param: integer The value (e.g. 50). return: The decorated value (e.g. @50@). |
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |