diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/I18N/TDateFormat.php | 28 | ||||
-rw-r--r-- | framework/I18N/TNumberFormat.php | 29 |
3 files changed, 56 insertions, 2 deletions
@@ -25,6 +25,7 @@ CHG: TJavaScript::encode() will encode data as a list if integer indices are det ENH: Ticket#722 - Added Read Only capabilities to TInPlaceTextBox (Christophe) ENH: Ticket#741 - Added CDbConnection.currentTransaction property (Qiang) ENH: Ticket#743 - Added status code header in HTTP response when in error (Qiang) +ENH: Ticket#757 - TDateFormat and TNumberFormat now implement IDataRenderer (Qiang) ENH: Ticket#783 - Added date/time type support to soap implementation (Hongliang) ENH: Active Record supports multiple foreign references of the same table (Wei) ENH: Added TDbCommand.queryColumn() (Qiang) diff --git a/framework/I18N/TDateFormat.php b/framework/I18N/TDateFormat.php index 1f27cefe..28e729c6 100644 --- a/framework/I18N/TDateFormat.php +++ b/framework/I18N/TDateFormat.php @@ -56,7 +56,7 @@ Prado::using('System.I18N.TI18NControl'); * @version v1.0, last update on Sat Dec 11 15:25:11 EST 2004
* @package System.I18N
*/
-class TDateFormat extends TI18NControl
+class TDateFormat extends TI18NControl implements IDataRenderer
{
/**
* Default DateFormat, set to the application culture.
@@ -160,6 +160,32 @@ class TDateFormat extends TI18NControl }
/**
+ * Get the date-time value for this control.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link getValue()}.
+ * @return string date time value.
+ * @see getValue
+ * @since 3.1.2
+ */
+ public function getData()
+ {
+ return $this->getValue();
+ }
+
+ /**
+ * Set the date-time value for this control.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link setValue()}.
+ * @param string the date-time value.
+ * @see setValue
+ * @since 3.1.2
+ */
+ public function setData($value)
+ {
+ $this->setValue($value);
+ }
+
+ /**
* Renders the localized version of the date-time value.
* If the culture is not specified, the default application
* culture will be used.
diff --git a/framework/I18N/TNumberFormat.php b/framework/I18N/TNumberFormat.php index c603c371..581b0d74 100644 --- a/framework/I18N/TNumberFormat.php +++ b/framework/I18N/TNumberFormat.php @@ -61,7 +61,7 @@ Prado::using('System.I18N.TI18NControl'); * @version v1.0, last update on Sat Dec 11 17:49:56 EST 2004
* @package System.I18N
*/
-class TNumberFormat extends TI18NControl
+class TNumberFormat extends TI18NControl implements IDataRenderer
{
/**
* Default NumberFormat, set to the application culture.
@@ -105,6 +105,33 @@ class TNumberFormat extends TI18NControl $this->setViewState('Value',$value,'');
}
+
+ /**
+ * Get the numberic value for this control.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link getValue()}.
+ * @return string number
+ * @see getValue
+ * @since 3.1.2
+ */
+ public function getData()
+ {
+ return $this->getValue();
+ }
+
+ /**
+ * Set the numberic value for this control.
+ * This method is required by {@link IDataRenderer}.
+ * It is the same as {@link setValue()}.
+ * @param string the number value
+ * @see setValue
+ * @since 3.1.2
+ */
+ public function setData($value)
+ {
+ $this->setValue($value);
+ }
+
/**
* Get the formatting type for this control.
* @return string formatting type.
|