summaryrefslogtreecommitdiff
path: root/framework/I18N/TTranslateParameter.php
diff options
context:
space:
mode:
authorxue <>2006-04-03 21:55:33 +0000
committerxue <>2006-04-03 21:55:33 +0000
commit63c79dd722d5a8dd09b8828a4711d496680c0062 (patch)
tree1c535a0aa373a60d049aa669ab3d2944efdce4fa /framework/I18N/TTranslateParameter.php
parentb3e1b298e6fa8e327516d54d62856599faf443d2 (diff)
Cleanup of I18N.
Diffstat (limited to 'framework/I18N/TTranslateParameter.php')
-rw-r--r--framework/I18N/TTranslateParameter.php49
1 files changed, 21 insertions, 28 deletions
diff --git a/framework/I18N/TTranslateParameter.php b/framework/I18N/TTranslateParameter.php
index ad87b8e6..3f9f72ac 100644
--- a/framework/I18N/TTranslateParameter.php
+++ b/framework/I18N/TTranslateParameter.php
@@ -1,26 +1,19 @@
<?php
-
/**
- * TParam 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.
+ * TTranslateParameter component.
*
- * To contact the author write to {@link mailto:qiang.xue@gmail.com Qiang Xue}
- * The latest version of PRADO can be obtained from:
- * {@link http://prado.sourceforge.net/}
- *
- * @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Revision: 1.2 $ $Date: 2005/01/05 03:15:13 $
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
* @package System.I18N
*/
-
+
/**
* TTranslateParameter component should be used inside the TTranslate component to
* allow parameter substitution.
- *
+ *
* For example, the strings "{greeting}" and "{name}" will be replace
* with the values of "Hello" and "World", respectively.
* The substitution string must be enclose with "{" and "}".
@@ -41,7 +34,7 @@
* - <b>Trim</b>, boolean,
* <br>Gets or sets an option to trim the contents of the TParam.
* Default is to trim the contents.
- *
+ *
* @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version v3.0, last update on Friday, 6 January 2006
* @package System.I18N
@@ -50,20 +43,20 @@ class TTranslateParameter extends TControl
{
/**
* The substitution key.
- * @var string
+ * @var string
*/
protected $key;
-
+
/**
* To trim or not to trim the contents.
- * @var boolean
+ * @var boolean
*/
protected $trim = true;
-
+
/**
* Get the parameter substitution key.
- * @return string substitution key.
+ * @return string substitution key.
*/
public function getKey()
{
@@ -71,16 +64,16 @@ class TTranslateParameter extends TControl
throw new TException('The Key property must be specified.');
return $this->key;
}
-
+
/**
* Set the parameter substitution key.
- * @param string substitution key.
+ * @param string substitution key.
*/
public function setKey($value)
{
$this->key = $value;
}
-
+
/**
* Set the option to trim the contents.
* @param boolean trim or not.
@@ -89,15 +82,15 @@ class TTranslateParameter extends TControl
{
$this->trim = TPropertyValue::ensureBoolean($value);
}
-
+
/**
* Trim the content or not.
- * @return boolean trim or not.
+ * @return boolean trim or not.
*/
public function getTrim()
{
return $this->trim;
- }
+ }
public function getValue()
{
@@ -119,7 +112,7 @@ class TTranslateParameter extends TControl
return $value;
$textWriter = new TTextWriter;
$this->renderControl(new THtmlWriter($textWriter));
- return $this->getTrim() ?
+ return $this->getTrim() ?
trim($textWriter->flush()) : $textWriter->flush();
}
}