ConfigurationFactory
in package
The ConfigurationFactory converts the configuration xml from a Uri into an array.
Tags
Table of Contents
Properties
- $defaultFiles : array<string|int, mixed>
- $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
Methods
- __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 read-only
private
array<string|int, mixed>
$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 read-only
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
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
createDefault()
public
createDefault() : Configuration
Return values
ConfigurationfromDefault()
public
fromDefault() : Configuration
Return values
ConfigurationfromDefaultLocations()
Attempts to load a configuration from the default locations for phpDocumentor
public
fromDefaultLocations() : Configuration
Return values
ConfigurationfromUri()
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
ConfigurationapplyMiddleware()
Applies all middleware callbacks onto the configuration.
private
applyMiddleware(Configuration $configuration, UriInterface|null $uri) : Configuration
Parameters
- $configuration : Configuration
- $uri : UriInterface|null
Return values
ConfigurationcreateConfigurationFromArray()
private
createConfigurationFromArray(ConfigurationMap $configuration) : Configuration
Parameters
- $configuration : ConfigurationMap