Class \Prado\Web\UI\THtmlWriter
THtmlWriter class
THtmlWriter is a writer that renders valid XHTML outputs. It provides functions to render tags, their attributes and stylesheet fields. Attribute and stylesheet values will be automatically HTML-encoded if they require so. For example, the 'value' attribute in an input tag will be encoded.
A common usage of THtmlWriter is as the following sequence:
$writer->addAttribute($name1,$value1);
$writer->addAttribute($name2,$value2);
$writer->renderBeginTag($tagName);
// ... render contents enclosed within the tag here
$writer->renderEndTag();
Make sure each invocation of renderBeginTag is accompanied with a renderEndTag and they are properly nested, like nesting tags in HTML and XHTML.
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
addStyleAttributes(array<string|int, mixed> $attrs) : mixed
Adds a list of stylesheet attributes to be rendered.
|
public
|
flush() : string
Flushes the rendering result.
This will invoke the underlying writer's flush method. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |