diff options
Diffstat (limited to 'framework')
34 files changed, 124 insertions, 124 deletions
diff --git a/framework/I18N/TDateFormat.php b/framework/I18N/TDateFormat.php index 985f5115..711dd563 100644 --- a/framework/I18N/TDateFormat.php +++ b/framework/I18N/TDateFormat.php @@ -2,11 +2,11 @@ /**
* TDateFromat formatting component.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the BSD License.
*
- * Copyright(c) 2004 by Xiang Wei Zhuo.
+ * Copyright(c) 2004 by Xiang Wei Zhuo.
*
* To contact the author write to {@link mailto:qiang.xue@gmail.com Qiang Xue}
* The latest version of PRADO can be obtained from:
@@ -16,20 +16,20 @@ * @version $Revision: 1.11 $ $Date: 2005/12/16 04:33:02 $
* @package System.I18N
*/
-
+
/**
* Get the DateFormat class.
*/
Prado::using('System.I18N.core.DateFormat');
/**
- * To format dates and/or time according to the current locale use
+ * To format dates and/or time according to the current locale use
* <code>
* <com:TDateFormat Pattern="dd:MMM:yyyy" Value="01/01/2001" />
- *</code>
- * The date will be formatted according to the current locale (or culture)
+ *</code>
+ * The date will be formatted according to the current locale (or culture)
* using the format specified by 'Pattern' attribute.
- *
+ *
* To format date and/or time for a locale (e.g. de_DE) include a Culture
* attribute, for example:
* <code>
@@ -37,15 +37,15 @@ Prado::using('System.I18N.core.DateFormat'); * </code>
* The date will be formatted according to this format.
*
- * If no Pattern was specified then the date will be formatted with the
+ * If no Pattern was specified then the date will be formatted with the
* default format (both date and time). If no value for the date is specified
- * then the current date will be used. E.g.: <code><com:TDateFormat /></code>
+ * then the current date will be used. E.g.: <code><com:TDateFormat /></code>
* will result in the current date, formatted with default localized pattern.
*
* Namespace: System.I18N
*
* Properties
- * - <b>Value</b>, date,
+ * - <b>Value</b>, date,
* <br>Gets or sets the date to format. The tag content is used as Value
* if the Value property is not specified.
* - <b>Pattern</b>, string,
@@ -54,7 +54,7 @@ Prado::using('System.I18N.core.DateFormat'); * 'long time', 'medium time', and 'short time'. Custom patterns can
* specified when the Pattern property does not match the predefined
* patterns.
- *
+ *
* @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version v1.0, last update on Sat Dec 11 15:25:11 EST 2004
* @package System.I18N
@@ -63,13 +63,13 @@ class TDateFormat extends TI18NControl {
/**
* Default DateFormat, set to the application culture.
- * @var DateFormat
+ * @var DateFormat
*/
protected static $formatter;
-
+
/**
* A set of pattern presets and their respective formatting shorthand.
- * @var array
+ * @var array
*/
protected $patternPresets = array(
'fulldate'=>'P','full'=>'P',
@@ -78,7 +78,7 @@ class TDateFormat extends TI18NControl 'shortdate'=>'d','short'=>'d',
'fulltime'=>'Q', 'longtime'=>'T',
'mediumtime'=>'q', 'shorttime'=>'t');
-
+
/**
* Sets the date time formatting pattern.
* @param string format pattern.
@@ -87,15 +87,15 @@ class TDateFormat extends TI18NControl {
$this->setViewState('Pattern',$value,'');
}
-
+
/**
* Gets the date time format pattern.
* @return string format pattern.
*/
function getPattern()
- {
+ {
$string = $this->getViewState('Pattern','');
-
+
$pattern = null;
//try the subpattern of "date time" presets
@@ -106,9 +106,9 @@ class TDateFormat extends TI18NControl $datetime[] = $this->getPreset($subpatterns[0]);
$datetime[] = $this->getPreset($subpatterns[1]);
}
-
+
//we have a good subpattern
- if(count($datetime) == 2
+ if(count($datetime) == 2
&& strlen($datetime[0]) == 1
&& strlen($datetime[1]) == 1)
{
@@ -116,20 +116,20 @@ class TDateFormat extends TI18NControl }
else //no subpattern, try the presets
$pattern = $this->getPreset($string);
-
+
//no presets found, use the string as the pattern
//and let the DateFormat handle it.
if(is_null($pattern))
$pattern = $string;
- if (!is_array($pattern) && strlen($pattern) == 0)
+ if (!is_array($pattern) && strlen($pattern) == 0)
$pattern = null;
return $pattern;
}
-
+
/**
* For a given string, try and find a preset pattern.
* @param string the preset pattern name
- * @return string a preset pattern if found, null otherwise.
+ * @return string a preset pattern if found, null otherwise.
*/
protected function getPreset($string)
{
@@ -140,10 +140,10 @@ class TDateFormat extends TI18NControl return $preset;
}
}
-
+
/**
* Get the date-time value for this control.
- * @return string date time value.
+ * @return string date time value.
*/
function getValue()
{
@@ -152,7 +152,7 @@ class TDateFormat extends TI18NControl return time();
return $value;
}
-
+
/**
* Set the date-time value for this control.
* @param string the date-time value.
@@ -161,42 +161,42 @@ class TDateFormat extends TI18NControl {
$this->setViewState('Value',$value,'');
}
-
+
/**
* Renders the localized version of the date-time value.
* If the culture is not specified, the default application
* culture will be used.
* This method overrides parent's implementation.
- */
+ */
protected function getFormattedDate()
{
$app = $this->Application->getGlobalization();
-
+
//initialized the default class wide formatter
if(is_null(self::$formatter))
self::$formatter = new DateFormat($app->getCulture());
-
+
$culture = $this->getCulture();
//return the specific cultural formatted date time
if(strlen($culture) && $app->getCulture() !== $culture)
{
$formatter = new DateFormat($culture);
- return $formatter->format($this->getValue(),
- $this->getPattern(),
+ return $formatter->format($this->getValue(),
+ $this->getPattern(),
$this->getCharset());
}
//return the application wide culture formatted date time.
- $result = self::$formatter->format($this->getValue(),
- $this->getPattern(),
+ $result = self::$formatter->format($this->getValue(),
+ $this->getPattern(),
$this->getCharset());
return $result;
}
- protected function render($writer)
+ public function render($writer)
{
$writer->write($this->getFormattedDate());
}
-
+
}
?>
\ No newline at end of file diff --git a/framework/I18N/TNumberFormat.php b/framework/I18N/TNumberFormat.php index 9f2de233..e50a0de3 100644 --- a/framework/I18N/TNumberFormat.php +++ b/framework/I18N/TNumberFormat.php @@ -1,11 +1,11 @@ <?php
/**
* TNumberFromat component.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the BSD License.
*
- * Copyright(c) 2004 by Xiang Wei Zhuo.
+ * Copyright(c) 2004 by Xiang Wei Zhuo.
*
* To contact the author write to {@link mailto:qiang.xue@gmail.com Qiang Xue}
* The latest version of PRADO can be obtained from:
@@ -23,37 +23,37 @@ Prado::using('System.I18N.core.NumberFormat'); /**
- * To format numbers in locale sensitive manner use
+ * To format numbers in locale sensitive manner use
* <code>
* <com:TNumberFormat Pattern="0.##" value="2.0" />
* </code>
- *
+ *
* Numbers can be formatted as currency, percentage, decimal or scientific
- * numbers by specifying the Type attribute. The known types are
+ * numbers by specifying the Type attribute. The known types are
* "currency", "percentage", "decimal" and "scientific".
*
- * If someone from US want to see sales figures from a store in
- * Germany (say using the EURO currency), formatted using the german
- * currency, you would need to use the attribute Culture="de_DE" to get
- * the currency right, e.g. 100,00 â‚?. The decimal and grouping separator is
- * then also from the de_DE locale. This may lead to some confusion because
+ * If someone from US want to see sales figures from a store in
+ * Germany (say using the EURO currency), formatted using the german
+ * currency, you would need to use the attribute Culture="de_DE" to get
+ * the currency right, e.g. 100,00 â‚?. The decimal and grouping separator is
+ * then also from the de_DE locale. This may lead to some confusion because
* people from US know the "," as thousand separator. Therefore a "Currency"
* attribute is available, so that the output from the following example
* results in â‚?100.00
* <code>
* <com:TNumberFormat Type="currency" Culture="en_US" Currency="EUR" Value="100" />
* </code>
- *
+ *
* Namespace: System.I18N
*
* Properties
- * - <b>Value</b>, number,
+ * - <b>Value</b>, number,
* <br>Gets or sets the number to format. The tag content is used as Value
* if the Value property is not specified.
* - <b>Type</b>, string,
- * <br>Gets or sets the formatting type. The valid types are
+ * <br>Gets or sets the formatting type. The valid types are
* 'decimal', 'currency', 'percentage' and 'scientific'.
- * - <b>Currency</b>, string,
+ * - <b>Currency</b>, string,
* <br>Gets or sets the currency symbol for the currency format.
* The default is 'USD' if the Currency property is not specified.
* - <b>Pattern</b>, string,
@@ -62,15 +62,15 @@ Prado::using('System.I18N.core.NumberFormat'); * @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
* @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
{
/**
* Default NumberFormat, set to the application culture.
- * @var NumberFormat
+ * @var NumberFormat
*/
protected static $formatter;
-
+
/**
* Get the number formatting pattern.
* @return string format pattern.
@@ -79,7 +79,7 @@ class TNumberFormat extends TI18NControl {
return $this->getViewState('Pattern','');
}
-
+
/**
* Set the number format pattern.
* @param string format pattern.
@@ -88,16 +88,16 @@ class TNumberFormat extends TI18NControl {
$this->setViewState('Pattern',$pattern,'');
}
-
+
/**
* Get the numberic value for this control.
* @return string number
*/
function getValue()
- {
+ {
return $this->getViewState('Value','');
}
-
+
/**
* Set the numberic value for this control.
* @param string the number value
@@ -106,7 +106,7 @@ class TNumberFormat extends TI18NControl {
$this->setViewState('Value',$value,'');
}
-
+
/**
* Get the formatting type for this control.
* @return string formatting type.
@@ -118,17 +118,17 @@ class TNumberFormat extends TI18NControl return 'd';
return $type;
}
-
+
/**
* Set the formatting type for this control.
- * @param string formatting type, either "decimal", "currency","percentage"
+ * @param string formatting type, either "decimal", "currency","percentage"
* or "scientific"
* @throws TPropertyTypeInvalidException
*/
function setType($type)
{
$type = strtolower($type);
-
+
switch($type)
{
case 'decimal':
@@ -142,13 +142,13 @@ class TNumberFormat extends TI18NControl default:
throw new TPropertyTypeInvalidException($this,'Type',$type);
}
-
+
}
-
+
/**
* Get the currency for this control.
* @param parameter
- * @return string 3 letter currency code.
+ * @return string 3 letter currency code.
*/
function getCurrency()
{
@@ -157,33 +157,33 @@ class TNumberFormat extends TI18NControl return 'USD';
return $currency;
}
-
+
/**
- * Set the 3-letter ISO 4217 code. For example, the code
+ * Set the 3-letter ISO 4217 code. For example, the code
* "USD" represents the US Dollar and "EUR" represents the Euro currency.
* @param string currency code.
*/
function setCurrency($currency)
{
$this->setViewState('Currency', $currency,'');
- }
-
+ }
+
/**
* Formats the localized number, be it currency or decimal, or percentage.
* If the culture is not specified, the default application
* culture will be used.
* @return string formatted number
- */
+ */
protected function getFormattedValue()
{
$app = $this->Application->getGlobalization();
//initialized the default class wide formatter
if(is_null(self::$formatter))
self::$formatter = new NumberFormat($app->getCulture());
-
- $pattern = strlen($this->getPattern()) > 0
+
+ $pattern = strlen($this->getPattern()) > 0
? $this->getPattern() : $this->getType();
-
+
$culture = $this->getCulture();
//return the specific cultural formatted number
if(!empty($culture) && $app->getCulture() != $culture)
@@ -193,14 +193,14 @@ class TNumberFormat extends TI18NControl $this->getCurrency(),
$this->getCharset());
}
-
+
//return the application wide culture formatted number.
return self::$formatter->format($this->getValue(),$pattern,
- $this->getCurrency(),
+ $this->getCurrency(),
$this->getCharset());
}
- protected function render($writer)
+ public function render($writer)
{
$writer->write($this->getFormattedValue());
}
diff --git a/framework/I18N/TTranslate.php b/framework/I18N/TTranslate.php index d38e3281..e013b37d 100644 --- a/framework/I18N/TTranslate.php +++ b/framework/I18N/TTranslate.php @@ -138,7 +138,7 @@ class TTranslate extends TI18NControl /**
* renders the translated string.
*/
- protected function render($writer)
+ public function render($writer)
{
$textWriter=new TTextWriter;
$htmlWriter=new THtmlWriter($textWriter);
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 5c959b7f..80956312 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -620,7 +620,7 @@ class TControl extends TComponent * @param mixed the default value. If $key is not found in viewstate, $defaultValue will be returned
* @return mixed the viewstate value corresponding to $key
*/
- protected function getViewState($key,$defaultValue=null)
+ public function getViewState($key,$defaultValue=null)
{
return isset($this->_viewState[$key])?$this->_viewState[$key]:$defaultValue;
}
@@ -635,7 +635,7 @@ class TControl extends TComponent * @param mixed the viewstate value to be set
* @param mixed default value. If $value===$defaultValue, the item will be cleared from the viewstate.
*/
- protected function setViewState($key,$value,$defaultValue=null)
+ public function setViewState($key,$value,$defaultValue=null)
{
if($value===$defaultValue)
unset($this->_viewState[$key]);
@@ -647,7 +647,7 @@ class TControl extends TComponent * Clears a viewstate value.
* @param string the name of the viewstate value to be cleared
*/
- protected function clearViewState($key)
+ public function clearViewState($key)
{
unset($this->_viewState[$key]);
}
@@ -1225,7 +1225,7 @@ class TControl extends TComponent * Only when the control is visible will the control be rendered.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderControl($writer)
+ public function renderControl($writer)
{
if($this->getVisible(false))
$this->render($writer);
@@ -1238,7 +1238,7 @@ class TControl extends TComponent * By default, the control simply renders all its child contents.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
$this->renderChildren($writer);
}
@@ -1249,7 +1249,7 @@ class TControl extends TComponent * and renders them in order.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderChildren($writer)
+ public function renderChildren($writer)
{
if($this->getHasControls())
{
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php index 839d6c52..1a6cc21a 100644 --- a/framework/Web/UI/TForm.php +++ b/framework/Web/UI/TForm.php @@ -68,7 +68,7 @@ class TForm extends TControl /**
* @internal
*/
- protected function render($writer)
+ public function render($writer)
{
$this->addAttributesToRender($writer);
$writer->renderBeginTag('form');
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index f0d67048..97ba1a8b 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -429,7 +429,7 @@ abstract class TBaseValidator extends TLabel implements IValidator * Renders the validator control. * @param THtmlWriter writer for the rendering purpose */ - protected function renderContents($writer) + public function renderContents($writer) { if(($text=$this->getText())!=='') $writer->write($text); diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php index d36268ce..8857ecb1 100644 --- a/framework/Web/UI/WebControls/TBulletedList.php +++ b/framework/Web/UI/WebControls/TBulletedList.php @@ -236,7 +236,7 @@ class TBulletedList extends TListControl implements IPostBackEventHandler * Renders the control.
* @param THtmlWriter the writer for the rendering purpose.
*/
- protected function render($writer)
+ public function render($writer)
{
if($this->getHasItems())
parent::render($writer);
@@ -246,7 +246,7 @@ class TBulletedList extends TListControl implements IPostBackEventHandler * Renders the body contents.
* @param THtmlWriter the writer for the rendering purpose.
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
$this->_isEnabled=$this->getEnabled(true);
$this->_postBackOptions=$this->getPostBackOptions();
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index b8956739..2ced3098 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -118,7 +118,7 @@ class TButton extends TWebControl implements IPostBackEventHandler * This overrides the parent implementation with nothing to be rendered.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
}
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index 4022d1c6..60b45e8d 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -222,7 +222,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl * and a span element if needed.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
$this->addAttributesToRender($writer);
$this->getPage()->ensureRenderInForm($this);
diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index b4f21ca7..18aef302 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -358,7 +358,7 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont * This method overrides the parent implementation.
* @param THtmlWriter writer for rendering purpose.
*/
- protected function render($writer)
+ public function render($writer)
{
if($this->getItemCount()>0)
{
diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index 11c5f9d5..0212b3fd 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -42,7 +42,7 @@ class TColorPicker extends TTextBox {
return $this->getViewState('Mode', 'Basic');
}
-
+
/**
* @param string set the color picker style
*/
@@ -100,7 +100,7 @@ class TColorPicker extends TTextBox $options['ID'] = $this->getClientID();
$options['ClassName'] = $this->getCssClass();
$options['ShowColorPicker'] = $this->getShowColorPicker();
-
+
if($options['ShowColorPicker'])
{
$mode = $this->getMode();
@@ -109,7 +109,7 @@ class TColorPicker extends TTextBox else if($mode == 'Simple') $options['Palette'] = 'Tiny';
$options['OKButtonText'] = $this->getOKButtonText();
- $options['CancelButtonText'] = $this->getCancelButtonText();
+ $options['CancelButtonText'] = $this->getCancelButtonText();
}
return $options;
@@ -148,7 +148,7 @@ class TColorPicker extends TTextBox $cs = $this->getPage()->getClientScript();
$key = "prado:".get_class($this);
- $images = array('button' => '.gif', 'target_black' => '.gif',
+ $images = array('button' => '.gif', 'target_black' => '.gif',
'target_white' => '.gif', 'background' => '.png',
'slider' => '.gif', 'hue' => '.gif');
@@ -195,7 +195,7 @@ class TColorPicker extends TTextBox * additional color picker button.
* @param THtmlWriter writer
*/
- protected function render($writer)
+ public function render($writer)
{
parent::render($writer);
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index 16dc7644..9cf467bf 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -1283,7 +1283,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer }
}
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if($this->getHasControls())
{
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index 0bdeb4a4..0ac0664d 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -1138,7 +1138,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs * This method overrides the parent implementation.
* @param THtmlWriter writer for rendering purpose.
*/
- protected function render($writer)
+ public function render($writer)
{
if($this->getHasControls())
{
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 301b7f70..e7e68f6f 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -274,7 +274,7 @@ class TDatePicker extends TTextBox * additional date picker button if Mode is "Button" or "ImageButton".
* @param THtmlWriter writer
*/
- protected function render($writer)
+ public function render($writer)
{
parent::render($writer);
switch ($this->getMode())
diff --git a/framework/Web/UI/WebControls/TExpression.php b/framework/Web/UI/WebControls/TExpression.php index a1c00c9a..9b7e4903 100644 --- a/framework/Web/UI/WebControls/TExpression.php +++ b/framework/Web/UI/WebControls/TExpression.php @@ -53,7 +53,7 @@ class TExpression extends TControl * Renders the evaluation result of the expression.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
if($this->_e!=='')
$writer->write($this->evaluateExpression($this->_e));
diff --git a/framework/Web/UI/WebControls/THiddenField.php b/framework/Web/UI/WebControls/THiddenField.php index 7b112b0f..b920d1ad 100644 --- a/framework/Web/UI/WebControls/THiddenField.php +++ b/framework/Web/UI/WebControls/THiddenField.php @@ -48,7 +48,7 @@ class THiddenField extends TControl implements IPostBackDataHandler * the hidden field input element.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
$uniqueID=$this->getUniqueID();
$this->getPage()->ensureRenderInForm($this);
diff --git a/framework/Web/UI/WebControls/THyperLink.php b/framework/Web/UI/WebControls/THyperLink.php index 4992dfd3..1a5db69d 100644 --- a/framework/Web/UI/WebControls/THyperLink.php +++ b/framework/Web/UI/WebControls/THyperLink.php @@ -61,7 +61,7 @@ class THyperLink extends TWebControl * Renders the body content of the hyperlink.
* @param THtmlWriter the writer for rendering
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if(($imageUrl=$this->getImageUrl())==='')
{
diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php index fa5f406f..f995da8e 100644 --- a/framework/Web/UI/WebControls/TImage.php +++ b/framework/Web/UI/WebControls/TImage.php @@ -57,7 +57,7 @@ class TImage extends TWebControl * Nothing to be rendered within image tags.
* @param THtmlWriter the writer for rendering
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
}
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index 8578ee83..f98cccb1 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -296,7 +296,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven * This overrides the parent implementation with nothing to be rendered.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
}
}
diff --git a/framework/Web/UI/WebControls/TJavascriptLogger.php b/framework/Web/UI/WebControls/TJavascriptLogger.php index 48c752e4..fa28d2b0 100644 --- a/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -46,13 +46,13 @@ class TJavascriptLogger extends TWebControl {
return 'div';
}
-
+
/**
- * Register the required javascript libraries and
+ * Register the required javascript libraries and
* display some general usage information.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
$this->Page->ClientScript->registerClientScript('logger');
$info = '(<a href="http://gleepglop.com/javascripts/logger/" target="_blank">more info</a>).';
diff --git a/framework/Web/UI/WebControls/TLabel.php b/framework/Web/UI/WebControls/TLabel.php index 89783bd5..a7a25eef 100644 --- a/framework/Web/UI/WebControls/TLabel.php +++ b/framework/Web/UI/WebControls/TLabel.php @@ -60,7 +60,7 @@ class TLabel extends TWebControl * Renders the body content of the label.
* @param THtmlWriter the renderer
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if(($text=$this->getText())==='')
parent::renderContents($writer);
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index 619f8e77..f1ed95f8 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -112,7 +112,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler * the body content enclosed in the control tag will be rendered.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if(($text=$this->getText())==='')
parent::renderContents($writer);
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 169cc72c..55a46171 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -514,7 +514,7 @@ abstract class TListControl extends TDataBoundControl * This method renders items contained in the list control as the body content.
* @param THtmlWriter writer
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if($this->_items)
{
diff --git a/framework/Web/UI/WebControls/TLiteral.php b/framework/Web/UI/WebControls/TLiteral.php index 6ba5e4be..35888676 100644 --- a/framework/Web/UI/WebControls/TLiteral.php +++ b/framework/Web/UI/WebControls/TLiteral.php @@ -67,7 +67,7 @@ class TLiteral extends TControl * Renders the literal control.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
if(($text=$this->getText())!=='')
{
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php index ffec8a4c..4fa2f9ae 100644 --- a/framework/Web/UI/WebControls/TRepeater.php +++ b/framework/Web/UI/WebControls/TRepeater.php @@ -322,7 +322,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer * content as the whole presentation of the repeater. Outer tag is not rendered.
* @param THtmlWriter writer
*/
- protected function render($writer)
+ public function render($writer)
{
$this->renderContents($writer);
}
diff --git a/framework/Web/UI/WebControls/TSafeHtml.php b/framework/Web/UI/WebControls/TSafeHtml.php index f605608a..5015a5ac 100644 --- a/framework/Web/UI/WebControls/TSafeHtml.php +++ b/framework/Web/UI/WebControls/TSafeHtml.php @@ -26,7 +26,7 @@ class TSafeHtml extends TControl * malicious javascript code from the body content
* @param THtmlWriter writer
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
$textWriter=new TTextWriter;
parent::renderContents(new THtmlWriter($textWriter));
diff --git a/framework/Web/UI/WebControls/TStatements.php b/framework/Web/UI/WebControls/TStatements.php index 28e25500..961b569d 100644 --- a/framework/Web/UI/WebControls/TStatements.php +++ b/framework/Web/UI/WebControls/TStatements.php @@ -54,7 +54,7 @@ class TStatements extends TControl * Renders the evaluation result of the statements.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
if($this->_s!=='')
$writer->write($this->evaluateStatements($this->_s));
diff --git a/framework/Web/UI/WebControls/TTable.php b/framework/Web/UI/WebControls/TTable.php index ae2a01b4..fe01649c 100644 --- a/framework/Web/UI/WebControls/TTable.php +++ b/framework/Web/UI/WebControls/TTable.php @@ -286,7 +286,7 @@ class TTable extends TWebControl * Renders body contents of the table.
* @param THtmlWriter the writer used for the rendering purpose.
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if($this->_rows)
{
diff --git a/framework/Web/UI/WebControls/TTableCell.php b/framework/Web/UI/WebControls/TTableCell.php index 34b8940a..747734cb 100644 --- a/framework/Web/UI/WebControls/TTableCell.php +++ b/framework/Web/UI/WebControls/TTableCell.php @@ -183,7 +183,7 @@ class TTableCell extends TWebControl * Renders body contents of the table cell.
* @param THtmlWriter the writer used for the rendering purpose.
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if(($text=$this->getText())==='')
parent::renderContents($writer);
diff --git a/framework/Web/UI/WebControls/TTableRow.php b/framework/Web/UI/WebControls/TTableRow.php index d752723d..202ad596 100644 --- a/framework/Web/UI/WebControls/TTableRow.php +++ b/framework/Web/UI/WebControls/TTableRow.php @@ -121,7 +121,7 @@ class TTableRow extends TWebControl * Renders body contents of the table row
* @param THtmlWriter writer for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if($this->_cells)
{
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 5d508fd2..b91a72ef 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -224,7 +224,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable * Renders the body content of the textbox when it is in MultiLine text mode.
* @param THtmlWriter the writer for rendering
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
if($this->getTextMode()==='MultiLine')
$writer->write(THttpUtility::htmlEncode($this->getText()));
diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 686ffec4..80358ff6 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -106,7 +106,7 @@ class TTextHighlighter extends TWebControl * the body content with syntax highlighted result.
* @param THtmlWriter writer
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
$textWriter=new TTextWriter;
parent::renderContents(new THtmlWriter($textWriter));
@@ -143,7 +143,7 @@ class TTextHighlighter extends TWebControl {
$this->setViewState('CopyCode', TPropertyValue::ensureBoolean($value), true);
}
-
+
/**
* Returns the highlighted text.
* @param string text to highlight.
@@ -157,7 +157,7 @@ class TTextHighlighter extends TWebControl $geshi->enable_classes();
if($this->getEnableCopyCode())
$geshi->set_header_content($this->getHeaderTemplate());
-
+
return $geshi->parse_code();
}
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index 056c8f3e..027a2cee 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -230,7 +230,7 @@ class TValidationSummary extends TWebControl * Overrides parent implementation by rendering TValidationSummary-specific presentation.
* @return string the rendering result
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
$this->renderJsSummary();
if($this->getShowSummary())
diff --git a/framework/Web/UI/WebControls/TWebControl.php b/framework/Web/UI/WebControls/TWebControl.php index ba6fe04c..18571d73 100644 --- a/framework/Web/UI/WebControls/TWebControl.php +++ b/framework/Web/UI/WebControls/TWebControl.php @@ -368,7 +368,7 @@ class TWebControl extends TControl * - {@link renderEndTag}
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function render($writer)
+ public function render($writer)
{
$this->renderBeginTag($writer);
$this->renderContents($writer);
@@ -391,7 +391,7 @@ class TWebControl extends TControl * You can override this method to provide customized content rendering.
* @param THtmlWriter the writer used for the rendering purpose
*/
- protected function renderContents($writer)
+ public function renderContents($writer)
{
parent::renderChildren($writer);
}
|