Xml

Extends \phpDocumentor\Transformer\Writer\WriterAbstract Implements \phpDocumentor\Transformer\Writer\Translatable

Converts the structural information of phpDocumentor into an XML file.

package

Default

Methods

__construct

__construct(\phpDocumentor\Transformer\Router\RouterAbstract $router) 

Exports the given reflection object to the parent XML element.

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

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.

Arguments

$parent

\DOMElement

The parent element to augment.

$child

\DOMElement

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

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

buildDeprecationList(\DOMDocument $dom) : void

Arguments

$dom

\DOMDocument

Markers are extracted and a summary inserted in this object.

buildFile

buildFile(\DOMElement $parent, \phpDocumentor\Descriptor\FileDescriptor $file, \phpDocumentor\Transformer\Transformer $transformer) 

Arguments

$parent

\DOMElement

Export this function definition to the given parent DOMElement.

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

Arguments

$parent

\DOMElement

Element to augment.

$function

\phpDocumentor\Descriptor\FunctionDescriptor

Element to export.

$child

\DOMElement

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

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

buildNamespaceTree(\DOMDocument $dom) : void

Arguments

$dom

\DOMDocument

Namespaces are extracted and a summary inserted in this object.

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

buildPackageTree(\DOMDocument $dom) : void

Arguments

$dom

\DOMDocument

Packages are extracted and a summary inserted in this object.

buildPartials

buildPartials(\DOMElement $parent, \phpDocumentor\Descriptor\ProjectDescriptor $project) 

Arguments

$parent

\DOMElement

Checks if there is a space in the path.

checkForSpacesInPath(string $path) : void
inherited
Throws
\InvalidArgumentException

if path contains a space.

Arguments

$path

string

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

checkRequirements() : void
inherited

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.

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

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

Arguments

$parse_errors

\DOMElement

Finalizes the processing and executing all post-processing actions.

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

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

Arguments

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

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

Arguments

$namespaces

array<mixed,array>

the list of namespaces to process.

$parent_element

\DOMElement

the node to receive the children of the above list.

$node_name

string

the name of the summary element.

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

generateNamespaceTree(array $namespaces) : array

Arguments

$namespaces

array

the list of namespaces as retrieved from the xml.

Response

array

Retrieves the destination location for this artifact.

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

Arguments

Response

string

Build a tag based query string and return result

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

Arguments

$dom

\DOMDocument

Markers are extracted and a summary inserted in this object.

$marker

string

The marker we're searching for throughout xml

Response

\DOMNodeList

Returns an instance of the object responsible for translating content.

getTranslator() : \phpDocumentor\Translator\Translator

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

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

Arguments

Abstract definition of the transformation method.

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

Arguments

$project

\phpDocumentor\Descriptor\ProjectDescriptor

Document containing the structure.

$transformation

\phpDocumentor\Transformer\Transformation

Transformation to execute.

Properties

xml

xml : \DOMDocument
var

Type(s)

\DOMDocument

translator

translator : \phpDocumentor\Translator\Translator

docBlockConverter

docBlockConverter : 

Type(s)

argumentConverter

argumentConverter : 

Type(s)

methodConverter

methodConverter : 

Type(s)

propertyConverter

propertyConverter : 

Type(s)

constantConverter

constantConverter : 

Type(s)

interfaceConverter

interfaceConverter : 

Type(s)

traitConverter

traitConverter : 

Type(s)