interface ObjectManagerAware in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php \Doctrine\Common\Persistence\ObjectManagerAware
Makes a Persistent Objects aware of its own object-manager.
Using this interface the managing object manager and class metadata instances are injected into the persistent object after construction. This allows you to implement ActiveRecord functionality on top of the persistence-ignorance that Doctrine propagates.
Word of Warning: This is a very powerful hook to change how you can work with your domain models. Using this hook will break the Single Responsibility Principle inside your Domain Objects and increase the coupling of database and objects.
Every ObjectManager has to implement this functionality itself.
@author Benjamin Eberlei <kontakt@beberlei.de>
Hierarchy
- interface \Doctrine\Common\Persistence\ObjectManagerAware
Expanded class hierarchy of ObjectManagerAware
All classes that implement ObjectManagerAware
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ ObjectManagerAware.php, line 40
Namespace
Doctrine\Common\PersistenceView source
interface ObjectManagerAware {
/**
* Injects responsible ObjectManager and the ClassMetadata into this persistent object.
*
* @param ObjectManager $objectManager
* @param ClassMetadata $classMetadata
*
* @return void
*/
public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ObjectManagerAware:: |
public | function | Injects responsible ObjectManager and the ClassMetadata into this persistent object. | 1 |