‪TYPO3CMS  9.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

bool isRegistered ($objectName)
 
object &T get ($objectName,... $constructorArguments)
 
object &T getEmptyObject ($className)
 
int getScope ($objectName)
 

Detailed Description

Interface for the TYPO3 Object Manager

@template T

Definition at line 22 of file ObjectManagerInterface.php.

Member Function Documentation

◆ get()

object& T TYPO3\CMS\Extbase\Object\ObjectManagerInterface::get (   $objectName,
  $constructorArguments 
)

Returns a fresh or existing instance of the object specified by $objectName.

Parameters
string|class-string<T>‪$objectName The name of the object to return an instance of
array‪...$constructorArguments
Returns
‪object&T The object instance

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

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\__wakeup(), TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver\createViewHelperInstanceFromClassName(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getActionMethodParameters(), and TYPO3\CMS\Extbase\Mvc\Controller\AbstractController\injectObjectManager().

◆ getEmptyObject()

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

Create an instance of $className without calling its constructor

Parameters
string|class-string<T>‪$className
Returns
‪object&T

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

◆ getScope()

int TYPO3\CMS\Extbase\Object\ObjectManagerInterface::getScope (   $objectName)

Returns the scope of the specified object.

Parameters
string$objectName‪The object name
Returns
‪int One of the Container::SCOPE_ constants

only to be used within Extbase, not part of TYPO3 Core API.

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

◆ isRegistered()

bool TYPO3\CMS\Extbase\Object\ObjectManagerInterface::isRegistered (   $objectName)

Returns TRUE if an object with the given name is registered

Parameters
string$objectName‪Name of the object
Returns
‪bool TRUE if the object has been registered, otherwise FALSE

only to be used within Extbase, not part of TYPO3 Core API.

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