From 633ae42f1c6f7069ba155ffa1bbc3b42fe189bb4 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 4 Feb 2007 03:30:32 +0000 Subject: Added renderer feature to TRepeater. --- framework/Web/UI/WebControls/TImage.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TImage.php') diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php index 00e32765..24efd064 100644 --- a/framework/Web/UI/WebControls/TImage.php +++ b/framework/Web/UI/WebControls/TImage.php @@ -25,7 +25,7 @@ * @package System.Web.UI.WebControls * @since 3.0 */ -class TImage extends TWebControl +class TImage extends TWebControl implements IDataRenderer { /** * @return string tag name of image control @@ -114,6 +114,32 @@ class TImage extends TWebControl $this->setViewState('ImageUrl',$value,''); } + /** + * Returns the URL of the image file. + * This method is required by {@link IDataRenderer}. + * It is the same as {@link getImageUrl()}. + * @return string the URL of the image file. + * @see getImageUrl + * @since 3.1.0 + */ + public function getData() + { + return $this->getImageUrl(); + } + + /** + * Sets the URL of the image. + * This method is required by {@link IDataRenderer}. + * It is the same as {@link setImageUrl()}. + * @param string the URL of the image file. + * @see setImageUrl + * @since 3.1.0 + */ + public function setData($value) + { + $this->setImageUrl($value); + } + /** * @return string the URL to long description */ -- cgit v1.2.3