Classes, interfaces and traits

Application

Application class for phpDocumentor.

Can be used as bootstrap when the run method is not invoked.

« More »

Bootstrap

This class provides a bootstrap for all application who wish to interface with phpDocumentor.

The Bootstrapper is responsible for setting up the autoloader, profiling options and application, including dependency injection container.

The simplest usage would be:

$app = Bootstap::createInstance()->initialize();

This will setup the autoloader and application, including Service Container, and return an instance of the application ready to be ran using the run command.

If you need more control you can do some of the steps manually:

$bootstrap = Bootstap::createInstance();
$autoloader = $bootstrap->createAutoloader();
$app = new Application($autoloader)
« More »

Configuration

The definition for the configuration of phpDocumentor.

« More »

Classes, interfaces and traits

Configuration

Configuration definition for the transformer.

« More »

Exception

Provides the basic exception for the parser package.

« More »

ServiceProvider

This provider is responsible for registering the transformer component with the given Application.

« More »

Template

Model representing a template.

« More »

Transformation

Class representing a single Transformation.

« More »

Transformer

Core class responsible for transforming the cache file to a set of artifacts.

« More »

Classes, interfaces and traits

ExternalRouter

Connects class, interface and traits to remote documentation sets.

« More »

ForFileProxy

Proxies a generated Routing Rule to generate physical filenames.

By default a RoutingRule will generate a relative path on a webserver. This causes issues between operating systems since Linux uses / and Windows \ as a directory separator.

To make sure that the correct file is generated can this proxy be used to generate a filename instead of a webserver path.

« More »

Queue

Provides a queue of routers to determine the order in which they are executed.

« More »

Renderer

Renders an HTML anchor pointing to the location of the provided element.

« More »

RouterAbstract

Object containing a collection of routes.

« More »

StandardRouter

The default router for phpDocumentor.

« More »

Classes, interfaces and traits

UrlGeneratorInterface

Generates relative URLs with elements for use in the generated HTML documentation.

« More »

Classes, interfaces and traits

ClassDescriptor

« More »

ConstantDescriptor

« More »

FileDescriptor

« More »

FunctionDescriptor

Generates a relative URL with functions for use in the generated HTML documentation.

.

« More »

MethodDescriptor

Generates a relative URL with methods for use in the generated HTML documentation.

« More »

NamespaceDescriptor

« More »

PackageDescriptor

« More »

PropertyDescriptor

Generates a relative URL with properties for use in the generated HTML documentation.

« More »

QualifiedNameToUrlConverter

Service class used to convert Qualified names into URL paths for the Standard Router.

« More »

Classes, interfaces and traits

MatcherInterface

Description of the public interface to match Descriptors with a Routing rule.

« More »

Classes, interfaces and traits

Initializable

« More »

Routable

Public interface for writers who use the routing system to determine relative URLs for Descriptors.

« More »

Translatable

All writers that have items that should be translated should implement this interface

« More »

Collection

A collection of Writer objects.

In this collection we can receive writers, and if they implement the Routable interface assign the router queue that was provided to this class so that those writers can generate urls for various Descriptors.

In addition this class can also verify if all requirements for the various writers in it are met.

« More »

WriterAbstract

Base class for the actual transformation business logic (writers).

« More »

Classes, interfaces and traits

RequirementMissing

This exception should be thrown by a Writer when it is missing one of its requirements.

« More »

Classes, interfaces and traits

ExternalClassDocumentation

Reference that relates classes with a specific prefix to a URL template.

« More »

Transformations

Contains the templates and custom transformations that are applied during transformation.

« More »

Classes, interfaces and traits

Template

Configuration object for a template selection.

« More »

Classes, interfaces and traits

PostTransformationEvent

Event that happens after each individual transformation.

« More »

PostTransformEvent

Event happen right after all transformations have completed.

« More »

PreTransformationEvent

Event happening prior to each individual transformation.

« More »

PreTransformEvent

Event that happens prior to the execution of all transformations.

« More »

PreXslWriterEvent

Event launched during the Xsl Transformation of an individual output file.

If the XSL Writer loops through a resultset then this event will be thrown for each result.

« More »

WriterInitializationEvent

Abstract class representing the base elements of a phpDocumentor event.

« More »

Classes, interfaces and traits

TransformCommand

Transforms the structure file into the specified output format

This task will execute the transformation rules described in the given template (defaults to 'responsive') with the given source (defaults to output/structure.xml) and writes these to the target location (defaults to 'output').

It is possible for the user to receive additional information using the verbose option or stop additional information using the quiet option. Please take note that the quiet option also disables logging to file.

« More »

Classes, interfaces and traits

ListCommand

Lists all templates known to phpDocumentor.

« More »

Classes, interfaces and traits

BehaviourAbstract

Collection object for a set of Behaviours.

« More »

Collection

Collection object for a set of Behaviours.

« More »

Classes, interfaces and traits

Collection

Contains a collection of Templates that may be queried.

« More »

Factory

« More »

Parameter

Model representing a parameter in a template or transformation.

« More »

PathResolver

« More »

Classes, interfaces and traits

MissingDependencyException

This exception is thrown when a required dependency is not included.

« More »

UnknownWriter

Exception thrown when a template attempts to use a writer that is unknown to phpDocumentor.

« More »

Classes, interfaces and traits

Parameter

Model representing a plugin parameter

« More »

Plugin

« More »

ServiceProvider

« More »

Classes, interfaces and traits

Exception

Exception object for the Core Plugin.

« More »

ServiceProvider

Register all services and subservices necessary to get phpDocumentor up and running.

This provider exposes no services of its own but populates the Writer Collection with the basic writers for phpDocumentor and, for backwards compatibility, registers the service providers for Graphs, Twig and PDF to the container.

« More »

Classes, interfaces and traits

ValidationValueObject

« More »

ValidatorAbstract

Base class for DocBlock Validations.

« More »

Classes, interfaces and traits

AreAllArgumentsValid

« More »

Classes, interfaces and traits

HasPackageWithSubpackage

Validates whether a file, class, interface or trait always has a package if there is a subpackage present.

« More »

HasPackageWithSubpackageValidator

Validates whether a file, class, interface or trait always has a package if there is a subpackage present.

« More »

HasSinglePackage

Validates whether a file, class, interface or trait has not more than ! package tags.

« More »

HasSinglePackageValidator

Validates whether a file, class, interface or trait has not more than 1 package tags.

« More »

HasSingleSubpackage

Validates whether a file, class, interface or trait has not more than 1 subpackage tags.

« More »

HasSingleSubpackageValidator

Validates whether a file, class, interface or trait has not more than 1 subpackage tags.

« More »

Classes, interfaces and traits

AreAllArgumentsValid

Validates whether a function has a default return type in the docblock present.

« More »

AreAllArgumentsValidValidator

« More »

DoesArgumentNameMatchParam

Validates whether a function has a default return type in the docblock present.

« More »

DoesArgumentNameMatchParamValidator

« More »

DoesArgumentTypehintMatchParam

Checks the typehint of the argument versus the @param tag.

If the argument has no typehint we do not check anything. When multiple type are given then the typehint needs to be one of them.

« More »

DoesArgumentTypehintMatchParamValidator

« More »

DoesParamsExists

Validates whether a function has a default return type in the docblock present.

« More »

DoesParamsExistsValidator

« More »

IsArgumentInDocBlock

Validates whether a function has a missing argument in the docblock.

« More »

IsArgumentInDocBlockValidator

Validates if a Method or Function's arguments all have an accompanying param tag in the DocBlock.

« More »

IsParamTypeNotAnIdeDefault

Validates whether a function has a default param type in the docblock present.

« More »

IsParamTypeNotAnIdeDefaultValidator

Validates whether the type for a param tag with a Method or Function is not a known default.

Whenever this validator triggers then it means that someone forgot to replace the pseudo type generated by the IDE with the real type for the given parameter.

« More »

IsReturnTypeNotAnIdeDefault

Validates whether a function has a default return type in the docblock present.

« More »

IsReturnTypeNotAnIdeDefaultValidator

« More »

Classes, interfaces and traits

HasSummary

Detects whether a property has a summary, or an [email protected]` tag with a description.

« More »

HasSummaryValidator

Validates whether a property has a summary, or an [email protected]` tag with a description.

« More »

Classes, interfaces and traits

Checkstyle

Checkstyle transformation writer; generates checkstyle report

« More »

FileIo

Writer containing file system operations.

The Query part of the transformation determines the action, currently supported is:

  • copy, copies a file or directory to the destination given in $artifact
« More »

Pathfinder

« More »

Sourcecode

Sourcecode transformation writer; generates syntax highlighted source files in a destination's subfolder.

« More »

Statistics

Statistics transformation writer; generates statistic report as XML.

Generated XML structure:

 <?xml version="1.0"?>
 <phpdoc-stats version="2.4.0">
   <stat date="2014-06-02T19:26:15+02:00">
     <counters>
       <deprecated>100</deprecated>
       <errors>377</errors>
       <markers>2</markers>
     </counters>
   </stat>
 </phpdoc-stats>
« More »

Xml

Converts the structural information of phpDocumentor into an XML file.

« More »

Xsl

XSL transformation writer; generates static HTML out of the structure and XSL templates.

« More »

Classes, interfaces and traits

ArgumentConverter

Converter used to create an XML Element representing a method or function argument.

« More »

ConstantConverter

Converter used to create an XML Element representing the constant and its DocBlock.

In order to convert the DocBlock to its XML representation this class requires the respective converter.

« More »

DocBlockConverter

Converter used to create an XML Element representing a DocBlock and its tags.

In order to convert the tags to their XML representation this class requires the respective converter.

« More »

InterfaceConverter

Converter used to create an XML Element representing the interface and its Constants, Methods and DocBlock.

In order to convert the DocBlock to its XML representation this class requires the respective converter.

« More »

MethodConverter

Converter used to create an XML Element representing the method, its arguments and its DocBlock.

In order to convert the arguments and DocBlock to their XML representation this class requires their respective converters.

« More »

PropertyConverter

Converter used to create an XML Element representing the property and its DocBlock.

In order to convert the DocBlock to its XML representation this class requires the respective converter.

« More »

TagConverter

Creates an XML Element 'tag' and appends it to the provided parent element.

With this class we convert a TagDescriptor, or any child thereof, into an XML element that is subsequently appended onto a provided parent element (usually an XML Element that represents a DocBlock).

During the conversion process the generated XML Element is enriched with additional elements and attributes based on which tags are provided (or more specifically which methods that support).

« More »

TraitConverter

Converter used to create an XML Element representing the Trait and its Methods, Properties and DocBlock.

In order to convert the DocBlock to its XML representation this class requires the respective converter.

« More »

Classes, interfaces and traits

AuthorTag

Behaviour that links to email addresses in the @author tag.

« More »

CoversTag

Behaviour that adds support for the @covers tag

« More »

IgnoreTag

Behaviour that adds support for @ignore tag.

« More »

InternalTag

Behaviour that adds support for @internal inline tag.

« More »

LicenseTag

Behaviour that enables links to URLs in the @license tag.

« More »

MethodTag

Behaviour that adds support for the @method tag

« More »

ParamTag

Behaviour that adds support for the @param tags.

« More »

PropertyTag

Behaviour that adds support for the property tag

« More »

ReturnTag

Behaviour that adds support for the return tag

« More »

UsesTag

Behaviour that adds support for the uses tag

« More »

VarTag

Behaviour that adds support for the @method tag

« More »

Classes, interfaces and traits

Extension

XSLT filters that can be used inside a template.

« More »

Classes, interfaces and traits

ExtensionInterface

An interface shared by all Twig interfaces intended for phpDocumentor.

« More »

Extension

Basic extension adding phpDocumentor specific functionality for Twig templates.

Global variables:

  • ast_node, the current $data element

Functions:

  • path(string) , converts the given relative path to be based of the projects root instead of the current directory

Filters:

  • markdown, converts the associated text from Markdown formatting to HTML.
  • trans, translates the given string
  • route, attempts to generate a URL for a given Descriptor
  • sort_desc, sorts the given objects by their Name property/getter in a descending fashion
  • sort_asc, sorts the given objects by their Name property/getter in a ascending fashion
« More »

ServiceProvider

Provides a series of services that are necessary for Twig to work with phpDocumentor.

This provider uses the translator component to fuel the twig writer and ands the to the twig writer to the writer collection. This enables transformations to mention 'twig' as their writer attribute.

« More »

Classes, interfaces and traits

Twig

A specialized writer which uses the Twig templating engine to convert templates to HTML output.

This writer support the Query attribute of a Transformation to generate multiple templates in one transformation.

The Query attribute supports a simplified version of Twig queries and will use each individual result as the 'node' global variable in the Twig template.

Example:

Suppose a Query indexes.classes is given then this writer will be invoked as many times as there are classes in the project and the 'node' global variable in twig will be filled with each individual class entry.

When using the Query attribute in the transformation it is important to use a variable in the Artifact attribute as well (otherwise the same file would be overwritten several times).

A simple example transformation line could be:

```
<transformation
    writer="twig"
    source="templates/twig/index.twig"
    artifact="index.html"/>
```

This example transformation would use this writer to transform the
index.twig template file in the twig template folder into index.html at
the destination location.
Since no Query is provided the 'node' global variable will contain
the Project Descriptor of the Object Graph.

A complex example transformation line could be:

```
<transformation
    query="indexes.classes"
    writer="twig"
    source="templates/twig/class.twig"
    artifact="{{name}}.html"/>
```

This example transformation would use this writer to transform the
class.twig template file in the twig template folder into a file with
the 'name' property for an individual class inside the Object Graph.
Since a Query *is* provided will the 'node' global variable contain a
specific instance of a class applicable to the current iteration.
« More »

Classes, interfaces and traits

ServiceProvider

Creates and binds the components for the generation of manuals.

Scrybe is a plugin that allows authors to write documentation in a markup format of their choosing and generate human-readable documentation from it.

« More »

Classes, interfaces and traits

ConverterInterface

This interface provides a basic contract between the Converters and all classes that want to use them.

« More »

ToHtmlInterface

« More »

ToLatexInterface

Interface that dictates the custom options that all converters that convert to Latex should have.

« More »

ToPdfInterface

Interface that dictates the custom options that all converters that convert to Latex should have.

« More »

BaseConverter

« More »

Factory

This factory attempts to create a converter given an input and output format and return that.

use phpDocumentor\Plugin\Scrybe\Converter\ConverterFactory; use phpDocumentor\Plugin\Scrybe\Converter\Format\Format;

$converter_factory = new ConverterFactory();
$converter = $converter_factory->get(
    Format::MARKDOWN, Format::HTML
);

« More »

Classes, interfaces and traits

Document

This is a customized RestructuredText document to register Scrybe-specific directives, roles and options.

The following directives are introduced using this class:

  • toctree, a directive used to insert table of contents into documents.
  • image, an overridden version of image that collects the assets.
  • figure, an overridden version of the figure that collects the assets.

The following roles are introduced in this class:

  • doc, a reference to an external piece of documentation.
« More »

ToHtml

Class used to convert one or more RestructuredText documents to their HTML representation.

This class uses a two-phase process to interpret and parse the RestructuredText documents, namely Discovery and Creation.

« More »

Classes, interfaces and traits

CodeBlock

Directive used to process `.

. toctree::` and insert entries from the table of contents.

This directive tries to match the file with an entry in the table of contents during the creation phase. If a document is found it will generate a mini-table of contents at that location with the depth given using the :maxdepth: parameter.

This directive is inspired by Sphinx' toctree directive.

« More »

Figure

Directive used to process `.

. figure::` and collect images as assets to be copied.

The filenames of the images are taken from the directive and added onto the assets collection during the discovery phase. These assets may then be copied to the destination location by the invoker.

« More »

Image

Directive used to process `.

. image::` and collect images as assets to be copied.

The filenames of the images are taken from the directive and added onto the assets collection during the discovery phase. These assets may then be copied to the destination location by the invoker.

« More »

Toctree

Directive used to process `.

. toctree::` and insert entries from the table of contents.

This directive tries to match the file with an entry in the table of contents during the creation phase. If a document is found it will generate a mini-table of contents at that location with the depth given using the :maxdepth: parameter.

Another option is :hidden: that will hide the toc from view while still making connections.

This directive is inspired by Sphinx' toctree directive.

« More »

Classes, interfaces and traits

Doc

The :doc: role creates a link to an external document.

For this link you can either use relative locations or an absolute notation. The absolute notation uses the documentation root as starting directory.

« More »

Classes, interfaces and traits

Creator

A specialized RestructuredText Parser/Visitor to provide assistance methods for the creation phase.

.

« More »

Discover

A specialized RestructuredText Parser/Visitor to aid in the discovery phase.

This class collects all headings and their titles and populates the TableOfContents collection.

« More »

Classes, interfaces and traits

Collection

A Collection containing all different text-bases file formats that are supported by Scrybe, their mmime-types and available extensions.

« More »

Format

Defines a conversion format in Scrybe.

« More »

Classes, interfaces and traits

FormatNotFoundException

« More »

Classes, interfaces and traits

Definition

Defines the basic properties for a single conversion process.

« More »

Factory

Factory class that is able to return a contract between an input and output format (Definition).

« More »

Classes, interfaces and traits

Assets

This collection manages which assets were found during the discovery phase.

Each asset is represented by an entry containing the path to that asset relative to the project root.

« More »

Glossary

The glossary is a collection containing a collection of terms and uses that were discovered during the discovery phase.

The key of this collection is the term that was discovered and the value is an array of locations where the term was used.

The array of locations consists of a filename as key and an array with the linenumbers where the term occurred.

Example:

array(1) { ["term"]=> array(1) { ["filename"]=> array(3) { [0]=> int(10) [1]=> int(14) [2]=> int(20) } } }

« More »

TableOfContents

This collection manages which headings were discovered during the discovery phase and stores them as entries.

« More »

Classes, interfaces and traits

BaseEntry

The Table of Contents entry provides essential information on the current entry, it's place in the structure and where it points to.

« More »

File

The Table of Contents File describes a file and the headings it contains.

A File may also contain other files, those will serve as containers for more headings or other files. This way it is possible to 'include' another File as part of a hierarchy and have a integrated table of contents.

« More »

Heading

The Table of Contents File describes a headings and the Files and subentries it may contain.

A Heading may also contain files, those will serve as containers for more headings or other files. This way it is possible to 'include' another File as part of a hierarchy and have a integrated table of contents.

« More »

Module

The Table of Contents module represents an independent section of the documentation.

« More »

Classes, interfaces and traits

ConverterNotFoundException

Exception indicating that a requested Converter could not be found.

« More »

Classes, interfaces and traits

TemplateInterface

« More »

Factory

A factory used to retrieve a template engine given a simplified name.

With this factory it is possible to abstract away the actual class names and provide a faux name that is suitable for configuration purposes. An additional benefit is that any plugin is able to register their own template engines if desired.

« More »

Twig

Template class to use Twig to generate templates.

« More »

Classes, interfaces and traits

BaseConvertCommand

Abstract Command class containing the scaffolding for the subsequent converting commands.

Includes additional methods to forward the output to the logging events of phpDocumentor.

« More »

ToHtmlCommand

Command used to tell the application to convert from a format to HTML.

Includes additional methods to forward the output to the logging events of phpDocumentor.

« More »

ToLatexCommand

Command used to tell the application to convert from a format to Latex.

Includes additional methods to forward the output to the logging events of phpDocumentor.

« More »

ToPdfCommand

Command used to tell the application to convert from a format to PDF.

Includes additional methods to forward the output to the logging events of phpDocumentor.

« More »

Classes, interfaces and traits

LegacyNamespaceFilter

Converts elements with underscores into a namespaced version.

This filter will examine the Name of an element and extract namespaces based on underscores in the name. Every underscore is treated as a namespace separator.

« More »

ServiceProvider

Converts all underscored class names into namespaces.

This plugin will enable a non-namespaced application to be interpreted as being namespaced for documentation purposes by separating the Classes by underscore and converting the prefix to a series of namespaces.

For example:

`My_Special_ClassName` will be transformed into the class `ClassName` with namespace `My\Special`.
« More »

Classes, interfaces and traits

LegacyNamespaceFilterTest

Tests the phpDocumentor\Plugin\LegacyNamespaceConverter\LegacyNamespaceFilter class.

« More »

Classes, interfaces and traits

ServiceProvider

« More »

Classes, interfaces and traits

Graph

Writer responsible for generating various graphs.

The Graph writer is capable of generating a Graph (as provided using the 'source' parameter) at the location provided using the artifact parameter.

Currently supported:

  • 'class', a Class Diagram Generated using GraphViz
« More »

Classes, interfaces and traits

ArgumentDescriptor

Descriptor representing a single Argument of a method or function.

« More »

ClassDescriptor

Descriptor representing a Class.

« More »

Collection

Represents an easily accessible collection of elements.

The goal for this class is to allow Descriptors to be easily retrieved and set so that interaction in templates becomes easier.

« More »

ConstantDescriptor

Descriptor representing a constant

« More »

DescriptorAbstract

Base class for descriptors containing the most used options.

« More »

FileDescriptor

Represents a file in the project.

« More »

FunctionDescriptor

Descriptor representing a function.

« More »

InterfaceDescriptor

Descriptor representing an Interface.

« More »

MethodDescriptor

Descriptor representing a Method in a Class, Interface or Trait.

« More »

NamespaceDescriptor

Represents a namespace and its children for a project.

« More »

PackageDescriptor

Represents the package for a class, trait, interface or file.

« More »

ProjectAnalyzer

Analyzes a Project Descriptor and collects key information.

This class can be used by external tools to analyze the Project Descriptor and collect key information from it such as the total number of elements per type of Descriptor, the number of top level namespaces or the number of parent classes that could not be interpreted by the Compiler passes.

« More »

ProjectDescriptor

Represents the entire project with its files, namespaces and indexes.

« More »

ProjectDescriptorBuilder

Builds a Project Descriptor and underlying tree.

« More »

PropertyDescriptor

Descriptor representing a property.

« More »

ServiceProvider

This provider is responsible for registering the Descriptor component with the given Application.

« More »

TagDescriptor

Base class for any tag descriptor and used when a tag has no specific descriptor.

« More »

TraitDescriptor

Descriptor representing a Trait.

« More »

Classes, interfaces and traits

BooleanDescriptor

A type representing a boolean.

« More »

CollectionDescriptor

Descriptor representing a collection or compound type of collection object.

This descriptor represents any type that is capable of containing other typed values. Examples of such types can be an array, DoctrineCollection or ArrayObject.

« More »

FloatDescriptor

« More »

IntegerDescriptor

« More »

StringDescriptor

« More »

UnknownTypeDescriptor

This class represents any Type that could not be identified.

Sometimes DocBlocks refer to types, such as classes, that are outside the generated project's scope; in these cases we want to identify them as such with an unknown type descriptor.

« More »

Classes, interfaces and traits

AuthorDescriptor

Descriptor representing the author tag with a descriptor.

« More »

DeprecatedDescriptor

Descriptor representing the deprecated tag with a descriptor.

« More »

ExampleDescriptor

Descriptor representing the example tag with a descriptor.

« More »

LinkDescriptor

Descriptor representing the link tag with a descriptor.

« More »

MethodDescriptor

Base class for any tag descriptor and used when a tag has no specific descriptor.

« More »

ParamDescriptor

Descriptor representing the param tag with a function or method.

« More »

PropertyDescriptor

Descriptor representing the property tag on a class or trait.

« More »

ReturnDescriptor

Descriptor representing the return tag on a function or method.

« More »

SeeDescriptor

Base class for any tag descriptor and used when a tag has no specific descriptor.

« More »

SinceDescriptor

Descriptor representing the since tag with another descriptor.

« More »

ThrowsDescriptor

Descriptor representing the throws tag on a class or trait.

« More »

UsesDescriptor

Descriptor representing the uses tag on any element.

« More »

VarDescriptor

Descriptor representing the var tag on a property.

« More »

VersionDescriptor

Descriptor representing the version tag on a class, interface, trait or file.

« More »

Classes, interfaces and traits

TypedAbstract

Base descriptor for tags that have a type associated with them.

« More »

TypedVariableAbstract

Abstract class for Descriptors with a type and variable name.

« More »

Classes, interfaces and traits

AssemblerInterface

Interface for Assembler classes that transform data to specific Descriptor types.

« More »

AssemblerAbstract

Base class for all assemblers.

« More »

AssemblerFactory

Attempts to retrieve an Assembler for the provided criteria.

« More »

Classes, interfaces and traits

ArgumentAssembler

Assembles an ArgumentDescriptor using an ArgumentReflector and ParamDescriptors.

« More »

AssemblerAbstract

Base class for all assemblers.

« More »

ClassAssembler

Assembles an ClassDescriptor using an ClassReflector.

« More »

ConstantAssembler

Assembles a ConstantDescriptor from a ConstantReflector.

« More »

FileAssembler

Assembles an FileDescriptor using an FileReflector and ParamDescriptors.

« More »

FunctionAssembler

Assembles a FunctionDescriptor from a FunctionReflector.

« More »

InterfaceAssembler

Assembles an InterfaceDescriptor using an InterfaceReflector.

« More »

MethodAssembler

Assembles a MethodDescriptor from a MethodReflector.

« More »

PropertyAssembler

Assembles a PropertyDescriptor from a PropertyReflector.

« More »

TraitAssembler

Assembles an TraitDescriptor using an TraitReflector.

« More »

Classes, interfaces and traits

AuthorAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @author tag and create a \phpDocumentor\Descriptor\Tag\AuthorDescriptor object that can be used in the rest of the application and templates.

« More »

DeprecatedAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @deprecated tag and create a \phpDocumentor\Descriptor\Tag\DeprecatedDescriptor object that can be used in the rest of the application and templates.

« More »

ExampleAssembler

This class collects data from the example tag definition of the Reflection library, tries to find the correlating example file on disk and creates a complete Descriptor from that.

« More »

GenericTagAssembler

Base class for all assemblers.

« More »

LinkAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @link tag and create a \phpDocumentor\Descriptor\Tag\LinkDescriptor object that can be used in the rest of the application and templates.

« More »

MethodAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @method tag and create a \phpDocumentor\Descriptor\Tag\MethodDescriptor object that can be used in the rest of the application and templates.

« More »

ParamAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @param tag and create a \phpDocumentor\Descriptor\Tag\ParamDescriptor object that can be used in the rest of the application and templates.

« More »

PropertyAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @property tag and create a \phpDocumentor\Descriptor\Tag\PropertyDescriptor object that can be used in the rest of the application and templates.

« More »

ReturnAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @return tag and create a \phpDocumentor\Descriptor\Tag\ReturnDescriptor object that can be used in the rest of the application and templates.

« More »

SeeAssembler

Constructs a new Descriptor from a Reflector object for the [email protected]` tag.

This class will gather the properties that were parsed by the Reflection mechanism for, specifically, an @see tag and use that to create a SeeDescriptor that describes all properties that an @see tag may have.

« More »

SinceAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @since tag and create a \phpDocumentor\Descriptor\Tag\SinceDescriptor object that can be used in the rest of the application and templates.

« More »

ThrowsAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @throws tag and create a \phpDocumentor\Descriptor\Tag\ThrowsDescriptor object that can be used in the rest of the application and templates.

« More »

TypeCollectionAssembler

Creates a Collection of type-related value objects for the given Type Collection from the Reflector.

« More »

UsesAssembler

Base class for all assemblers.

« More »

VarAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @var tag and create a \phpDocumentor\Descriptor\Tag\VarDescriptor object that can be used in the rest of the application and templates.

« More »

VersionAssembler

Constructs a new descriptor from the Reflector for an [email protected]` tag.

This object will read the reflected information for the @version tag and create a \phpDocumentor\Descriptor\Tag\VersionDescriptor object that can be used in the rest of the application and templates.

« More »

Classes, interfaces and traits

Error

Struct to record a validation error.

« More »

Classes, interfaces and traits

ArgumentInterface

Describes the public interface for a descriptor of an Argument.

« More »

ChildInterface

Describes the public interface for any descriptor that is the child is another.

« More »

ClassInterface

Common interface representing the description of a class.

« More »

ConstantInterface

Descriptor representing a constant on a class, trait, property or file.

« More »

ContainerInterface

Interface representing the common interface for all elements that can contain sub-elements.

« More »

ElementInterface

Represents the public interface to which all descriptors should be held.

« More »

FileInterface

Describes the public interface for a description of a File.

« More »

FunctionInterface

Descriptor representing a global function in a file.

« More »

InterfaceInterface

Represents the public interface for an interface descriptor.

« More »

MethodInterface

Describes the public interface of the description for a method.

« More »

NamespaceInterface

Describes the public interface for the description of a namespace.

« More »

PackageInterface

Describes the public interface for a package descriptor.

« More »

ProjectInterface

Describes the public interface for the description of a project.

« More »

PropertyInterface

Descriptor representing a property on a class or trait.

« More »

TraitInterface

Public interface definition for object representing traits.

« More »

TypeInterface

« More »

VisibilityInterface

« More »

Classes, interfaces and traits

Filterable

Interface to determine which elements can be filtered and to provide a way to set errors on the descriptor.

« More »

ClassFactory

Retrieves a series of filters to manipulate a specific Descriptor with during building.

« More »

Filter

Filter used to manipulate a descriptor after being build.

This class is used during the building of descriptors. It passes the descriptor to each individual sub-filter, which may change data in the descriptor or even remove it from the building process by returning null.

« More »

StripIgnore

Strips any Descriptor if the ignore tag is present with that element.

« More »

StripInternal

Filters a Descriptor when the @internal inline tag, or normal tag, is used.

When a Descriptor's description contains the inline tag @internal then the description of that tag should be included only when the visibility allows INTERNAL information. Otherwise it needs to be removed.

Similarly, whenever the normal @internal tag is used should this filter return null if the visibility does not allow INTERNAL information. This will remove this descriptor from the project.

« More »

StripOnVisibility

Strips any Descriptor if their visibility is allowed according to the ProjectDescriptorBuilder.

« More »

Classes, interfaces and traits

Settings

Contains the Settings for the current Project.

« More »

Classes, interfaces and traits

Finder

Class used to find an example file's location based on a given ExampleDescriptor.

« More »

Classes, interfaces and traits

MissingDependencyException

This exception is thrown when a required dependency is not included.

« More »

Classes, interfaces and traits

ProjectDescriptorMapper

Maps a projectDescriptor to and from a cache instance.

« More »

Classes, interfaces and traits

Configuration

Configuration definition for the parser.

« More »

Exception

Provides the basic exception for the parser package.

« More »

File

Parses a single file into a FileDescriptor and adds it to the given ProjectBuilder.

« More »

Parser

Class responsible for parsing the given file or files to the intermediate structure file.

This class can be used to parse one or more files to the intermediate file format for further processing.

Example of use:

$files = new \phpDocumentor\File\Collection();
$ files->addDirectories(getcwd());
$parser = new \phpDocumentor\Parser\Parser();
$parser->setPath($files->getProjectRoot());
echo $parser->parseFiles($files);
« More »

ServiceProvider

This provider is responsible for registering the parser component with the given Application.

« More »

Classes, interfaces and traits

Files

Represents the settings in the phpdoc.xml related to finding the files that are to be parsed.

« More »

Classes, interfaces and traits

ParserPopulator

« More »

Classes, interfaces and traits

ParseCommand

Parses the given source code and creates a structure file.

The parse task uses the source files defined either by -f or -d options and generates a structure file (structure.xml) at the target location (which is the folder 'output' unless the option -t is provided).

« More »

Classes, interfaces and traits

FilesNotFoundException

Exception that is thrown when the parser expects files but is unable to find them.

« More »

MissingDependencyException

This exception is thrown when a required dependency is not included.

« More »

Classes, interfaces and traits

PreFileEvent

Event thrown before the parsing of an individual file.

« More »

Classes, interfaces and traits

CompilerPassInterface

Represents a single pass / business rule to be executed by the Compiler.

« More »

Compiler

Contains a series of compiler steps in a specific order; ready to be executed during transformation.

« More »

Classes, interfaces and traits

Debug

This class is responsible for sending statistical information to the log.

For debugging purposes it can be convenient to send statistical information about the ProjectDescriptor to the log of phpDocumentor.

« More »

ElementsIndexBuilder

This class constructs the index 'elements' and populates it with all Structural Elements.

Please note that due to a conflict between namespace FQSEN's and that of classes, interfaces, traits and functions will the namespace FQSEN be prefixed with a tilde (~).

« More »

ExampleTagsEnricher

This index builder collects all examples from tags and inserts them into the example index.

« More »

MarkerFromTagsExtractor

This index builder collects all markers from tags and inserts them into the marker index.

« More »

NamespaceTreeBuilder

Rebuilds the namespace tree from the elements found in files.

On every compiler pass is the namespace tree rebuild to aid in the process of incremental updates. The Files Collection in the Project Descriptor is the only location where aliases to elements may be serialized.

If the namespace tree were to be persisted then both locations needed to be invalidated if a file were to change.

« More »

PackageTreeBuilder

Rebuilds the package tree from the elements found in files.

On every compiler pass is the package tree rebuild to aid in the process of incremental updates.

If the package tree were to be persisted then both locations needed to be invalidated if a file were to change.

« More »

ResolveInlineLinkAndSeeTags

This step in the compilation process iterates through all elements and scans their descriptions for an inline [email protected]` or [email protected]` tag and resolves them to a markdown link.

« More »

Classes, interfaces and traits

Linker

The linker contains all rules to replace FQSENs in the ProjectDescriptor with aliases to objects.

This object contains a list of class FQCNs for Descriptors and their associated linker rules.

An example scenario should be:

The Descriptor ``\phpDocumentor\Descriptor\ClassDescriptor`` has a *Substitute* rule determining that the
contents of the ``Parent`` field should be substituted with another ClassDescriptor with the FQCN
represented by the value of the Parent field. In addition (second element) it has an *Analyse* rule
specifying that the contents of the ``Methods`` field should be interpreted by the linker. Because that field
contains an array or Descriptor Collection will each element be analysed by the linker.

As can be seen in the above example is it possible to analyse a tree structure and substitute FQSENs where encountered.

« More »

Classes, interfaces and traits

Command

Base command for phpDocumentor commands.

Includes additional methods to forward the output to the logging events of phpDocumentor.

« More »

Classes, interfaces and traits

ConfigurationHelper

« More »

LoggerHelper

« More »

Classes, interfaces and traits

UpdateCommand

Updates phpDocumentor.phar to the latest version.

$ php phpDocumentor.phar phar:update [-m|--major] [-p|--pre] [version]
« More »

Classes, interfaces and traits

RunCommand

Parse and transform the given directory (-d|-f) to the given location (-t).

phpDocumentor creates documentation from PHP source files. The simplest way to use it is:

$ phpdoc run -d <directory to parse> -t <output directory>

This will parse every file ending with .php, .php3 and .phtml in <directory to parse> and then output a HTML site containing easily readable documentation in .

phpDocumentor will try to look for a phpdoc.dist.xml or phpdoc.xml file in your current working directory and use that to override the default settings if present. In the configuration file can you specify the same settings (and more) as the command line provides.

« More »

Classes, interfaces and traits

ArgvInput

Argv input for the Console component of Symfony adapted to phpDocumentor.

This InputStream for the Symfony Console component prepends the namespace and command name project:run to the Argv array if no command has been provided.

« More »

Classes, interfaces and traits

Output

A custom output class for our Console object that supports writing to the log.

« More »

Classes, interfaces and traits

Loader

Loads the template and user-defined configuration file from disk and creates a Configuration object from it.

This class will merge the template file and the user-defined configuration file together and serialize it into a configuration object (defaults to phpDocumentor\Configuration).

« More »

Logging

Configuration definition for the logger.

« More »

Merger

Deep-merges any variable.

This class is capable of merging together arrays and objects of the same class; all other types of variables are replaced. In addition this merger also supports the Replace annotation; this annotation can be placed on a property of a class and will indicate that that property must not be merged but replaced in its entirety.

« More »

ServiceProvider

Provides a series of services in order to handle the configuration for phpDocumentor.

This class is responsible for registering a 'Merger' service that is used to combine several configuration definitions into one and will add a new option config to all commands of phpDocumentor.

Exposed services:

  • 'config', the configuration service containing all options and parameters for phpDocumentor.
  • 'config.merger', a service used to combine the configuration template with the user configuration file (phpdoc.xml of phpdoc.dist.xml).

The following variables are exposed:

  • 'config.path.template', the location of the configuration template with defaults.
  • 'config.path.user', the location of the user configuration file that will be merged with the template.
  • 'config.class', the class name of the root configuration object.
« More »

Classes, interfaces and traits

Replace

Declares that, when merging objects, the property with this annotation should be replaced and not merged with the property of the same name in the secondary object.

Normal behaviour for the Merger is to merge two properties with the same name if they contain an array of items. When this annotation is used on a property then this behavior is altered and the associated property is always replaced with the newer version.

« More »

Classes, interfaces and traits

DebugEvent

Event representing some debugging information for phpDocumentor.

The information logged by this event will only be visible if the verbose option is provided to phpDocumentor.

« More »

Dispatcher

Event Dispatching class.

This class provides a bridge to the Symfony2 EventDispatcher. At current this is provided by inheritance but future iterations should solve this by making it an adapter pattern.

The class is implemented as (mockable) Singleton as this was the best solution to make the functionality available in every class of the project.

« More »

EventAbstract

Abstract class representing the base elements of a phpDocumentor event.

« More »

LogEvent

Logging event for phpDocumentor where information is output to the log or stdout.

The information logged by this event will only be visible if the verbose option is provided to phpDocumentor.

« More »

Classes, interfaces and traits

Collection

Represents an easily accessible collection of partials.

The goal for this class is to allow Descriptors to be easily retrieved and set so that interaction in templates becomes easier.

« More »

Partial

« More »

ServiceProvider

This provider is responsible for registering the partials component with the given Application.

« More »

Classes, interfaces and traits

MissingNameForPartialException

This exception is thrown when a required name is not set.

« More »

Classes, interfaces and traits

Configuration

Configuration definition for the translations.

« More »

ServiceProvider

Registers all components for the translator to work.

This provider registers the following service:

  • translator, provides translation services

In addition to the above service the following parameters are registered as well:

  • translator.locale, contains the current locale.
« More »

Translator

Translator proxy for phpDocumentor.

This class encapsulates (or actually extends) a Translator object that can be used to translate messages from the fallback language to another.

This encapsulation serves two purposes;

  1. To make a migration to another translator easier if necessary
  2. To fix a bug in Zend\I18n\Translator\Translator where the cache is not cleared when new messages are added.

Due to issue 2 this class extends the Zend Translator and does not use composition to proxy calls to the translator; as such it is not recommended to use any public function not defined in this proxy as it may be removed.

Before invoking the \phpDocumentor\Translator\self::translate() method the user must first load a series of translation messages in the desired locale; this can be done by invoking the \phpDocumentor\Translator\self::addTranslationFile() or \phpDocumentor\Translator\self::addTranslationFolder() methods. These try to include a file containing a plain PHP Array and merge that with the translation table of this translator.

An example of a translation file can be:

return array(
    'KEY' => 'translated message',
);
« More »