Development Doctrine_EntityManager
Doctrine EntityManager
The EntityManager is the central access point to ORM functionality.
Method Summary
- EventManager getEventManager
- Doctrine::ORM::Entity find
- Doctrine::ORM::EntityRepository getRepository
- setConfiguration
- clear
- createNamedNativeQuery
- createNativeQuery
- Doctrine::ORM::Query createQuery
- Doctrine::ORM::Internal::EntityPersister getEntityPersister
- delete
- Doctrine_Metadata getClassMetadata
- unknown detach
- createNamedQuery
- Doctrine_Metadata getMetadata
- Doctrine::ORM::UnitOfWork getUnitOfWork
- boolean contains
- Doctrine::DBAL::Transaction getTransaction
- save
- close
- setClassMetadataDriver
- string getFlushMode
- Configuration getConfiguration
- __construct
- setEventManager
- setFlushMode
- _getTmpEntityData
- getConnection
- getQueryCacheDriver
- flush
- createEntity
- getResultCacheDriver
- createCriteria
Method Details
-
(EventManager) getEventManager()
Gets the EventManager used by the EntityManager.
-
(Doctrine::ORM::Entity) find($entityName, $identifier)
Finds an Entity by its identifier.
This is just a convenient shortcut for getRepository()->find().
-
$entityName The name of the Entity. (Doctrine::ORM::EntityRepository) getRepository($entityName)
Gets the repository for an Entity.
Doctrine_EntityManager
-
setConfiguration(( ) $config)
Sets the Configuration used by the EntityManager.
-
clear($entityName = null)
Clears the persistence context, detaching all entities.
-
createNamedNativeQuery($name)
-
createNativeQuery($sql = "")
-
$dql The DQL string. (Doctrine::ORM::Query) createQuery($dql = "")
Creates a new Doctrine_Query object that operates on this connection.
-
$entityName The name of the Entity. (Doctrine::ORM::Internal::EntityPersister) getEntityPersister($entityName)
Gets the EntityPersister for an Entity.
This is usually not of interest for users, mainly for internal use.
-
delete(( ) $entity)
Removes the given entity from the persistent store.
-
(Doctrine_Metadata) getClassMetadata($className)
Returns the metadata for a class.
-
(unknown) detach(( ) $entity)
Detaches an entity from the manager. It's lifecycle is no longer managed.
-
createNamedQuery($name)
Creates a query with the specified name.
throws SomeException If there is no query registered with the given name.
-
(Doctrine_Metadata) getMetadata($className)
Gets the metadata for a class. Alias for getClassMetadata().
-
(Doctrine::ORM::UnitOfWork) getUnitOfWork()
Gets the UnitOfWork used by the EntityManager to coordinate operations.
-
(boolean) contains(( ) $entity)
Checks if the instance is managed by the EntityManager.
-
(Doctrine::DBAL::Transaction) getTransaction()
Gets the transaction object used by the EntityManager to manage database transactions.
-
save(( ) $entity)
Saves the given entity, persisting it's state.
-
close()
Releases the EntityManager.
-
$driver The driver to use. setClassMetadataDriver(($driver) $driver)
Sets the driver that is used to obtain metadata mapping information about Entities.
-
(string) getFlushMode()
Gets the currently used flush mode.
-
(Configuration) getConfiguration()
Gets the Configuration used by the EntityManager.
-
__construct(( ) $conn, $name = null)
Creates a new EntityManager that operates on the given database connection.
-
setEventManager(( ) $eventManager)
Sets the EventManager used by the EntityManager.
-
setFlushMode($flushMode)
Sets the flush mode.
-
_getTmpEntityData()
INTERNAL: For internal hydration purposes only.
-
getConnection()
Gets the database connection object used by the EntityManager.
-
getQueryCacheDriver()
-
flush()
Flushes all changes to objects that have been queued up to now to the database.
-
$className The name of the entity class. $data The data for the entity. createEntity($className, $data)
Creates an entity. Used for reconstitution as well as initial creation.
-
getResultCacheDriver()
-
createCriteria()




Comments (0) [ add comment ]
No Comments
Add Comment