PHP 클래스 Neos\Flow\ObjectManagement\CompileTimeObjectManager

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

보호된 프로퍼티들

프로퍼티 타입 설명
$cachedClassNamesByScope array
$configurationCache Neos\Cache\Frontend\VariableFrontend
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$objectConfigurations array
$objectNameBuildStack array
$reflectionService Neos\Flow\Reflection\ReflectionService
$registeredClassNames array A list of all class names known to the Object Manager
$systemLogger Neos\Flow\Log\SystemLoggerInterface

공개 메소드들

메소드 설명
get ( string $objectName ) : object Returns a fresh or existing instance of the object specified by $objectName.
getClassNamesByScope ( integer $scope ) : array Returns a list of class names, which are configured with the given scope
getObjectConfigurations ( ) : array Returns object configurations which were previously built by the ConfigurationBuilder.
getRegisteredClassNames ( ) : array Returns a list of all class names, grouped by package key, which were registered by registerClassFiles()
initialize ( array $packages ) : void Initializes the the object configurations and some other parts of this Object Manager.
injectConfigurationCache ( Neos\Cache\Frontend\VariableFrontend $configurationCache ) : void Injects the configuration cache of the Object Framework
injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
injectReflectionService ( ReflectionService $reflectionService ) : void
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
setInstance ( string $objectName, object $instance ) : void Sets the instance of the given object
shutdown ( ) : void Shuts down this Object Container by calling the shutdown methods of all object instances which were configured to be shut down.

보호된 메소드들

메소드 설명
applyClassFilterConfiguration ( array $classNames, array $filterConfiguration, string $includeOrExclude = 'include' ) : array Filters the classnames available for object management by filter expressions that either include or exclude classes.
buildObjectsArray ( ) : array Builds the objects array which contains information about the registered objects, their scope, class, built method etc.
collectExcludedPackages ( array $registeredPackageKeys ) : array Explodes the regular expressions for package name in excludeClasses configuration to full package names.
filterClassNamesFromConfiguration ( array $classNames, array $includeClassesConfiguration ) : array Given an array of class names by package key this filters out classes that have been configured to be excluded or included by object management.
registerClassFiles ( array $packages ) : array Traverses through all class files of the active packages and registers collects the class names as "all available class names". If the respective Flow settings say so, also function test classes are registered.

메소드 상세

applyClassFilterConfiguration() 보호된 메소드

Filters the classnames available for object management by filter expressions that either include or exclude classes.
protected applyClassFilterConfiguration ( array $classNames, array $filterConfiguration, string $includeOrExclude = 'include' ) : array
$classNames array All classnames per package
$filterConfiguration array The filter configuration to apply
$includeOrExclude string if this is an "include" or "exclude" filter
리턴 array the remaining class

buildObjectsArray() 보호된 메소드

Builds the objects array which contains information about the registered objects, their scope, class, built method etc.
protected buildObjectsArray ( ) : array
리턴 array

collectExcludedPackages() 보호된 메소드

Explodes the regular expressions for package name in excludeClasses configuration to full package names.
protected collectExcludedPackages ( array $registeredPackageKeys ) : array
$registeredPackageKeys array
리턴 array

filterClassNamesFromConfiguration() 보호된 메소드

Given an array of class names by package key this filters out classes that have been configured to be excluded or included by object management.
protected filterClassNamesFromConfiguration ( array $classNames, array $includeClassesConfiguration ) : array
$classNames array 2-level array - key of first level is package key, value of second level is classname (FQN)
$includeClassesConfiguration array array of includeClasses configurations
리턴 array The input array with all configured to be excluded from object management filtered out

get() 공개 메소드

This specialized get() method is able to do setter injection for properties defined in the object configuration of the specified object.
public get ( string $objectName ) : object
$objectName string The name of the object to return an instance of
리턴 object The object instance

getClassNamesByScope() 공개 메소드

Returns a list of class names, which are configured with the given scope
public getClassNamesByScope ( integer $scope ) : array
$scope integer One of the ObjectConfiguration::SCOPE_ constants
리턴 array An array of class names configured with the given scope

getObjectConfigurations() 공개 메소드

Returns object configurations which were previously built by the ConfigurationBuilder.
public getObjectConfigurations ( ) : array
리턴 array

getRegisteredClassNames() 공개 메소드

Returns a list of all class names, grouped by package key, which were registered by registerClassFiles()
public getRegisteredClassNames ( ) : array
리턴 array

initialize() 공개 메소드

Initializes the the object configurations and some other parts of this Object Manager.
public initialize ( array $packages ) : void
$packages array An array of active packages to consider
리턴 void

injectConfigurationCache() 공개 메소드

Injects the configuration cache of the Object Framework
public injectConfigurationCache ( Neos\Cache\Frontend\VariableFrontend $configurationCache ) : void
$configurationCache Neos\Cache\Frontend\VariableFrontend
리턴 void

injectConfigurationManager() 공개 메소드

public injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
$configurationManager Neos\Flow\Configuration\ConfigurationManager
리턴 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

registerClassFiles() 보호된 메소드

For performance reasons this function ignores classes whose name ends with "Exception".
protected registerClassFiles ( array $packages ) : array
$packages array A list of packages to consider
리턴 array A list of class names which were discovered in the given packages

setInstance() 공개 메소드

In the Compile Time Object Manager it is even allowed to set instances of not-yet-known objects as long as the Object Manager is not initialized, because some few parts need an object registry even before the Object Manager is fully functional.
public setInstance ( string $objectName, object $instance ) : void
$objectName string The object name
$instance object A prebuilt instance
리턴 void

shutdown() 공개 메소드

Shuts down this Object Container by calling the shutdown methods of all object instances which were configured to be shut down.
public shutdown ( ) : void
리턴 void

프로퍼티 상세

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

protected array $cachedClassNamesByScope
리턴 array

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

protected VariableFrontend,Neos\Cache\Frontend $configurationCache
리턴 Neos\Cache\Frontend\VariableFrontend

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

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

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

protected array $objectConfigurations
리턴 array

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

protected array $objectNameBuildStack
리턴 array

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

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

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

A list of all class names known to the Object Manager
protected array $registeredClassNames
리턴 array

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

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