- Symphony 2.7.6
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
Page XSLTPage
public class XSLTPage extends Page
class.xsltpage.php #11XSLTPage extends the Page class to provide an object representation of a Page that will be generated using XSLT.
Properties
XsltProcess $Proc
An instance of the XsltProcess class
Methods
void __construct()
The constructor for the XSLTPage
ensures that an XSLTProcessor
is available, and then sets an instance of it to $this->Proc
, otherwise
it will throw a SymphonyErrorPage
exception.
string generate(
$page)
The generate function calls on the XsltProcess
to transform the
XML with the given XSLT passing any parameters or functions
If no errors occur, the parent generate function is called to add
the page headers and a string containing the transformed result
is result.
See Also
array getError()
Returns an iterator of errors from the XsltProcess
. Use this function
inside a loop to get all the errors that occurring when transforming
$this->_xml
with $this->_xsl
.
Returns
An associative array containing the errors details from the XsltProcessor
string|XMLElement getXML()
Accessor for the XML of this page
string getXSL()
Accessor for the XSL of this page
void registerPHPFunction(
$function)
Allows the registration of PHP functions to be used on the Frontend by passing the function name or an array of function names
Parameters
void setRuntimeParam(
$param)
Sets the parameters that will output with the resulting page
and be accessible in the XSLT. This function translates all ' into
'
, with the tradeoff being that a '
but the benefit that ' and " can be
in the params
Parameters
See Also
void setXML(
$xml, $isFile)
Setter for $this->_xml
, can optionally load the XML from a file.
Parameters
void setXSL(
$xsl, $isFile)
Setter for $this->_xsl
, can optionally load the XSLT from a file.