spunQ_IFieldValueConverter Interface Reference

Converts application values to raw values and vice versa. More...

Inheritance diagram for spunQ_IFieldValueConverter:

spunQ_BooleanField spunQ_DateField spunQ_DateTimeField spunQ_IntegerFieldConverter spunQ_MultipleChoiceField spunQ_ObjectField spunQ_SingleChoiceField spunQ_TimeField

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.


Detailed Description

Converts application values to raw values and vice versa.

A raw value is one that is retrieved from the POST or GET array, i.e. any combination of associtive arrays and strings. A spunQ value is any value used within the application (integer, boolean, spunQ_StorableObject, spunQ_DateTime, …).

Definition at line 10 of file IFieldValueConverter.interface.php.


Member Function Documentation

spunQ_IFieldValueConverter::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.)

Implemented in spunQ_BooleanField, spunQ_DateField, spunQ_DateTimeField, spunQ_MultipleChoiceField, spunQ_ObjectField, spunQ_SingleChoiceField, spunQ_TimeField, and spunQ_IntegerFieldConverter.

spunQ_IFieldValueConverter::convertSpunQToRaw ( value  ) 

Converts an application value to a raw value.

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

Implemented in spunQ_BooleanField, spunQ_DateField, spunQ_DateTimeField, spunQ_MultipleChoiceField, spunQ_ObjectField, spunQ_SingleChoiceField, spunQ_TimeField, and spunQ_IntegerFieldConverter.


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

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