From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001
From: ctrlaltca <>
Date: Thu, 12 Jul 2012 11:21:01 +0000
Subject: standardize the use of unix eol; use svn properties to enforce native
eol
---
framework/I18N/TTranslateParameter.php | 236 ++++++++++++++++-----------------
1 file changed, 118 insertions(+), 118 deletions(-)
(limited to 'framework/I18N/TTranslateParameter.php')
diff --git a/framework/I18N/TTranslateParameter.php b/framework/I18N/TTranslateParameter.php
index c54f6ab1..6ac6617c 100644
--- a/framework/I18N/TTranslateParameter.php
+++ b/framework/I18N/TTranslateParameter.php
@@ -1,119 +1,119 @@
-
- * @link http://www.pradosoft.com/
+
+ * @link http://www.pradosoft.com/
* @copyright Copyright © 2005-2012 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id$
- * @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 "}".
- * The parameters can be further translated by using TTranslate.
- *
- *
- * {greeting} {name}!
- * World
- * Hello
- *
- *
- *
- * Namespace: System.I18N
- *
- * Properties
- * - Key, string, required.
- *
Gets or sets the string in TTranslate to substitute.
- * - Trim, boolean,
- *
Gets or sets an option to trim the contents of the TParam.
- * Default is to trim the contents.
- *
- * @author Xiang Wei Zhuo
- * @version v3.0, last update on Friday, 6 January 2006
- * @package System.I18N
- */
-class TTranslateParameter extends TControl
-{
- /**
- * The substitution key.
- * @var string
- */
- protected $key;
-
- /**
- * To trim or not to trim the contents.
- * @var boolean
- */
- protected $trim = true;
-
-
- /**
- * Get the parameter substitution key.
- * @return string substitution key.
- */
- public function getKey()
- {
- if(empty($this->key))
- throw new TException('The Key property must be specified.');
- return $this->key;
- }
-
- /**
- * Set the parameter 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.
- */
- public function setTrim($value)
- {
- $this->trim = TPropertyValue::ensureBoolean($value);
- }
-
- /**
- * Trim the content or not.
- * @return boolean trim or not.
- */
- public function getTrim()
- {
- return $this->trim;
- }
-
- public function getValue()
- {
- return $this->getViewState('Value', '');
- }
-
- public function setValue($value)
- {
- $this->setViewState('Value', $value, '');
- }
-
- /**
- * @return string parameter contents.
- */
- public function getParameter()
- {
- $value = $this->getValue();
- if(strlen($value) > 0)
- return $value;
- $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
- $this->renderControl($htmlWriter);
- return $this->getTrim() ?
- trim($htmlWriter->flush()) : $htmlWriter->flush();
- }
-}
-
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ * @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 "}".
+ * The parameters can be further translated by using TTranslate.
+ *
+ *
+ * {greeting} {name}!
+ * World
+ * Hello
+ *
+ *
+ *
+ * Namespace: System.I18N
+ *
+ * Properties
+ * - Key, string, required.
+ *
Gets or sets the string in TTranslate to substitute.
+ * - Trim, boolean,
+ *
Gets or sets an option to trim the contents of the TParam.
+ * Default is to trim the contents.
+ *
+ * @author Xiang Wei Zhuo
+ * @version v3.0, last update on Friday, 6 January 2006
+ * @package System.I18N
+ */
+class TTranslateParameter extends TControl
+{
+ /**
+ * The substitution key.
+ * @var string
+ */
+ protected $key;
+
+ /**
+ * To trim or not to trim the contents.
+ * @var boolean
+ */
+ protected $trim = true;
+
+
+ /**
+ * Get the parameter substitution key.
+ * @return string substitution key.
+ */
+ public function getKey()
+ {
+ if(empty($this->key))
+ throw new TException('The Key property must be specified.');
+ return $this->key;
+ }
+
+ /**
+ * Set the parameter 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.
+ */
+ public function setTrim($value)
+ {
+ $this->trim = TPropertyValue::ensureBoolean($value);
+ }
+
+ /**
+ * Trim the content or not.
+ * @return boolean trim or not.
+ */
+ public function getTrim()
+ {
+ return $this->trim;
+ }
+
+ public function getValue()
+ {
+ return $this->getViewState('Value', '');
+ }
+
+ public function setValue($value)
+ {
+ $this->setViewState('Value', $value, '');
+ }
+
+ /**
+ * @return string parameter contents.
+ */
+ public function getParameter()
+ {
+ $value = $this->getValue();
+ if(strlen($value) > 0)
+ return $value;
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ $this->renderControl($htmlWriter);
+ return $this->getTrim() ?
+ trim($htmlWriter->flush()) : $htmlWriter->flush();
+ }
+}
+
--
cgit v1.2.3