TYPO3
7.6
|
Public Member Functions | |
isRegistered ($objectName) | |
get ($objectName) | |
create ($objectName) | |
getEmptyObject ($className) | |
Interface for the TYPO3 Object Manager
Definition at line 20 of file ObjectManagerInterfaceException.php.
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
string | $objectName | The name of the object to create |
\TYPO3\CMS\Extbase\Object\Exception\WrongScopeException | if the created object is not of scope prototype |
Implemented in ObjectManagerException.
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.
string | $objectName | The name of the object to return an instance of |
Implemented in ObjectManagerException.
getEmptyObject | ( | $className | ) |
Create an instance of $className without calling its constructor
string | $className |
Implemented in ObjectManagerException.
isRegistered | ( | $objectName | ) |
Returns TRUE if an object with the given name is registered
string | $objectName | Name of the object |
Implemented in ObjectManagerException.