ObjectManagerInterface extends SingletonInterface

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.

Table of Contents

Methods

get()  : T
Returns a fresh or existing instance of the class specified by $className.
getEmptyObject()  : T
Creates an instance of $className without calling its constructor.

Methods

get()

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

public get(T> $className, array<string|int, mixed> ...$constructorArguments) : T
Deprecated

since TYPO3 10.4, will be removed in version 12.0

Parameters
$className : T>

the name of the class to return an instance of

$constructorArguments : array<string|int, mixed>
Tags
template

T of object

Return values
T

the class instance

getEmptyObject()

Creates an instance of $className without calling its constructor.

public getEmptyObject(T> $className) : T
Parameters
$className : T>

the name of the class to return an instance of

Tags
template

T of object

Return values
T

the class instance


        
On this page

Search results