TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
ObjectManagerException Class Reference
Inheritance diagram for ObjectManagerException:
ObjectManagerInterfaceException SingletonInterface

Public Member Functions

 __construct ()
 
 __sleep ()
 
 __wakeup ()
 
 isRegistered ($objectName)
 
 get ($objectName)
 
 create ($objectName)
 
 getEmptyObject ($className)
 

Protected Attributes

 $objectContainer
 

Detailed Description

Implementation of the default Extbase Object Manager

Definition at line 20 of file ObjectManagerException.php.

Constructor & Destructor Documentation

__construct ( )

Constructs a new Object Manager

Definition at line 30 of file ObjectManagerException.php.

Referenced by ObjectManagerException\__wakeup().

Member Function Documentation

__sleep ( )

Serialization (sleep) helper.

Removes properties of this object from serialization. This action is necessary, since there might be closures used in the accordant content objects (e.g. in FLUIDTEMPLATE) which cannot be serialized. It's fine to reset $this->contentObjects since elements will be recreated and are just a local cache, but not required for runtime logic and behaviour.

See Also
http://forge.typo3.org/issues/36820
Returns
array Names of the properties to be serialized

Definition at line 48 of file ObjectManagerException.php.

__wakeup ( )

Unserialization (wakeup) helper.

Initializes the properties again that have been removed by a call to the __sleep() method on serialization before.

See Also
http://forge.typo3.org/issues/36820
Returns
void

Definition at line 66 of file ObjectManagerException.php.

References ObjectManagerException\__construct().

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
Exceptions
Exception\WrongScopeException
Returns
object The new object instance

Implements ObjectManagerInterfaceException.

Definition at line 115 of file ObjectManagerException.php.

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

Implements ObjectManagerInterfaceException.

Definition at line 95 of file ObjectManagerException.php.

getEmptyObject (   $className)

Create an instance of $className without calling its constructor

Parameters
string$className
Returns
object

Implements ObjectManagerInterfaceException.

Definition at line 138 of file ObjectManagerException.php.

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

Implements ObjectManagerInterfaceException.

Definition at line 77 of file ObjectManagerException.php.

Member Data Documentation

$objectContainer
protected

Definition at line 25 of file ObjectManagerException.php.