TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException:
TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Extbase\Object\ObjectManagerException

Public Member Functions

 isRegistered ($objectName)
 
 get ($objectName)
 
 create ($objectName)
 
 getEmptyObject ($className)
 

Detailed Description

Interface for the TYPO3 Object Manager

Definition at line 20 of file ObjectManagerInterfaceException.php.

Member Function Documentation

◆ create()

TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException::create (   $objectName)

Creates a fresh instance of the object specified by $objectName.

This factory method can only create objects of the scope prototype. Singleton objects must be either injected by some type of Dependency Injection or if that is not possible, be retrieved by the get() method of the Object Manager

Parameters
string$objectNameThe name of the object to create
Returns
object The new object instance
Exceptions

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

◆ get()

TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException::get (   $objectName)

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

Important:

If possible, instances of Prototype objects should always be created with the Object Manager's create() method and Singleton objects should rather be injected by some type of Dependency Injection.

Parameters
string$objectNameThe name of the object to return an instance of
Returns
object The object instance

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

◆ getEmptyObject()

TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException::getEmptyObject (   $className)

Create an instance of $className without calling its constructor

Parameters
string$className
Returns
object

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

◆ isRegistered()

TYPO3\CMS\Extbase\Object\ObjectManagerInterfaceException::isRegistered (   $objectName)

Returns TRUE if an object with the given name is registered

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

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