ConfigurationFactory
in package
The ConfigurationFactory converts the configuration xml from a Uri into an array.
Table of Contents
- $defaultFiles : array<string|int, string>
- $middlewares : array<int, MiddlewareInterface>
- A series of callables that take the configuration array as parameter and should return that array or a modified version of it.
- $symfonyConfigFactory : SymfonyConfigFactory
- __construct() : mixed
- Initializes the ConfigurationFactory.
- addMiddleware() : void
- Adds a middleware callback that allows the consumer to alter the configuration array when it is constructed.
- createDefault() : Configuration
- fromDefault() : Configuration
- fromDefaultLocations() : Configuration
- Attempts to load a configuration from the default locations for phpDocumentor
- fromUri() : Configuration
- Converts the phpDocumentor configuration xml to an array.
- applyMiddleware() : Configuration
- Applies all middleware callbacks onto the configuration.
- createConfigurationFromArray() : Configuration
Properties
$defaultFiles
private
array<string|int, string>
$defaultFiles
$middlewares
A series of callables that take the configuration array as parameter and should return that array or a modified version of it.
private
array<int, MiddlewareInterface>
$middlewares
= []
$symfonyConfigFactory
private
SymfonyConfigFactory
$symfonyConfigFactory
Methods
__construct()
Initializes the ConfigurationFactory.
public
__construct(array<string|int, string> $defaultFiles, SymfonyConfigFactory $symfonyConfigFactory) : mixed
Parameters
- $defaultFiles : array<string|int, string>
- $symfonyConfigFactory : SymfonyConfigFactory
Return values
mixed —addMiddleware()
Adds a middleware callback that allows the consumer to alter the configuration array when it is constructed.
public
addMiddleware(MiddlewareInterface $middleware) : void
Parameters
- $middleware : MiddlewareInterface
Return values
void —createDefault()
public
createDefault() : Configuration
Return values
Configuration —fromDefault()
public
fromDefault() : Configuration
Return values
Configuration —fromDefaultLocations()
Attempts to load a configuration from the default locations for phpDocumentor
public
fromDefaultLocations() : Configuration
Return values
Configuration —fromUri()
Converts the phpDocumentor configuration xml to an array.
public
fromUri(UriInterface $uri) : Configuration
Parameters
- $uri : UriInterface
-
The location of the file to be loaded.
Tags
Return values
Configuration —applyMiddleware()
Applies all middleware callbacks onto the configuration.
private
applyMiddleware(Configuration $configuration, UriInterface|null $uri) : Configuration
Parameters
- $configuration : Configuration
- $uri : UriInterface|null
Return values
Configuration —createConfigurationFromArray()
private
createConfigurationFromArray(array<string|int, mixed> $configuration) : Configuration
Parameters
- $configuration : array<string|int, mixed>