PHP Class Prado\Web\UI\WebControls\TXmlTransform

TXmlTransform uses the PHP's XSL extension to perform {@link http://www.w3.org/TR/xslt XSL transformations} using the {@link http://xmlsoft.org/XSLT/ libxslt library}. To associate an XML style sheet with TXmlTransform set the {@link setTransformPath TransformPath} property to the namespace or path to the style sheet or set the {@link setTransformContent TransformContent} property to the XML style sheet data as a string. To associate the XML data to be transformed set the {@link setDocumentPath DocumentPath} property to the namespace or path to the XML document or set the {@link setDocumentContent DocumentContent} property to the XML data as a string. To add additional parameters to the transformation process you can use the {@link getParameters Parameters} property.
Since: 3.1
Author: Knut Urdalen ([email protected])
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\Web\UI\TControl
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor
getDocumentContent ( ) : string
getDocumentPath ( ) : string
getParameters ( ) : TAttributeCollection Returns the list of parameters to be applied to the transform.
getTransformContent ( ) : string
getTransformPath ( ) : string
render ( $writer ) Performs XSL transformation and render the output.
setDocumentContent ( string $value )
setDocumentPath ( $value )
setTransformContent ( string $value )
setTransformPath ( $value )

Private Methods

Method Description
getSourceXmlDocument ( )
getTransformXmlDocument ( )

Method Details

__construct() public method

Initializes the TXmlTransform object and ensure that the XSL extension is available
public __construct ( )

getDocumentContent() public method

public getDocumentContent ( ) : string
return string XML data

getDocumentPath() public method

public getDocumentPath ( ) : string
return string The path to the XML document. It must be in namespace format.

getParameters() public method

Returns the list of parameters to be applied to the transform.
public getParameters ( ) : TAttributeCollection
return Prado\Collections\TAttributeCollection the list of custom parameters

getTransformContent() public method

public getTransformContent ( ) : string
return string XML style sheet as string

getTransformPath() public method

public getTransformPath ( ) : string
return string The path to the XML style sheet.

render() public method

Performs XSL transformation and render the output.
public render ( $writer )

setDocumentContent() public method

public setDocumentContent ( string $value )
$value string XML data. If not empty, it takes precedence over {@link setDocumentPath DocumentPath}.

setDocumentPath() public method

public setDocumentPath ( $value )

setTransformContent() public method

public setTransformContent ( string $value )
$value string XML style sheet as string

setTransformPath() public method

public setTransformPath ( $value )