Property | Type | Description | |
---|---|---|---|
$allSettings | array | An array of settings of all packages, indexed by package key | |
$cachedLowerCasedObjectNames | array | ||
$classesBeingInstantiated | array | ||
$context | The configuration context for this Flow run | ||
$dependencyProxies | array |
||
$internalShutdownObjects | SplObjectStorage | These shutdown method will be called after all other shutdown methods have been called. | |
$objectSerializer | |||
$objects | array | ||
$shutdownObjects | SplObjectStorage | A SplObjectStorage containing those objects which need to be shutdown when the container shuts down. Each value of each entry is the respective shutdown method name. |
Method | Description | |
---|---|---|
__construct ( |
Constructor for this Object Container | |
createLazyDependency ( string $hash, &$propertyReferenceVariable, string $className, Closure $builder ) : |
Creates a new DependencyProxy class for a dependency built through code identified through "hash" for a dependency of class $className. The closure in $builder contains code for actually creating the dependency instance once it needs to be materialized. | |
forgetInstance ( string $objectName ) : void | Unsets the instance of the given object | |
get ( string $objectName ) : object | Returns a fresh or existing instance of the object specified by $objectName. | |
getAllObjectConfigurations ( ) : array | Returns all current object configurations. | |
getCaseSensitiveObjectName ( string $caseInsensitiveObjectName ) : mixed | Returns the case sensitive object name of an object specified by a case insensitive object name. If no object of that name exists, FALSE is returned. | |
getClassNameByObjectName ( string $objectName ) : string | Returns the implementation class name for the specified object | |
getContext ( ) : |
Returns the context Flow is running in. | |
getInstance ( string $objectName ) : object | Returns the instance of the specified object or NULL if no instance has been registered yet. | |
getLazyDependencyByHash ( string $hash, &$propertyReferenceVariable ) : mixed | This method is used internally to retrieve either an actual (singleton) instance of the specified dependency or, if no instance exists yet, a Dependency Proxy object which automatically triggers the creation of an instance as soon as it is used the first time. | |
getObjectNameByClassName ( string $className ) : string | Returns the object name corresponding to a given class name. | |
getPackageKeyByObjectName ( string $objectName ) : string | Returns the key of the package the specified object is contained in. | |
getScope ( string $objectName ) : integer | Returns the scope of the specified object. | |
getSessionInstances ( ) : array | Returns all instances of objects with scope session | |
getSettingsByPath ( array $settingsPath ) : mixed | Returns the an array of package settings or a single setting value by the given path. | |
hasInstance ( string $objectName ) : boolean | Returns TRUE if this object manager already has an instance for the specified object. | |
injectAllSettings ( array $settings ) : void | Injects the global settings array, indexed by package key. | |
isRegistered ( string $objectName ) : boolean | Returns TRUE if an object with the given name is registered | |
registerShutdownObject ( object $object, string $shutdownLifecycleMethodName ) : void | Registers the passed shutdown lifecycle method for the given object | |
setInstance ( string $objectName, object $instance ) : void | Sets the instance of the given object | |
setObjects ( array $objects ) : void | Sets the objects array | |
shutdown ( ) : void | Shuts down this Object Container by calling the shutdown methods of all object instances which were configured to be shut down. |
Method | Description | |
---|---|---|
buildObjectByFactory ( string $objectName ) : object | Invokes the Factory defined in the object configuration of the specified object in order to build an instance. Arguments which were defined in the object configuration are passed to the factory method. | |
callShutdownMethods ( SplObjectStorage $shutdownObjects ) : void | Executes the methods of the provided objects. | |
instantiateClass ( string $className, array $arguments ) : object | Speed optimized alternative to ReflectionClass::newInstanceArgs() |
public __construct ( |
||
$context | The configuration context for this Flow run |
protected buildObjectByFactory ( string $objectName ) : object | ||
$objectName | string | Name of the object to build |
return | object | The built object |
protected callShutdownMethods ( SplObjectStorage $shutdownObjects ) : void | ||
$shutdownObjects | SplObjectStorage | |
return | void |
public createLazyDependency ( string $hash, &$propertyReferenceVariable, string $className, Closure $builder ) : |
||
$hash | string | An md5 hash over the code needed to actually build the dependency instance |
$className | string | Name of the class of the dependency which eventually will be instantiated |
$builder | Closure | An anonymous function which creates the instance to be injected |
return |
public forgetInstance ( string $objectName ) : void | ||
$objectName | string | The object name |
return | void |
public getAllObjectConfigurations ( ) : array | ||
return | array |
public getCaseSensitiveObjectName ( string $caseInsensitiveObjectName ) : mixed | ||
$caseInsensitiveObjectName | string | The object name in lower-, upper- or mixed case |
return | mixed | Either the mixed case object name or FALSE if no object of that name was found. |
public getClassNameByObjectName ( string $objectName ) : string | ||
$objectName | string | The object name |
return | string | The class name corresponding to the given object name or FALSE if no such object is registered |
public getContext ( ) : |
||
return | The context, for example "Development" or "Production" |
public getInstance ( string $objectName ) : object | ||
$objectName | string | The object name |
return | object | The object or NULL |
public getLazyDependencyByHash ( string $hash, &$propertyReferenceVariable ) : mixed | ||
$hash | string | |
return | mixed |
public getObjectNameByClassName ( string $className ) : string | ||
$className | string | The class name |
return | string | The object name corresponding to the given class name or FALSE if no object is configured to use that class |
public getPackageKeyByObjectName ( string $objectName ) : string | ||
$objectName | string | The object name |
return | string | The package key or FALSE if no such object exists |
public getSessionInstances ( ) : array | ||
return | array |
public getSettingsByPath ( array $settingsPath ) : mixed | ||
$settingsPath | array | Path to the setting(s) as an array, for example array('Neos', 'Flow', 'persistence', 'backendOptions') |
return | mixed | Either an array of settings or the value of a single setting |
public hasInstance ( string $objectName ) : boolean | ||
$objectName | string | The object name |
return | boolean | TRUE if an instance already exists |
public injectAllSettings ( array $settings ) : void | ||
$settings | array | The global settings |
return | void |
public isRegistered ( string $objectName ) : boolean | ||
$objectName | string | Name of the object |
return | boolean | TRUE if the object has been registered, otherwise FALSE |
public setObjects ( array $objects ) : void | ||
$objects | array | An array of object names and some information about each registered object (scope, lower cased name etc.) |
return | void |
protected array $allSettings | ||
return | array |
protected array $cachedLowerCasedObjectNames | ||
return | array |
protected ApplicationContext,Neos\Flow\Core $context | ||
return |
protected SplObjectStorage $internalShutdownObjects | ||
return | SplObjectStorage |
protected ObjectSerializer,Neos\Flow\ObjectManagement $objectSerializer | ||
return |