WFFormatter
Formatters provide a way for WFWidget objects to convert to and from text. Formatters are used by widgets to convert their "value" object into what is displayed and vice-versa. For instance, you could assign a DATE object (ie int) to a widget, and also a WFDateFormatter, and it would automatically convert the INT into a nice human-readable format. The user could edit this, and then the WFDateFormatter would convert the string back into a date object before proceeding.
Formatters should always allow EMPTY values cleanly. If the developer wants to enforce a non-empty value, that should be done via validation.
Located in /framework/widgets/WFFormatter.php (line 66)
WFObject | --WFFormatter | --WFBaseDateFormatter
| Class | Description |
|---|---|
| WFUNIXDateFormatter | The UNIX date formatter converts between human-readable dates and UNIX time. |
| WFSQLDateFormatter | The SQL Date formatter converts between SQL date format and human-readable dates. |
Set the format string (see http://www.php.net/date) to use for the formatter.
Set the format string (see http://www.php.net/date) to use for the relative data format string if it can't be represented with a relative date (ie, Yesterday, Tomorrow, Today, etc).
Inherited From WFFormatter
WFFormatter::__construct()
WFFormatter::editingStringForValue()
WFFormatter::stringForValue()
WFFormatter::valueForString()
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Sun, 28 Sep 2008 18:24:45 -0400 by phpDocumentor 1.4.1