From 965aa3d9475a86642d33ace50d52c77987a125ea Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 26 Mar 2006 18:23:31 +0000 Subject: Added tutorial page for TExpression and TStatements. --- .../protected/pages/Controls/Expression.page | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'demos/quickstart/protected/pages/Controls/Expression.page') diff --git a/demos/quickstart/protected/pages/Controls/Expression.page b/demos/quickstart/protected/pages/Controls/Expression.page index 767f292f..efa1ab7a 100644 --- a/demos/quickstart/protected/pages/Controls/Expression.page +++ b/demos/quickstart/protected/pages/Controls/Expression.page @@ -4,7 +4,27 @@

-TBD +TExpression evaluates a PHP expression and displays the evaluation result. To specify the expression to be evaluated, set the Expression property. In a control template, expression tags are often used instead of the complete component tags when the main purpose is to display the evaluation result of some PHP expression. For example, the following two tags are equivalent, +

+ +<com:TExpression Expression="date()" /> +<%= date() %> + + +

+TExpression evaluates the expression during the rendering control lifecycle. +

+ +

+The context of the expression in a TExpression control is the control itself. That is, $this represents the control object if it is present in the expression. For example, both of the following template tags will display the title of the page containing the TExpression control. +

+ +<com:TExpression Expression="$this->Page->Title" /> +<%= $this->Page->Title %> + + +

+Be aware, since TExpression allows execution of arbitrary PHP code, in general you should not use it to evaluate expressions submitted by your application users.

\ No newline at end of file -- cgit v1.2.3