eZPublishCommunityProject  2013.9
eZ\Publish\Core\FieldType\XmlText\Converter\Html5 Class Reference

Converts internal XmlText representation to HTML5. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\XmlText\Converter\Html5:
+ Collaboration diagram for eZ\Publish\Core\FieldType\XmlText\Converter\Html5:

Public Member Functions

 __construct ($stylesheet, array $customStylesheets=array(), array $preConverters=array())
 Constructor. More...
 
 addPreConverter (Converter $preConverter)
 Adds a pre-converter to the list. More...
 
 convert (DOMDocument $xmlDoc)
 Convert $xmlDoc from internal representation DOMDocument to HTML5. More...
 
 getPreConverters ()
 

Protected Member Functions

 getXSLTProcessor ()
 Returns the XSLTProcessor to use to transform internal XML to HTML5. More...
 

Protected Attributes

 $customStylesheets = array()
 
 $stylesheet
 
 $xsltProcessor
 

Private Member Functions

 getSortedCustomStylesheets ()
 Returns custom stylesheets to load, sorted. More...
 

Private Attributes

 $preConverters
 

Detailed Description

Converts internal XmlText representation to HTML5.

Constructor & Destructor Documentation

eZ\Publish\Core\FieldType\XmlText\Converter\Html5::__construct (   $stylesheet,
array  $customStylesheets = array(),
array  $preConverters = array() 
)

Constructor.

Parameters
string$stylesheetStylesheet to use for conversion
array$customStylesheetsArray of XSL stylesheets. Each entry consists in a hash having "path" and "priority" keys.
\eZ\Publish\Core\FieldType\XmlText\Converter[]$preConverters Array of pre-converters
Exceptions
\eZ\Publish\Core\Base\Exceptions\InvalidArgumentType

Member Function Documentation

eZ\Publish\Core\FieldType\XmlText\Converter\Html5::addPreConverter ( Converter  $preConverter)

Adds a pre-converter to the list.

Use a pre-converter when you need some processing before XSLT transformation (e.g. for custom tags).

Parameters
Converter$preConverter
eZ\Publish\Core\FieldType\XmlText\Converter\Html5::convert ( DOMDocument  $xmlDoc)

Convert $xmlDoc from internal representation DOMDocument to HTML5.

Parameters
\DOMDocument$xmlDoc
Returns
string

Implements eZ\Publish\Core\FieldType\XmlText\Converter.

eZ\Publish\Core\FieldType\XmlText\Converter\Html5::getPreConverters ( )
eZ\Publish\Core\FieldType\XmlText\Converter\Html5::getSortedCustomStylesheets ( )
private

Returns custom stylesheets to load, sorted.

The order is from the lowest priority to the highest since in case of a conflict, the last loaded XSL template always wins.

Returns
array

Referenced by eZ\Publish\Core\FieldType\XmlText\Converter\Html5\getXSLTProcessor().

eZ\Publish\Core\FieldType\XmlText\Converter\Html5::getXSLTProcessor ( )
protected

Returns the XSLTProcessor to use to transform internal XML to HTML5.

Returns

Referenced by eZ\Publish\Core\FieldType\XmlText\Converter\Html5\convert().

Member Data Documentation

eZ\Publish\Core\FieldType\XmlText\Converter\Html5::$customStylesheets = array()
protected
eZ\Publish\Core\FieldType\XmlText\Converter\Html5::$xsltProcessor
protected

The documentation for this class was generated from the following file: