‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Object\ObjectManagerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Object\ObjectManagerInterface:
TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Extbase\Object\ObjectManager

Public Member Functions

get (string $className,... $constructorArguments)
 
getEmptyObject (string $className)
 

Detailed Description

Interface for the TYPO3 Object Manager

Deprecated:
‪since v11, will be removed in v12. Use symfony DI and GeneralUtility::makeInstance() instead. See TYPO3 explained documentation for more information.

Definition at line 28 of file ObjectManagerInterface.php.

Member Function Documentation

◆ get()

T TYPO3\CMS\Extbase\Object\ObjectManagerInterface::get ( string  $className,
  $constructorArguments 
)

Returns a fresh or existing instance of the class specified by $className.

@template T of object

Parameters
class-string<T>‪$className the name of the class to return an instance of
array‪...$constructorArguments
Returns
‪T the class instance
Deprecated:
‪since TYPO3 10.4, will be removed in version 12.0

Implemented in TYPO3\CMS\Extbase\Object\ObjectManager.

◆ getEmptyObject()

T TYPO3\CMS\Extbase\Object\ObjectManagerInterface::getEmptyObject ( string  $className)

Creates an instance of $className without calling its constructor.

@template T of object

Parameters
class-string<T>‪$className the name of the class to return an instance of
Returns
‪T the class instance

Implemented in TYPO3\CMS\Extbase\Object\ObjectManager.