\phpDocumentor\ConfigurationConfigurationFactory

The ConfigurationFactory converts the configuration xml from a Uri into an array.

Summary

Methods
Properties
Constants
__construct()
addMiddleware()
fromDefaultLocations()
createDefault()
fromUri()
fromDefault()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
applyMiddleware()
createConfigurationFromArray()
$middlewares
$defaultFiles
$symfonyConfigFactory
N/A

Properties

$middlewares

$middlewares : \phpDocumentor\Configuration\list<\phpDocumentor\Configuration\MiddlewareInterface>

A series of callables that take the configuration array as parameter and should return that array or a modified version of it.

Type

MiddlewareInterface>

$defaultFiles

$defaultFiles : string[]

Type

string[]

$symfonyConfigFactory

$symfonyConfigFactory : \phpDocumentor\Configuration\SymfonyConfigFactory

Type

SymfonyConfigFactory

Methods

__construct()

__construct(string[]  $defaultFiles, \phpDocumentor\Configuration\SymfonyConfigFactory  $symfonyConfigFactory) : mixed

Initializes the ConfigurationFactory.

Parameters

string[] $defaultFiles
\phpDocumentor\Configuration\SymfonyConfigFactory $symfonyConfigFactory

Returns

mixed —

addMiddleware()

addMiddleware(\phpDocumentor\Configuration\MiddlewareInterface  $middleware) : void

Adds a middleware callback that allows the consumer to alter the configuration array when it is constructed.

Parameters

\phpDocumentor\Configuration\MiddlewareInterface $middleware

fromDefaultLocations()

fromDefaultLocations() : \phpDocumentor\Configuration\Configuration

Attempts to load a configuration from the default locations for phpDocumentor

Returns

\phpDocumentor\Configuration\Configuration —

createDefault()

createDefault() : \phpDocumentor\Configuration\Configuration

Returns

\phpDocumentor\Configuration\Configuration —

fromUri()

fromUri(\League\Uri\Contracts\UriInterface  $uri) : \phpDocumentor\Configuration\Configuration

Converts the phpDocumentor configuration xml to an array.

Parameters

\League\Uri\Contracts\UriInterface $uri

The location of the file to be loaded.

Throws

\phpDocumentor\Configuration\Exception\InvalidConfigPathException

If $uri points to an inexistent file.

Returns

\phpDocumentor\Configuration\Configuration —

fromDefault()

fromDefault() : \phpDocumentor\Configuration\Configuration

Returns

\phpDocumentor\Configuration\Configuration —

applyMiddleware()

applyMiddleware(\phpDocumentor\Configuration\Configuration  $configuration, ?\League\Uri\Contracts\UriInterface  $uri) : \phpDocumentor\Configuration\Configuration

Applies all middleware callbacks onto the configuration.

Parameters

\phpDocumentor\Configuration\Configuration $configuration
?\League\Uri\Contracts\UriInterface $uri

Returns

\phpDocumentor\Configuration\Configuration —

createConfigurationFromArray()

createConfigurationFromArray(array  $configuration) : \phpDocumentor\Configuration\Configuration

Parameters

array $configuration

Returns

\phpDocumentor\Configuration\Configuration —