\phpDocumentor\Plugin\CoreServiceProvider

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.

Summary

Methods
Properties
Constants
register()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
registerWriters()
registerTranslationMessages()
registerDependenciesOnXsltExtension()
getTranslator()
getWriterCollection()
No private properties found
N/A

Methods

register()

register(\Cilex\Application  $app) : void

Registers services on the given app.

Parameters

\Cilex\Application $app

An Application instance.

registerWriters()

registerWriters(\Cilex\Application  $app) : void

Creates all writers for this plugin and adds them to the WriterCollection object.

This action will enable transformations in templates to make use of these writers.

Parameters

\Cilex\Application $app

registerTranslationMessages()

registerTranslationMessages(\Cilex\Application  $app) : void

Registers the Messages folder in this plugin as a source of translations.

Parameters

\Cilex\Application $app

registerDependenciesOnXsltExtension()

registerDependenciesOnXsltExtension(\Cilex\Application  $app) : void

Registers the Routing Queue and Descriptor Builder objects on the XSLT Extension class.

In every template we use PHP helpers in order to be able to have routing that is universal between templates and convert Markdown text into HTML (for example). The only way for XSL to do this is by having global functions or static methods in a class because you cannot inject an object into an XSL processor.

With this method we make sure that all dependencies used by the static methods are injected as static properties.

Parameters

\Cilex\Application $app

getTranslator()

getTranslator(\Cilex\Application  $app) : \phpDocumentor\Translator\Translator

Returns the Translator service from the Service Locator.

Parameters

\Cilex\Application $app

Returns

\phpDocumentor\Translator\Translator

getWriterCollection()

getWriterCollection(\Cilex\Application  $app) : \phpDocumentor\Transformer\Writer\Collection

Returns the WriterCollection service from the Service Locator.

Parameters

\Cilex\Application $app

Returns

\phpDocumentor\Transformer\Writer\Collection