Properties

$xml

$xml : \DOMDocument

Type

\DOMDocument

$docBlockConverter

$docBlockConverter : 

Type

$argumentConverter

$argumentConverter : 

Type

$methodConverter

$methodConverter : 

Type

$propertyConverter

$propertyConverter : 

Type

$constantConverter

$constantConverter : 

Type

$interfaceConverter

$interfaceConverter : 

Type

$traitConverter

$traitConverter : 

Type

Methods

checkRequirements()

checkRequirements() : void

This method verifies whether PHP has all requirements needed to run this writer.

If one of the requirements is missing for this Writer then an exception of type RequirementMissing should be thrown; this indicates to the calling process that this writer will not function.

Throws

\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

when a requirements is missing stating which one.

getTranslator()

getTranslator() : \phpDocumentor\Translator\Translator

Returns an instance of the object responsible for translating content.

Returns

\phpDocumentor\Translator\Translator

setTranslator()

setTranslator(\phpDocumentor\Translator\Translator  $translator) : void

Sets a new object capable of translating strings on this writer.

Parameters

\phpDocumentor\Translator\Translator $translator

buildFunction()

buildFunction(\DOMElement  $parent, \phpDocumentor\Descriptor\FunctionDescriptor  $function, \DOMElement  $child = null) : void

Export this function definition to the given parent DOMElement.

Parameters

\DOMElement $parent

Element to augment.

\phpDocumentor\Descriptor\FunctionDescriptor $function

Element to export.

\DOMElement $child

if supplied this element will be augmented instead of freshly added.

buildClass()

buildClass(\DOMElement  $parent, \phpDocumentor\Descriptor\ClassDescriptor  $class, \DOMElement  $child = null) : void

Exports the given reflection object to the parent XML element.

This method creates a new child element on the given parent XML element and takes the properties of the Reflection argument and sets the elements and attributes on the child.

If a child DOMElement is provided then the properties and attributes are set on this but the child element is not appended onto the parent. This is the responsibility of the invoker. Essentially this means that the $parent argument is ignored in this case.

Parameters

\DOMElement $parent

The parent element to augment.

\phpDocumentor\Descriptor\ClassDescriptor $class

The data source.

\DOMElement $child

Optional: child element to use instead of creating a new one on the $parent.

checkForSpacesInPath()

checkForSpacesInPath(string  $path) : void

Checks if there is a space in the path.

Parameters

string $path

Throws

\InvalidArgumentException

if path contains a space.

createErrorEntry()

createErrorEntry(\phpDocumentor\Descriptor\Validator\Error  $error, \DOMElement  $parse_errors) : void

Creates an entry in the ParseErrors collection of a file for a given error.

Parameters

\phpDocumentor\Descriptor\Validator\Error $error
\DOMElement $parse_errors

getDestinationPath()

getDestinationPath(\phpDocumentor\Transformer\Transformation  $transformation) : string

Retrieves the destination location for this artifact.

Parameters

\phpDocumentor\Transformer\Transformation $transformation

Returns

string

finalize()

finalize(\phpDocumentor\Descriptor\ProjectDescriptor  $projectDescriptor) : void

Finalizes the processing and executing all post-processing actions.

This method is responsible for extracting and manipulating the data that is global to the project, such as:

  • Package tree
  • Namespace tree
  • Marker list
  • Deprecated elements listing
  • Removal of objects related to visibility

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $projectDescriptor

buildPackageTree()

buildPackageTree(\DOMDocument  $dom) : void

Collects all packages and subpackages, and adds a new section in the DOM to provide an overview.

Parameters

\DOMDocument $dom

Packages are extracted and a summary inserted in this object.

buildNamespaceTree()

buildNamespaceTree(\DOMDocument  $dom) : void

Collects all namespaces and sub-namespaces, and adds a new section in the DOM to provide an overview.

Parameters

\DOMDocument $dom

Namespaces are extracted and a summary inserted in this object.

buildDeprecationList()

buildDeprecationList(\DOMDocument  $dom) : void

Adds a node to the xml for deprecations and the count value

Parameters

\DOMDocument $dom

Markers are extracted and a summary inserted in this object.

getNodeListForTagBasedQuery()

getNodeListForTagBasedQuery(\DOMDocument  $dom, string  $marker) : \DOMNodeList

Build a tag based query string and return result

Parameters

\DOMDocument $dom

Markers are extracted and a summary inserted in this object.

string $marker

The marker we're searching for throughout xml

Returns

\DOMNodeList

generateNamespaceTree()

generateNamespaceTree(array  $namespaces) : array

Generates a hierarchical array of namespaces with their singular name from a single level list of namespaces with their full name.

Parameters

array $namespaces

the list of namespaces as retrieved from the xml.

Returns

array

generateNamespaceElements()

generateNamespaceElements(array<mixed,array>  $namespaces, \DOMElement  $parent_element, string  $node_name = 'namespace') : void

Recursive method to create a hierarchical set of nodes in the dom.

Parameters

array<mixed,array> $namespaces

the list of namespaces to process.

\DOMElement $parent_element

the node to receive the children of the above list.

string $node_name

the name of the summary element.