Renderer
class Renderer extends PHP
Properties
protected | $params | ||
protected string | $savedLocale | from Renderer | |
protected array[] | $attributes | from PHP | |
protected | $dynamic | {@inheritdoc} | |
$enableQuickRenderer | {@inheritdoc} | ||
protected string | $out | from PHP | |
protected | $quickRegexp | {@inheritdoc} | |
protected string | $quickRenderingTest | from PHP | |
protected | $static | {@inheritdoc} | |
protected DOMXPath | $xpath | from PHP |
Methods
Render an intermediate representation of plain text
Set the value of a parameter from the stylesheet
Set the values of several parameters from the stylesheet
Test for the presence of unsupported XML and throw an exception if found
Decode encoded characters from the Supplementary Multilingual Plane
Test whether given XML can be rendered with the Quick renderer
Ensure that a tag pair does not contain a start tag of itself
Return a parameter's value as an XPath expression
Render an intermediate representation using the Quick renderer
Render a self-closing tag using the Quick renderer
Render a string matched by the Quick renderer using a generated PHP template
Details
in
Renderer at line 31
protected DOMDocument
loadXML(string $xml)
Create a return a new DOMDocument loaded with given XML
in
Renderer at line 58
string
render(string $xml)
Render an intermediate representation
in
Renderer at line 76
protected string
renderPlainText(string $xml)
Render an intermediate representation of plain text
in
PHP at line 284
protected string
renderRichText(string $xml)
Render an intermediate representation of rich text
in
Renderer at line 104
string
getParameter(string $paramName)
Get the value of a parameter
in
Renderer at line 114
array
getParameters()
Get the values of all parameters
in
Renderer at line 126
void
setParameter(string $paramName, mixed $paramValue)
Set the value of a parameter from the stylesheet
in
Renderer at line 137
void
setParameters(array $params)
Set the values of several parameters from the stylesheet
in
Renderer at line 151
protected void
checkUnsupported(string $xml)
Test for the presence of unsupported XML and throw an exception if found
in
Renderer at line 170
protected string
decodeSMP(string $str)
Decode encoded characters from the Supplementary Multilingual Plane
in
Renderer at line 186
static protected string
decodeEntity(array $m)
Decode a matched SGML entity
in
Renderer at line 194
protected void
restoreLocale()
Restore the original locale
in
Renderer at line 205
protected void
setLocale()
Temporarily set the locale to C
at line 13
protected void
renderNode(DOMNode $node)
Render given DOMNode
in
PHP at line 66
__sleep()
No description
in
PHP at line 80
protected void
at(DOMNode $root, string $query = null)
Render the content of given node
Matches the behaviour of an xsl:apply-templates element
in
PHP at line 103
protected bool
canQuickRender(string $xml)
Test whether given XML can be rendered with the Quick renderer
in
PHP at line 117
protected void
checkTagPairContent(string $id, string $xml)
Ensure that a tag pair does not contain a start tag of itself
Detects malformed matches such as
in
PHP at line 131
protected string
getParamAsXPath(string $paramName)
Return a parameter's value as an XPath expression
in
PHP at line 144
protected string
getQuickTextContent(string $xml)
Extract the text content from given XML
NOTE: numeric character entities are decoded beforehand, we don't need to decode them here
in
PHP at line 155
protected bool
hasNonNullValues(array $array)
Test whether given array has any non-null values
in
PHP at line 176
protected array
matchAttributes(string $xml)
Capture and return the attributes of an XML element
NOTE: XML character entities are left as-is
in
PHP at line 195
protected string
renderQuick(string $xml)
Render an intermediate representation using the Quick renderer
in
PHP at line 216
protected string
renderQuickCallback(array $m)
Render a string matched by the Quick renderer
This stub should be overwritten by generated renderers
in
PHP at line 253
protected string
renderQuickSelfClosingTag(array $m)
Render a self-closing tag using the Quick renderer
at line 26
protected string
renderQuickTemplate(int $id, string $xml)
Render a string matched by the Quick renderer using a generated PHP template
This stub should be overwritten by generated renderers
in
PHP at line 319
protected void
reset()
Reset object properties that are populated during rendering