phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
StringConverter Class Reference

Inherits PntStringConverter.

Additional Inherited Members

- Public Member Functions inherited from PntStringConverter
 __construct ()
 
 getDateTimezone ()
 
 getErrorInvalidNumber ()
 
 initFromProp ($prop)
 
 getLabelCharset ()
 
 getLanguageId ()
 
 setHtml_version_ent ($value)
 
 toHtml ($string, $breaksForLineFeeds=false, $preformatAndTab=0)
 
 toJsLiteral ($string, $quote="'")
 
 urlEncode ($string)
 
 toLabel ($value, $type)
 
 arrayToLabel ($array, $type)
 
 labelFromBoolean ($value)
 
 labelFromNumber ($value)
 
 labelFromDate ($value)
 
 labelFromTime ($value)
 
 labelFromTimestamp ($value)
 
 labelFromString ($value)
 
 labelFromObject ($value)
 
 fromRequestData ($requestString)
 
 fromLabel ($string)
 
 convert ($string)
 
 convertToBoolean ($string)
 
 convertToNumber ($string)
 
 convertToDate ($string)
 
 convertToTime ($string)
 
 convertToTimestamp ($string)
 
 convertToString ($string)
 
 convertToObject ($string)
 
 usKbConvert4Uropean ($string)
 
- Static Public Member Functions inherited from PntStringConverter
static html_version_entOptions ()
 
static getTimeStampSeparators ()
 
static convertDT ($string, $format, $type)
 
static splitDT ($value, $format)
 
static addMonthName (&$dateArray, $monthNames, $format='F')
 
static splitDtNoSeparators ($value, $formatArray)
 
static formatDT ($dtArray, $format)
 
static checkTime ($hours, $minutes, $seconds)
 
static sanitizeString ($txt)
 
static sanitizeHtml ($txt)
 
- Data Fields inherited from PntStringConverter
 $labelItemSeparator = ', '
 
 $true ='true'
 
 $false ='false'
 
 $dateTimezone = null
 
 $dateFormat ="Y-m-d"
 
 $timestampFormat ="Y-m-d H:i:s"
 
 $timeFormat ="H:i:s"
 
 $decimal ='.'
 
 $thousends =','
 
 $labelCharset = null
 
 $html_version_ent = 'ENT_HTML401'
 
 $html_version_flag = 0
 
 $languageId = 'en'
 
 $usKbSupport4Uropean = false
 
 $emptyToInfinity =false
 
 $errorInvalidNumber ='invalid number, expected is like: '
 
 $errorInvalidDate ='invalid date, expected is like: '
 
 $errorInvalidTimestamp ='invalid timestamp, expected is like: '
 
 $errorInvalidTime ='invalid time, expected is like: '
 
 $errorInvalidBoolean ='invalid boolean, expected: '
 
 $errorInvalidType ='invalid type: '
 
 $type
 
 $decimalPrecision = 2
 
 $asId = false
 
 $error
 

Detailed Description

Object of this class convert strings to values and back according to their format settings. All user interface String conversions are and should be delegated to StringConverters to make override possible.

This concrete subclass is here to keep de application developers code (including localization overrides) separated from the framework code.

See Also
http://www.phppeanuts.org/site/index_php/Menu/178 Framework code is in superclass. This class may be copied to an application folder to make application specific overrides.

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