classes/phing/filters/XsltFilter.php

\XSLTParam

Class that holds an XSLT parameter.

package
phing.filters

Properties

Propertyprivate  $expr= ''
Details
Type
Propertyprivate  $name= ''
Details
Type

Methods

methodpublic  getExpression( ) : string
Returns expression value -- performs lookup if expr is registerslot.
Returns
Type Description
string
methodpublic  getName( ) : string
Get param name.
Returns
Type Description
string
methodpublic  getValue( ) :
Gets expression value (alias to the getExpression()) method.
Details
see
\getExpression()
methodpublic  setExpression( string $expr ) :
Sets expression value.
Parameters
Name Type Description
$expr string
methodpublic  setListeningExpression( \RegisterSlot $expr ) :
Sets expression to dynamic register slot.
Parameters
Name Type Description
$expr \RegisterSlot
methodpublic  setName( string $name ) :
Sets param name.
Parameters
Name Type Description
$name string
methodpublic  setValue( string $v ) :
Sets expression value (alias to the setExpression()) method.
Parameters
Name Type Description
$v string
Details
see
\setExpression()

\XsltFilter

Applies XSL stylesheet to incoming text.

Uses PHP XSLT support (libxslt).

Extends from
\BaseParamFilterReader
Implements
\ChainableReader
see
\FilterReader
author
Hans Lellelid
author
Yannick Lecaillez
author
Andreas Aderhold
copyright
© 2003 seasonfive. All rights reserved
package
phing.filters
version
$Id: XsltFilter.php 557 2009-08-29 13:54:38Z mrook $

Properties

Propertyprivate  $html= 'false'

Whether to use loadHTML() to parse the input XML file.

Default valuefalseDetails
Type
Propertyprivateboolean  $processed= 'false'

Whether XML file has been transformed.

Default valuefalseDetails
Type
boolean
Propertyprivatebool  $resolveDocumentExternals= 'false'

Whether to resolve entities in the XML document (see {@link http://www.php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals} for more details).

Default valuefalseDetails
Type
bool
since
2.4
Propertyprivatebool  $resolveStylesheetExternals= 'false'

Whether to resolve entities in the stylesheet.

Default valuefalseDetails
Type
bool
since
2.4
Propertyprivatestring  $xslFile= 'null'

Path to XSL stylesheet.

Default valuenullDetails
Type
string
Propertyprivatearray  $xsltParams= 'array'

XSLT Params.

Default valuearrayDetails
Type
array

Methods

methodprivate  _initialize( ) :
Parses the parameters to get stylesheet path.
methodpublic  chain( \Reader $reader ) : \Reader
Creates a new XsltFilter using the passed in Reader for instantiation.
Parameters
Name Type Description
$reader \Reader

A Reader object providing the underlying stream. Must not be null.

Returns
Type Description
\Reader
methodpublic  createParam( ) : \XSLTParam
Create new XSLT Param object, to handle the nested element.
Returns
Type Description
\XSLTParam
methodpublic  getHtml( ) : boolean
Whether to use HTML parser for the XML.

This is supported in libxml2 -- Yay!

Returns
Type Description
boolean
methodpublic  getParams( ) : array
Returns the XSLT params set for this class.

This is used to "clone" this class, in the chain() method.

Returns
Type Description
array
methodpublic  getResolveDocumentExternals( ) : bool
Returns
Type Description
bool
Details
since
2.4
methodpublic  getResolveStylesheetExternals( ) : bool
Returns
Type Description
bool
Details
since
2.4
methodpublic  getStyle( ) : mixed
Get the path to XSLT stylesheet.
Returns
Type Description
mixed
methodprotected  process( string $xml, string $xsl ) :
Try to process the XSLT transformation
Parameters
Name Type Description
$xml string XML to process.
$xsl string XSLT sheet to use for the processing.
Details
throws
On XSLT errors
methodpublic  read(  $len = null ) : string
Reads stream, applies XSLT and returns resulting stream.
Parameters
Name Type Description
$len
Returns
Type Description
string
Details
throws
- if XSLT support missing, if error in xslt processing
methodpublic  setHtml( boolean $b ) :
Whether to use HTML parser for XML.
Parameters
Name Type Description
$b boolean
methodpublic  setParams( array $params ) :
Sets the XSLT params for this class.

This is used to "clone" this class, in the chain() method.

Parameters
Name Type Description
$params array
methodpublic  setResolveDocumentExternals( bool $resolveExternals ) :
Whether to resolve entities in document.
Parameters
Name Type Description
$resolveExternals bool
Details
since
2.4
methodpublic  setResolveStylesheetExternals( bool $resolveExternals ) :
Whether to resolve entities in stylesheet.
Parameters
Name Type Description
$resolveExternals bool
Details
since
2.4
methodpublic  setStyle( mixed $file ) :
Set the XSLT stylesheet.
Parameters
Name Type Description
$file mixed PhingFile object or path.
Documentation was generated by DocBlox 0.13.1.