PHP 인터페이스 Neos\Flow\ObjectManagement\ObjectManagerInterface

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

공개 메소드들

메소드 설명
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.
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 ( ) : ApplicationContext Returns the currently set context.
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
isRegistered ( string $objectName ) : boolean Returns TRUE if an object with the given name has already been 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
shutdown ( ) : void Shuts the object manager down and calls the shutdown methods of all objects which are configured for it.

메소드 상세

forgetInstance() 공개 메소드

If run during standard runtime, the whole application might become unstable because certain parts might already use an instance of this object. Therefore this method should only be used in a setUp() method of a functional test case.
public forgetInstance ( string $objectName ) : void
$objectName string The object name
리턴 void

get() 공개 메소드

Important: If possible, instances of Prototype objects should always be created with the new keyword and Singleton objects should rather be injected by some type of Dependency Injection.
public get ( string $objectName ) : object
$objectName string The name of the object to return an instance of
리턴 object The object instance

getCaseSensitiveObjectName() 공개 메소드

In general, the case sensitive variant is used everywhere in Flow, however there might be special situations in which the case sensitive name is not available. This method helps you in these rare cases.
public getCaseSensitiveObjectName ( string $caseInsensitiveObjectName ) : mixed
$caseInsensitiveObjectName string The object name in lower-, upper- or mixed case
리턴 mixed Either the mixed case object name or FALSE if no object of that name was found.

getClassNameByObjectName() 공개 메소드

Returns the implementation class name for the specified object
public getClassNameByObjectName ( string $objectName ) : string
$objectName string The object name
리턴 string The class name corresponding to the given object name or FALSE if no such object is registered

getContext() 공개 메소드

Returns the currently set context.
public getContext ( ) : ApplicationContext
리턴 Neos\Flow\Core\ApplicationContext the current context

getObjectNameByClassName() 공개 메소드

Returns the object name corresponding to a given class name.
public getObjectNameByClassName ( string $className ) : string
$className string The class name
리턴 string The object name corresponding to the given class name

getPackageKeyByObjectName() 공개 메소드

Returns the key of the package the specified object is contained in.
public getPackageKeyByObjectName ( string $objectName ) : string
$objectName string The object name
리턴 string The package key or FALSE if no such object exists

getScope() 공개 메소드

Returns the scope of the specified object.
public getScope ( string $objectName ) : integer
$objectName string The object name
리턴 integer One of the Configuration::SCOPE_ constants

getSessionInstances() 공개 메소드

Returns all instances of objects with scope session
public getSessionInstances ( ) : array
리턴 array

isRegistered() 공개 메소드

Returns TRUE if an object with the given name has already been registered.
부터: 1.0.0 alpha 8
public isRegistered ( string $objectName ) : boolean
$objectName string Name of the object
리턴 boolean TRUE if the object has been registered, otherwise FALSE

registerShutdownObject() 공개 메소드

Registers the passed shutdown lifecycle method for the given object
public registerShutdownObject ( object $object, string $shutdownLifecycleMethodName ) : void
$object object The object to register the shutdown method for
$shutdownLifecycleMethodName string The method name of the shutdown method to be called
리턴 void

setInstance() 공개 메소드

Sets the instance of the given object
public setInstance ( string $objectName, object $instance ) : void
$objectName string The object name
$instance object A prebuilt instance
리턴 void

shutdown() 공개 메소드

Shuts the object manager down and calls the shutdown methods of all objects which are configured for it.
public shutdown ( ) : void
리턴 void