Properties

$logger

$logger : \Monolog\Logger

Type

\Monolog\Logger

$xsl_variables

$xsl_variables : array<mixed,string>

Type

array<mixed,string>

Methods

checkRequirements()

checkRequirements() : void

Checks whether XSL handling is enabled with PHP as that is not enabled by default.

To enable XSL handling you need either the xsl extension or the xslcache extension installed.

Throws

\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

if neither xsl extensions are installed.

transform()

transform(\phpDocumentor\Descriptor\ProjectDescriptor  $project, \phpDocumentor\Transformer\Transformation  $transformation) : void

This method combines the structure.xml and the given target template and creates a static html page at the artifact location.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project

Document containing the structure.

\phpDocumentor\Transformer\Transformation $transformation

Transformation to execute.

Throws

\RuntimeException

if the structure.xml file could not be found.

\phpDocumentor\Plugin\Core\Exception

if the structure.xml file's documentRoot could not be read because of encoding issues or because it was absent.

__construct()

__construct(\Monolog\Logger  $logger) 

Initialize this writer with the logger so that it can output logs.

Parameters

\Monolog\Logger $logger

setRouters()

setRouters(\phpDocumentor\Transformer\Router\Queue  $routers) : void

Sets the routers that can be used to determine the path of links.

Parameters

\phpDocumentor\Transformer\Router\Queue $routers

setProcessorParameters()

setProcessorParameters(\phpDocumentor\Transformer\Transformation  $transformation, \XSLTProcessor  $proc) : void

Sets the parameters of the XSLT processor.

Parameters

\phpDocumentor\Transformer\Transformation $transformation

Transformation.

\XSLTProcessor $proc

XSLTProcessor.

checkForSpacesInPath()

checkForSpacesInPath(string  $path) : void

Checks if there is a space in the path.

Parameters

string $path

Throws

\InvalidArgumentException

if path contains a space.

getXsltUriFromFilename()

getXsltUriFromFilename(string  $filename) : string

Takes the filename and converts it into a correct URI for XSLTProcessor.

Parameters

string $filename

Returns

string

getXslProcessor()

getXslProcessor(\phpDocumentor\Transformer\Transformation  $transformation) : \XSLTCache|\XSLTProcessor

Parameters

\phpDocumentor\Transformer\Transformation $transformation

Returns

\XSLTCache|\XSLTProcessor

loadAst()

loadAst(  $structureFilename) : \DOMDocument

Parameters

$structureFilename

Returns

\DOMDocument

registerDefaultVariables()

registerDefaultVariables(\phpDocumentor\Transformer\Transformation  $transformation,   $proc,   $structure) 

Parameters

\phpDocumentor\Transformer\Transformation $transformation
$proc
$structure

writeToFile()

writeToFile(  $filename,   $proc,   $structure) 

Parameters

$filename
$proc
$structure

getArtifactPath()

getArtifactPath(\phpDocumentor\Transformer\Transformation  $transformation) : string|null

Returns the path to the location where the artifact should be written, or null to automatically detect the location using the router.

Parameters

\phpDocumentor\Transformer\Transformation $transformation

Returns

string|null

generateUrlForXmlElement()

generateUrlForXmlElement(\phpDocumentor\Descriptor\ProjectDescriptor  $project,   $element) : false|string

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project
$element

Returns

false|string