spunQ_IntegerFieldConverter Class Reference

Converter for integer values. More...

Inheritance diagram for spunQ_IntegerFieldConverter:

spunQ_IFieldValueConverter

List of all members.

Public Member Functions

 convertSpunQToRaw ($value)
 Converts an application value to a raw value.
 convertRawToSpunQ ($messagePrefix, &$value)
 Converts a raw value to an application value.

Static Public Member Functions

static getInstance ()
 Provides the singleton instance of this class.

Private Member Functions

 __construct ()
 Constructor.

Static Private Attributes

static $instance = NULL
 Singleton instance.


Detailed Description

Converter for integer values.

Will merely cast raw values to integers.

Definition at line 7 of file IntegerFieldConverter.class.php.


Member Function Documentation

spunQ_IntegerFieldConverter::convertRawToSpunQ ( messagePrefix,
&$  value 
)

Converts a raw value to an application value.

Parameters:
$messagePrefix String to be prefixed to translation key of validation messages.
$value The value to convert. This is also an out parameter that will contain the converted spunQ value.
Returns:
array<string> Validation messages for the value.
Exceptions:
spunQ_InvalidRawValueException If the raw value has an unexpected type (i.e. array instead of string or vice versa.)

Implements spunQ_IFieldValueConverter.

Definition at line 44 of file IntegerFieldConverter.class.php.

spunQ_IntegerFieldConverter::convertSpunQToRaw ( value  ) 

Converts an application value to a raw value.

Parameters:
$value The value to convert.
Returns:
any The converted value.

Implements spunQ_IFieldValueConverter.

Definition at line 34 of file IntegerFieldConverter.class.php.


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

Generated on Fri Jul 1 11:12:42 2011 for spunQ3 by  doxygen 1.5.9