\phpDocumentor\ConfigurationServiceProvider

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.

Summary

Methods
Properties
Constants
register()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
addMerger()
addMergerAnnotations()
No private properties found
N/A

Methods

register()

register(\Cilex\Application  $app) 

Adds the Configuration object to the DIC.

phpDocumentor first loads the template config file (/data/phpdoc.tpl.xml) and then the phpdoc.dist.xml, or the phpdoc.xml if it exists but not both, from the current working directory.

The user config file (either phpdoc.dist.xml or phpdoc.xml) is merged with the template file.

Parameters

\Cilex\Application $app

An Application instance

addMerger()

addMerger(\Cilex\Application  $container) : void

Initializes and adds the configuration merger object as the 'config.merger' service to the container.

Parameters

\Cilex\Application $container

addMergerAnnotations()

addMergerAnnotations(\Cilex\Application  $container) : void

Adds the annotations for the Merger component to the Serializer.

Parameters

\Cilex\Application $container

Throws

\RuntimeException

if the annotation handler for Jms Serializer is not added to the container as 'serializer.annotations' service.