PHP 클래스 Neos\Flow\ObjectManagement\DependencyInjection\ProxyClassBuilder

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$compiler Neos\Flow\ObjectManagement\Proxy\Compiler
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$objectConfigurations array
$objectManager Neos\Flow\ObjectManagement\CompileTimeObjectManager
$reflectionService Neos\Flow\Reflection\ReflectionService
$systemLogger Neos\Flow\Log\SystemLoggerInterface

공개 메소드들

메소드 설명
build ( ) : void Analyzes the Object Configuration provided by the compiler and builds the necessary PHP code for the proxy classes to realize dependency injection.
buildPropertyInjectionCodeByConfigurationTypeAndPath ( Configuration $objectConfiguration, string $propertyName, string $configurationType, string $configurationPath = null ) : array Builds code which assigns the value stored in the specified configuration into the given class property.
buildPropertyInjectionCodeByString ( Configuration $objectConfiguration, Neos\Flow\ObjectManagement\Configuration\ConfigurationProperty $propertyConfiguration, string $propertyName, string $propertyObjectName ) : array Builds code which injects an object which was specified by its object name
injectCompiler ( Compiler $compiler ) : void
injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
injectObjectManager ( CompileTimeObjectManager $objectManager ) : void
injectReflectionService ( ReflectionService $reflectionService ) : void
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void

보호된 메소드들

메소드 설명
buildConstructorInjectionCode ( Configuration $objectConfiguration ) : string Renders additional code for the __construct() method of the Proxy Class which realizes constructor injection.
buildCustomFactoryCall ( string $customFactoryObjectName, string $customFactoryMethodName, array $arguments ) : string
buildLazyPropertyInjectionCode ( string $propertyObjectName, string $propertyClassName, string $propertyName, string $preparedSetterArgument ) : array Builds code which injects a DependencyProxy instead of the actual dependency
buildLifecycleInitializationCode ( Configuration $objectConfiguration, integer $cause ) : string Builds code which calls the lifecycle initialization method, if any.
buildLifecycleShutdownCode ( Configuration $objectConfiguration ) : string Builds code which registers the lifecycle shutdown method, if any.
buildMethodParametersCode ( array $argumentConfigurations ) : string FIXME: Not yet completely refactored to new proxy mechanism
buildPropertyInjectionCode ( Configuration $objectConfiguration ) : string Builds the code necessary to inject setter based dependencies.
buildPropertyInjectionCodeByConfiguration ( Configuration $objectConfiguration, string $propertyName, Configuration $propertyConfiguration ) : array Builds code which injects an object which was specified by its object configuration
buildSerializeRelatedEntitiesCode ( Configuration $objectConfiguration ) : string Renders code to create identifier/type information from related entities in an object.
buildSetInstanceCode ( Configuration $objectConfiguration ) : string Renders additional code which registers the instance of the proxy class at the Object Manager before constructor injection is executed. Used in constructors and wakeup methods.
buildSetterInjectionCode ( string $className, string $propertyName, string $preparedSetterArgument ) : array Builds a code snippet which tries to inject the specified property first through calling the related inject*() method and then the set*() method. If neither exists and the property doesn't exist either, an empty array is returned.
compileStaticMethods ( string $className, ProxyClass $proxyClass ) : void Compile the result of methods marked with CompileStatic into the proxy class

메소드 상세

build() 공개 메소드

Analyzes the Object Configuration provided by the compiler and builds the necessary PHP code for the proxy classes to realize dependency injection.
public build ( ) : void
리턴 void

buildConstructorInjectionCode() 보호된 메소드

Renders additional code for the __construct() method of the Proxy Class which realizes constructor injection.
protected buildConstructorInjectionCode ( Configuration $objectConfiguration ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration
리턴 string The built code

buildCustomFactoryCall() 보호된 메소드

protected buildCustomFactoryCall ( string $customFactoryObjectName, string $customFactoryMethodName, array $arguments ) : string
$customFactoryObjectName string
$customFactoryMethodName string
$arguments array
리턴 string

buildLazyPropertyInjectionCode() 보호된 메소드

Builds code which injects a DependencyProxy instead of the actual dependency
protected buildLazyPropertyInjectionCode ( string $propertyObjectName, string $propertyClassName, string $propertyName, string $preparedSetterArgument ) : array
$propertyObjectName string Object name of the dependency to inject
$propertyClassName string Class name of the dependency to inject
$propertyName string Name of the property in the class to inject into
$preparedSetterArgument string PHP code to use for retrieving the value to inject
리턴 array PHP code

buildLifecycleInitializationCode() 보호된 메소드

Builds code which calls the lifecycle initialization method, if any.
protected buildLifecycleInitializationCode ( Configuration $objectConfiguration, integer $cause ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration
$cause integer a \Neos\Flow\ObjectManagement\ObjectManagerInterface::INITIALIZATIONCAUSE_* constant which is the cause of the initialization command being called.
리턴 string

buildLifecycleShutdownCode() 보호된 메소드

Builds code which registers the lifecycle shutdown method, if any.
protected buildLifecycleShutdownCode ( Configuration $objectConfiguration ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration
리턴 string

buildMethodParametersCode() 보호된 메소드

FIXME: Not yet completely refactored to new proxy mechanism
protected buildMethodParametersCode ( array $argumentConfigurations ) : string
$argumentConfigurations array
리턴 string

buildPropertyInjectionCode() 보호된 메소드

Builds the code necessary to inject setter based dependencies.
protected buildPropertyInjectionCode ( Configuration $objectConfiguration ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration (needed to produce helpful exception message)
리턴 string The built code

buildPropertyInjectionCodeByConfiguration() 보호된 메소드

Builds code which injects an object which was specified by its object configuration
protected buildPropertyInjectionCodeByConfiguration ( Configuration $objectConfiguration, string $propertyName, Configuration $propertyConfiguration ) : array
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration Configuration of the object to inject into
$propertyName string Name of the property to inject
$propertyConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration Configuration of the object to inject
리턴 array PHP code

buildPropertyInjectionCodeByConfigurationTypeAndPath() 공개 메소드

Builds code which assigns the value stored in the specified configuration into the given class property.
public buildPropertyInjectionCodeByConfigurationTypeAndPath ( Configuration $objectConfiguration, string $propertyName, string $configurationType, string $configurationPath = null ) : array
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration Configuration of the object to inject into
$propertyName string Name of the property to inject
$configurationType string the configuration type of the injected property (one of the ConfigurationManager::CONFIGURATION_TYPE_* constants)
$configurationPath string Path with "." as separator specifying the setting value to inject or NULL if the complete configuration array should be injected
리턴 array PHP code

buildPropertyInjectionCodeByString() 공개 메소드

Builds code which injects an object which was specified by its object name
public buildPropertyInjectionCodeByString ( Configuration $objectConfiguration, Neos\Flow\ObjectManagement\Configuration\ConfigurationProperty $propertyConfiguration, string $propertyName, string $propertyObjectName ) : array
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration Configuration of the object to inject into
$propertyConfiguration Neos\Flow\ObjectManagement\Configuration\ConfigurationProperty
$propertyName string Name of the property to inject
$propertyObjectName string Object name of the object to inject
리턴 array PHP code

buildSerializeRelatedEntitiesCode() 보호된 메소드

Used in sleep methods.
protected buildSerializeRelatedEntitiesCode ( Configuration $objectConfiguration ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration
리턴 string

buildSetInstanceCode() 보호된 메소드

This also makes sure that object creation does not end in an endless loop due to bi-directional dependencies.
protected buildSetInstanceCode ( Configuration $objectConfiguration ) : string
$objectConfiguration Neos\Flow\ObjectManagement\Configuration\Configuration
리턴 string

buildSetterInjectionCode() 보호된 메소드

If neither inject*() nor set*() exists, but the property does exist, NULL is returned
protected buildSetterInjectionCode ( string $className, string $propertyName, string $preparedSetterArgument ) : array
$className string Name of the class to inject into
$propertyName string Name of the property to inject
$preparedSetterArgument string PHP code to use for retrieving the value to inject
리턴 array PHP code

compileStaticMethods() 보호된 메소드

Compile the result of methods marked with CompileStatic into the proxy class
protected compileStaticMethods ( string $className, ProxyClass $proxyClass ) : void
$className string
$proxyClass Neos\Flow\ObjectManagement\Proxy\ProxyClass
리턴 void

injectCompiler() 공개 메소드

public injectCompiler ( Compiler $compiler ) : void
$compiler Neos\Flow\ObjectManagement\Proxy\Compiler
리턴 void

injectConfigurationManager() 공개 메소드

public injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
$configurationManager Neos\Flow\Configuration\ConfigurationManager
리턴 void

injectObjectManager() 공개 메소드

public injectObjectManager ( CompileTimeObjectManager $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\CompileTimeObjectManager
리턴 void

injectReflectionService() 공개 메소드

public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
리턴 void

injectSystemLogger() 공개 메소드

public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
리턴 void

프로퍼티 상세

$compiler 보호되어 있는 프로퍼티

protected Compiler,Neos\Flow\ObjectManagement\Proxy $compiler
리턴 Neos\Flow\ObjectManagement\Proxy\Compiler

$configurationManager 보호되어 있는 프로퍼티

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
리턴 Neos\Flow\Configuration\ConfigurationManager

$objectConfigurations 보호되어 있는 프로퍼티

protected array $objectConfigurations
리턴 array

$objectManager 보호되어 있는 프로퍼티

protected CompileTimeObjectManager,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\CompileTimeObjectManager

$reflectionService 보호되어 있는 프로퍼티

protected ReflectionService,Neos\Flow\Reflection $reflectionService
리턴 Neos\Flow\Reflection\ReflectionService

$systemLogger 보호되어 있는 프로퍼티

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
리턴 Neos\Flow\Log\SystemLoggerInterface