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
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
getSourceXmlDocument ( )
getTransformXmlDocument ( )

Method Details

__construct() public méthode

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

getDocumentContent() public méthode

public getDocumentContent ( ) : string
Résultat string XML data

getDocumentPath() public méthode

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

getParameters() public méthode

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

getTransformContent() public méthode

public getTransformContent ( ) : string
Résultat string XML style sheet as string

getTransformPath() public méthode

public getTransformPath ( ) : string
Résultat string The path to the XML style sheet.

render() public méthode

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

setDocumentContent() public méthode

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

setDocumentPath() public méthode

public setDocumentPath ( $value )

setTransformContent() public méthode

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

setTransformPath() public méthode

public setTransformPath ( $value )