* @link http://www.xisc.com/
* @copyright Copyright © 2004-2005, Qiang Xue
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
*/
/**
* TStatements class
*
* TStatements executes a set of PHP statements and renders the display
* generated by the statements. The execution happens during rendering stage.
* You can set the statements via the property Statements.
* You should also specify the context object by Context property
* which is used as the object in which the statements is evaluated.
* If the Context property is not set, the TStatements component
* itself will be assumed as the context.
*
* @author Qiang Xue
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
* @since 3.0
*/
class TStatements extends TControl
{
private $_s='';
/**
* @return string the statements to be executed
*/
public function getStatements()
{
return $this->_s;
}
/**
* Sets the statements of the TStatements
* @param string the statements to be set
*/
public function setStatements($value)
{
$this->_s=$value;
}
/**
* Renders the evaluation result of the statements.
* @param THtmlTextWriter the writer used for the rendering purpose
*/
protected function render($writer)
{
if($this->_s!=='')
$writer->write($this->evaluateStatements($this->_s));
}
}
?>