Public Member Functions | Protected Member Functions | Protected Attributes

TypeManager Class Reference

Public Member Functions

 __construct ($localeCode="")
 formattedStringToValue ($type, $format, $formattedString)
 valueToFormattedString ($type, $format, $value)
 convertDatetimeFormat ($oldFormattedValue, $oldFormat, $newFormat)
 setLocaleInfo ($localeInfo)

Protected Member Functions

 valueToNumber ($format, $value)
 numberToValue ($format, $formattedValue)
 valueToText ($format, $value)
 textToValue ($format, $formattedValue)
 valueToDate ($format, $value)
 dateToValue ($format, $formattedValue)
 valueToDatetime ($fmt, $value)
 datetimeToValue ($format, $formattedValue)
 valueToCurrency ($format, $value)
 currencyToValue ($format, $formattedValue)
 valueToPhone ($mask, $value)
 phoneToValue ($mask, $formattedValue)

Protected Attributes

 $_localeInfo

Detailed Description

Definition at line 25 of file TypeManager.php.


Constructor & Destructor Documentation

__construct ( localeCode = "" )

Constructor of TypeManager, set locale with $localCode parameter

Parameters:
string$localeCode
Returns:
void

Definition at line 39 of file TypeManager.php.


Member Function Documentation

convertDatetimeFormat ( oldFormattedValue,
oldFormat,
newFormat 
)

Convert a formatted datetime to another format

Parameters:
$oldFormattedValue- old formated value
$oldFormat- old format of value
$newFormat- new format of value
Returns:
string new formatted datetime value

Definition at line 320 of file TypeManager.php.

Here is the caller graph for this function:

currencyToValue ( format,
formattedValue 
) [protected]

Unformat a currency to value

Parameters:
string$format- type format
string$formattedValue- formatted string value
Returns:
mixed - value

Definition at line 259 of file TypeManager.php.

Here is the caller graph for this function:

datetimeToValue ( format,
formattedValue 
) [protected]

Unformat a datetime to value

Parameters:
string$format- type format
string$formattedValue- formatted string
Returns:
mix $stdFormat - ISO format YYYY-MM-DD HH:MM:SS

Definition at line 227 of file TypeManager.php.

Here is the call graph for this function:

Here is the caller graph for this function:

dateToValue ( format,
formattedValue 
) [protected]

Unformat a date to value

Parameters:
string$format- type format
string$formattedValue- formatted string
Returns:
mixed $stdFormat - ISO format YYYY-MM-DD

Definition at line 195 of file TypeManager.php.

Here is the call graph for this function:

Here is the caller graph for this function:

formattedStringToValue ( type,
format,
formattedString 
)

Convert Formatted String To Value

Parameters:
string$type- field type
string$format- type format
string$formattedString- formatted string
Returns:
mixed

Definition at line 58 of file TypeManager.php.

Here is the call graph for this function:

numberToValue ( format,
formattedValue 
) [protected]

Unformat a number to value

Parameters:
string$format- type format
string$formattedValue- formatted string
Returns:
mixed

Definition at line 125 of file TypeManager.php.

Here is the caller graph for this function:

phoneToValue ( mask,
formattedValue 
) [protected]

Unformat a phone to value

Parameters:
string$fmt- type format
string$formattedValue- formatted string
Returns:
mixed

Definition at line 305 of file TypeManager.php.

Here is the caller graph for this function:

textToValue ( format,
formattedValue 
) [protected]

Unformat a text to value

Parameters:
string$format- type format
string$formattedValue- formatted string
Returns:
mixed

Definition at line 159 of file TypeManager.php.

Here is the caller graph for this function:

valueToCurrency ( format,
value 
) [protected]

Format value to currency

Parameters:
string$format- type format
string$value- value
Returns:
string - formatted string

Definition at line 242 of file TypeManager.php.

Here is the caller graph for this function:

valueToDate ( format,
value 
) [protected]

Format value to date

Parameters:
string$format- type format
string$value- value
Returns:
string - Empty string or formatted Time/Date

Definition at line 173 of file TypeManager.php.

Here is the caller graph for this function:

valueToDatetime ( fmt,
value 
) [protected]

Format value to date time

Parameters:
string$fmt- type format
string$value- value
Returns:
string - formatted string

Definition at line 210 of file TypeManager.php.

Here is the call graph for this function:

Here is the caller graph for this function:

valueToFormattedString ( type,
format,
value 
)

Convert Value To Formatted String

Parameters:
string$type- field type
string$format- type format
string$value- value
Returns:
string - formatted string

Definition at line 82 of file TypeManager.php.

Here is the call graph for this function:

valueToNumber ( format,
value 
) [protected]

Format value to number

Parameters:
string$format- type format
string$value- value
Returns:
string formatted number

Definition at line 103 of file TypeManager.php.

Here is the caller graph for this function:

valueToPhone ( mask,
value 
) [protected]

Format value to phone number

Parameters:
string$fmt- type format
string$value- value
Returns:
string - formatted string

Definition at line 275 of file TypeManager.php.

Here is the caller graph for this function:

valueToText ( format,
value 
) [protected]

Format value to text

Parameters:
string$format- type format
string$value- value
Returns:
string formatted string

Definition at line 147 of file TypeManager.php.

Here is the caller graph for this function:


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