Class WFBaseDateFormatter

Description

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.

  • abstract:

Located in /framework/widgets/WFFormatter.php (line 66)

WFObject
   |
   --WFFormatter
      |
      --WFBaseDateFormatter
Direct descendents
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.
Variable Summary
Method Summary
WFBaseDateFormatter __construct ()
void relativeDate ( $time)
void replaceRelativeDates ( $formattedString,  $unixTS)
void setFormatString (string $fmt)
void setRelativeDateFormatString (string $fmt)
Variables
string $formatString (line 71)
mixed $relativeDateFormatString (line 72)
  • access: protected
Methods
Constructor __construct (line 74)
WFBaseDateFormatter __construct ()

Redefinition of:
WFFormatter::__construct()
relativeDate (line 112)
  • access: public
void relativeDate ( $time)
  • $time
replaceRelativeDates (line 102)
  • access: public
void replaceRelativeDates ( $formattedString,  $unixTS)
  • $formattedString
  • $unixTS
setFormatString (line 87)

Set the format string (see http://www.php.net/date) to use for the formatter.

void setFormatString (string $fmt)
  • string $fmt: The format string to use in formatting the date.
setRelativeDateFormatString (line 97)

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

void setRelativeDateFormatString (string $fmt)
  • string $fmt: The format string to use in formatting the relative date.

Inherited Methods

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::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:20:00 -0400 by phpDocumentor 1.4.2