TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Object\ObjectManagerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Object\ObjectManagerInterface:
TYPO3\CMS\Core\SingletonInterface Tx_Extbase_Object_ObjectManagerInterface TYPO3\CMS\Extbase\Object\ObjectManager Tx_Extbase_Object_ObjectManager

Public Member Functions

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Interface for the TYPO3 Object Manager

Definition at line 19 of file ObjectManagerInterface.php.

Member Function Documentation

◆ create()

TYPO3\CMS\Extbase\Object\ObjectManagerInterface::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
Deprecated:
since 6.1

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

◆ get()

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

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

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

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

◆ getEmptyObject()

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

Create an instance of $className without calling its constructor

Parameters
string$className
Returns
object

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

◆ getScope()

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

Returns the scope of the specified object.

Parameters
string$objectNameThe object name
Returns
integer One of the Container::SCOPE_ constants

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

◆ isRegistered()

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

Returns TRUE if an object with the given name is registered

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

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