PHP Class Neos\Flow\ObjectManagement\Configuration\ConfigurationBuilder

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$reflectionService Neos\Flow\Reflection\ReflectionService
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Méthodes publiques

Méthode Description
buildObjectConfigurations ( array $availableClassAndInterfaceNamesByPackage, array $rawObjectConfigurationsByPackages ) : array Traverses through the given class and interface names and builds a base object configuration for all of them. Then parses the provided extra configuration and merges the result into the overall configuration. Finally autowires dependencies of arguments and properties which can be resolved automatically.
injectReflectionService ( ReflectionService $reflectionService ) : void
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void

Méthodes protégées

Méthode Description
autowireArguments ( array &$objectConfigurations ) : void If mandatory constructor arguments have not been defined yet, this function tries to autowire them if possible.
autowireProperties ( array &$objectConfigurations ) : void This function tries to find yet unmatched dependencies which need to be injected via "inject*" setter methods.
enhanceRawConfigurationWithAnnotationOptions ( string $className, array $rawObjectConfiguration ) : array Builds a raw configuration array by parsing possible scope and autowiring annotations from the given class or interface.
parseArgumentOfTypeObject ( string $argumentName, mixed $objectNameOrConfiguration, string $configurationSourceHint ) : ConfigurationArgument Parses the configuration for arguments of type OBJECT
parseAutowiring ( mixed $value ) : integer Parses the value of the option "autowiring"
parseConfigurationArray ( string $objectName, array $rawConfigurationOptions, string $configurationSourceHint = '', Configuration $existingObjectConfiguration = null ) : Configuration Builds an object configuration object from a generic configuration container.
parsePropertyOfTypeObject ( string $propertyName, mixed $objectNameOrConfiguration, Configuration $parentObjectConfiguration ) : ConfigurationProperty Parses the configuration for properties of type OBJECT
parseScope ( string $value ) : integer Parses the value of the option "scope"

Method Details

autowireArguments() protected méthode

If mandatory constructor arguments have not been defined yet, this function tries to autowire them if possible.
protected autowireArguments ( array &$objectConfigurations ) : void
$objectConfigurations array
Résultat void

autowireProperties() protected méthode

This function tries to find yet unmatched dependencies which need to be injected via "inject*" setter methods.
protected autowireProperties ( array &$objectConfigurations ) : void
$objectConfigurations array
Résultat void

buildObjectConfigurations() public méthode

Traverses through the given class and interface names and builds a base object configuration for all of them. Then parses the provided extra configuration and merges the result into the overall configuration. Finally autowires dependencies of arguments and properties which can be resolved automatically.
public buildObjectConfigurations ( array $availableClassAndInterfaceNamesByPackage, array $rawObjectConfigurationsByPackages ) : array
$availableClassAndInterfaceNamesByPackage array An array of available class names, grouped by package key
$rawObjectConfigurationsByPackages array An array of package keys and their raw (ie. unparsed) object configurations
Résultat array

enhanceRawConfigurationWithAnnotationOptions() protected méthode

Builds a raw configuration array by parsing possible scope and autowiring annotations from the given class or interface.
protected enhanceRawConfigurationWithAnnotationOptions ( string $className, array $rawObjectConfiguration ) : array
$className string
$rawObjectConfiguration array
Résultat array

injectReflectionService() public méthode

public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
Résultat void

injectSystemLogger() public méthode

public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
Résultat void

parseArgumentOfTypeObject() protected méthode

Parses the configuration for arguments of type OBJECT
protected parseArgumentOfTypeObject ( string $argumentName, mixed $objectNameOrConfiguration, string $configurationSourceHint ) : ConfigurationArgument
$argumentName string Name of the argument
$objectNameOrConfiguration mixed Value of the "object" section of the argument configuration - either a string or an array
$configurationSourceHint string A human readable hint on the original source of the configuration (for troubleshooting)
Résultat ConfigurationArgument A configuration argument of type object

parseAutowiring() protected static méthode

Parses the value of the option "autowiring"
protected static parseAutowiring ( mixed $value ) : integer
$value mixed Value of the option
Résultat integer The autowiring option translated into one of Configuration::AUTOWIRING_MODE_*

parseConfigurationArray() protected méthode

Builds an object configuration object from a generic configuration container.
protected parseConfigurationArray ( string $objectName, array $rawConfigurationOptions, string $configurationSourceHint = '', Configuration $existingObjectConfiguration = null ) : Configuration
$objectName string Name of the object
$rawConfigurationOptions array The configuration array with options for the object configuration
$configurationSourceHint string A human readable hint on the original source of the configuration (for troubleshooting)
$existingObjectConfiguration Configuration If set, this object configuration object will be used instead of creating a fresh one
Résultat Configuration The object configuration object

parsePropertyOfTypeObject() protected méthode

Parses the configuration for properties of type OBJECT
protected parsePropertyOfTypeObject ( string $propertyName, mixed $objectNameOrConfiguration, Configuration $parentObjectConfiguration ) : ConfigurationProperty
$propertyName string Name of the property
$objectNameOrConfiguration mixed Value of the "object" section of the property configuration - either a string or an array
$parentObjectConfiguration Configuration The Configuration object this property belongs to
Résultat ConfigurationProperty A configuration property of type object

parseScope() protected méthode

Parses the value of the option "scope"
protected parseScope ( string $value ) : integer
$value string Value of the option
Résultat integer The scope translated into a Configuration::SCOPE_* constant

Property Details

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
Résultat Neos\Flow\Reflection\ReflectionService

$systemLogger protected_oe property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Résultat Neos\Flow\Log\SystemLoggerInterface