ServiceProvider

Implements \Cilex\ServiceProviderInterface

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.

package

Default

Methods

Returns the Translator service from the Service Locator.

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

Arguments

$app

\Cilex\Application

Response

\phpDocumentor\Translator\Translator

Returns the WriterCollection service from the Service Locator.

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

Arguments

$app

\Cilex\Application

Response

\phpDocumentor\Transformer\Writer\Collection

Registers services on the given app.

register(\Cilex\Application $app) : void

Arguments

$app

\Cilex\Application

An Application instance.

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

registerDependenciesOnXsltExtension(\Cilex\Application $app) : void

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.

Arguments

$app

\Cilex\Application

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

registerTranslationMessages(\Cilex\Application $app) : void

Arguments

$app

\Cilex\Application

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

registerWriters(\Cilex\Application $app) : void

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

Arguments

$app

\Cilex\Application