1
0
mirror of synced 2024-12-16 16:16:04 +03:00
doctrine2/lib/api/doctrine/orm/entitymanager.html
2010-04-14 17:13:14 +02:00

608 lines
26 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:04 +0000">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
<link rel="start" href="../../overview-summary.html">
<title>EntityManager (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="../../doctrine/orm/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../doctrine/orm/package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../index.html" target="_top">Frames</a>
<a href="../../doctrine/orm/entitymanager.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\ORM\EntityManager</div>
<div class="location">/Doctrine/ORM/EntityManager.php at line 42</div>
<h1>Class EntityManager</h1>
<pre class="tree"><strong>EntityManager</strong><br /></pre>
<hr>
<p class="signature">public class <strong>EntityManager</strong></p>
<div class="comment" id="overview_description"><p>The EntityManager is the central access point to ORM functionality.</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision$</dd>
<dt>Author:</dt>
<dd>Benjamin Eberlei <kontakt@beberlei.de></dd>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
</dl>
<hr>
<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#EntityManager()">EntityManager</a>(Doctrine\DBAL\Connection conn, Doctrine\ORM\Configuration config, Doctrine\Common\EventManager eventManager)</p><p class="description">Creates a new EntityManager that operates on the given database connection
and uses the given Configuration and EventManager implementations.</p></td>
</tr>
</table>
<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#beginTransaction()">beginTransaction</a>()</p><p class="description">Starts a transaction on the underlying database connection.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#clear()">clear</a>(string entityName)</p><p class="description">Clears the EntityManager. </p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#close()">close</a>()</p><p class="description">Closes the EntityManager. </p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#commit()">commit</a>()</p><p class="description">Commits a transaction on the underlying database connection.</p></td>
</tr>
<tr>
<td class="type"> boolean</td>
<td class="description"><p class="name"><a href="#contains()">contains</a>(object entity)</p><p class="description">Determines whether an entity instance is managed in this EntityManager.</p></td>
</tr>
<tr>
<td class="type"> object</td>
<td class="description"><p class="name"><a href="#copy()">copy</a>(object entity, mixed deep)</p><p class="description">Creates a copy of the given entity. </p></td>
</tr>
<tr>
<td class="type">static <a href="../../doctrine/orm/entitymanager.html">EntityManager</a></td>
<td class="description"><p class="name"><a href="#create()">create</a>(mixed conn, <a href="../../doctrine/dbal/configuration.html">Configuration</a> config, <a href="../../doctrine/common/eventmanager.html">EventManager</a> eventManager)</p><p class="description">Factory method to create EntityManager instances.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\NativeQuery</td>
<td class="description"><p class="name"><a href="#createNamedNativeQuery()">createNamedNativeQuery</a>(string name)</p><p class="description">Creates a NativeQuery from a named native query.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Query</td>
<td class="description"><p class="name"><a href="#createNamedQuery()">createNamedQuery</a>(string name)</p><p class="description">Creates a Query from a named query.</p></td>
</tr>
<tr>
<td class="type"> <a href="../../doctrine/orm/nativequery.html">NativeQuery</a></td>
<td class="description"><p class="name"><a href="#createNativeQuery()">createNativeQuery</a>(string sql, <a href="../../doctrine/orm/query/resultsetmapping.html">ResultSetMapping</a> rsm)</p><p class="description">Creates a native SQL query.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Query</td>
<td class="description"><p class="name"><a href="#createQuery()">createQuery</a>(mixed dql, string The)</p><p class="description">Creates a new Query object.</p></td>
</tr>
<tr>
<td class="type"> <a href="../../doctrine/orm/querybuilder.html">QueryBuilder</a></td>
<td class="description"><p class="name"><a href="#createQueryBuilder()">createQueryBuilder</a>()</p><p class="description">Create a QueryBuilder instance</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#detach()">detach</a>(object entity)</p><p class="description">Detaches an entity from the EntityManager, causing a managed entity to
become detached. </p></td>
</tr>
<tr>
<td class="type"> object</td>
<td class="description"><p class="name"><a href="#find()">find</a>(string entityName, mixed identifier)</p><p class="description">Finds an Entity by its identifier.
</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#flush()">flush</a>()</p><p class="description">Flushes all changes to objects that have been queued up to now to the database.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Mapping\ClassMetadata</td>
<td class="description"><p class="name"><a href="#getClassMetadata()">getClassMetadata</a>(mixed className)</p><p class="description">Returns the metadata for a class.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Configuration</td>
<td class="description"><p class="name"><a href="#getConfiguration()">getConfiguration</a>()</p><p class="description">Gets the Configuration used by the EntityManager.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\DBAL\Connection</td>
<td class="description"><p class="name"><a href="#getConnection()">getConnection</a>()</p><p class="description">Gets the database connection object used by the EntityManager.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\Common\EventManager</td>
<td class="description"><p class="name"><a href="#getEventManager()">getEventManager</a>()</p><p class="description">Gets the EventManager used by the EntityManager.</p></td>
</tr>
<tr>
<td class="type"> ExpressionBuilder</td>
<td class="description"><p class="name"><a href="#getExpressionBuilder()">getExpressionBuilder</a>()</p><p class="description">Gets an ExpressionBuilder used for object-oriented construction of query expressions.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Internal\Hydration\AbstractHydrator</td>
<td class="description"><p class="name"><a href="#getHydrator()">getHydrator</a>(int hydrationMode)</p><p class="description">Gets a hydrator for the given hydration mode.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Mapping\ClassMetadataFactory</td>
<td class="description"><p class="name"><a href="#getMetadataFactory()">getMetadataFactory</a>()</p><p class="description">Gets the metadata factory used to gather the metadata of classes.</p></td>
</tr>
<tr>
<td class="type"> <a href="../../doctrine/orm/proxy/proxyfactory.html">ProxyFactory</a></td>
<td class="description"><p class="name"><a href="#getProxyFactory()">getProxyFactory</a>()</p><p class="description">Gets the proxy factory used by the EntityManager to create entity proxies.</p></td>
</tr>
<tr>
<td class="type"> object</td>
<td class="description"><p class="name"><a href="#getReference()">getReference</a>(mixed entityName, mixed identifier)</p><p class="description">Gets a reference to the entity identified by the given type and identifier
without actually loading it.
</p></td>
</tr>
<tr>
<td class="type"> <a href="../../doctrine/orm/entityrepository.html">EntityRepository</a></td>
<td class="description"><p class="name"><a href="#getRepository()">getRepository</a>(string entityName)</p><p class="description">Gets the repository for an entity class.</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\UnitOfWork</td>
<td class="description"><p class="name"><a href="#getUnitOfWork()">getUnitOfWork</a>()</p><p class="description">Gets the UnitOfWork used by the EntityManager to coordinate operations.</p></td>
</tr>
<tr>
<td class="type"> object</td>
<td class="description"><p class="name"><a href="#merge()">merge</a>(object entity)</p><p class="description">Merges the state of a detached entity into the persistence context
of this EntityManager and returns the managed copy of the entity.
</p></td>
</tr>
<tr>
<td class="type"> Doctrine\ORM\Internal\Hydration\AbstractHydrator</td>
<td class="description"><p class="name"><a href="#newHydrator()">newHydrator</a>(int hydrationMode)</p><p class="description">Create a new instance for the given hydration mode.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#persist()">persist</a>(mixed entity, object object)</p><p class="description">Tells the EntityManager to make an instance managed and persistent.
</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#refresh()">refresh</a>(object entity)</p><p class="description">Refreshes the persistent state of an entity from the database,
overriding any local changes that have not yet been persisted.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#remove()">remove</a>(object entity)</p><p class="description">Removes an entity instance.
</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#rollback()">rollback</a>()</p><p class="description">Performs a rollback on the underlying database connection and closes the
EntityManager as it may now be in a corrupted state.</p></td>
</tr>
</table>
<h2 id="detail_constr">Constructor Detail</h2>
<div class="location">/Doctrine/ORM/EntityManager.php at line 118</div>
<h3 id="EntityManager()">EntityManager</h3>
<code class="signature">public <strong>EntityManager</strong>(Doctrine\DBAL\Connection conn, Doctrine\ORM\Configuration config, Doctrine\Common\EventManager eventManager)</code>
<div class="details">
<p>Creates a new EntityManager that operates on the given database connection
and uses the given Configuration and EventManager implementations.</p></div>
<hr>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/ORM/EntityManager.php at line 176</div>
<h3 id="beginTransaction()">beginTransaction</h3>
<code class="signature">public void <strong>beginTransaction</strong>()</code>
<div class="details">
<p>Starts a transaction on the underlying database connection.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 331</div>
<h3 id="clear()">clear</h3>
<code class="signature">public void <strong>clear</strong>(string entityName)</code>
<div class="details">
<p>Clears the EntityManager. All entities that are currently managed
by this EntityManager become detached.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 346</div>
<h3 id="close()">close</h3>
<code class="signature">public void <strong>close</strong>()</code>
<div class="details">
<p>Closes the EntityManager. All entities that are currently managed
by this EntityManager become detached. The EntityManager may no longer
be used after it is closed.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 184</div>
<h3 id="commit()">commit</h3>
<code class="signature">public void <strong>commit</strong>()</code>
<div class="details">
<p>Commits a transaction on the underlying database connection.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 482</div>
<h3 id="contains()">contains</h3>
<code class="signature">public boolean <strong>contains</strong>(object entity)</code>
<div class="details">
<p>Determines whether an entity instance is managed in this EntityManager.</p><dl>
<dt>Returns:</dt>
<dd>TRUE if this EntityManager currently manages the given entity, FALSE otherwise.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 445</div>
<h3 id="copy()">copy</h3>
<code class="signature">public object <strong>copy</strong>(object entity, mixed deep)</code>
<div class="details">
<p>Creates a copy of the given entity. Can create a shallow or a deep copy.</p><dl>
<dt>Parameters:</dt>
<dd>entity - The entity to copy.</dd>
<dt>Returns:</dt>
<dd>The new entity.</dd>
<dt>Todo:</dt>
<dd>Implementation or remove.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 596</div>
<h3 id="create()">create</h3>
<code class="signature">public static <a href="../../doctrine/orm/entitymanager.html">EntityManager</a> <strong>create</strong>(mixed conn, <a href="../../doctrine/dbal/configuration.html">Configuration</a> config, <a href="../../doctrine/common/eventmanager.html">EventManager</a> eventManager)</code>
<div class="details">
<p>Factory method to create EntityManager instances.</p><dl>
<dt>Parameters:</dt>
<dd>conn - An array with the connection parameters or an existing Connection instance.</dd>
<dd>config - The Configuration instance to use.</dd>
<dd>eventManager - The EventManager instance to use.</dd>
<dt>Returns:</dt>
<dd>The created EntityManager.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 257</div>
<h3 id="createNamedNativeQuery()">createNamedNativeQuery</h3>
<code class="signature">public Doctrine\ORM\NativeQuery <strong>createNamedNativeQuery</strong>(string name)</code>
<div class="details">
<p>Creates a NativeQuery from a named native query.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 231</div>
<h3 id="createNamedQuery()">createNamedQuery</h3>
<code class="signature">public Doctrine\ORM\Query <strong>createNamedQuery</strong>(string name)</code>
<div class="details">
<p>Creates a Query from a named query.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 243</div>
<h3 id="createNativeQuery()">createNativeQuery</h3>
<code class="signature">public <a href="../../doctrine/orm/nativequery.html">NativeQuery</a> <strong>createNativeQuery</strong>(string sql, <a href="../../doctrine/orm/query/resultsetmapping.html">ResultSetMapping</a> rsm)</code>
<div class="details">
<p>Creates a native SQL query.</p><dl>
<dt>Parameters:</dt>
<dd></dd>
<dd>rsm - The ResultSetMapping to use.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 216</div>
<h3 id="createQuery()">createQuery</h3>
<code class="signature">public Doctrine\ORM\Query <strong>createQuery</strong>(mixed dql, string The)</code>
<div class="details">
<p>Creates a new Query object.</p><dl>
<dt>Parameters:</dt>
<dd>The - DQL string.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 268</div>
<h3 id="createQueryBuilder()">createQueryBuilder</h3>
<code class="signature">public <a href="../../doctrine/orm/querybuilder.html">QueryBuilder</a> <strong>createQueryBuilder</strong>()</code>
<div class="details">
<p>Create a QueryBuilder instance</p><dl>
<dt>Returns:</dt>
<dd>$qb</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 413</div>
<h3 id="detach()">detach</h3>
<code class="signature">public void <strong>detach</strong>(object entity)</code>
<div class="details">
<p>Detaches an entity from the EntityManager, causing a managed entity to
become detached. Unflushed changes made to the entity if any
(including removal of the entity), will not be synchronized to the database.
Entities which previously referenced the detached entity will continue to
reference it.</p><dl>
<dt>Parameters:</dt>
<dd>entity - The entity to detach.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 293</div>
<h3 id="find()">find</h3>
<code class="signature">public object <strong>find</strong>(string entityName, mixed identifier)</code>
<div class="details">
<p>Finds an Entity by its identifier.</p><p>This is just a convenient shortcut for getRepository($entityName)->find($id).</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 278</div>
<h3 id="flush()">flush</h3>
<code class="signature">public void <strong>flush</strong>()</code>
<div class="details">
<p>Flushes all changes to objects that have been queued up to now to the database.
This effectively synchronizes the in-memory state of managed objects with the
database.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 205</div>
<h3 id="getClassMetadata()">getClassMetadata</h3>
<code class="signature">public Doctrine\ORM\Mapping\ClassMetadata <strong>getClassMetadata</strong>(mixed className)</code>
<div class="details">
<p>Returns the metadata for a class.</p><dl>
<dt>Internal:</dt>
<dd>Performance-sensitive method.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 504</div>
<h3 id="getConfiguration()">getConfiguration</h3>
<code class="signature">public Doctrine\ORM\Configuration <strong>getConfiguration</strong>()</code>
<div class="details">
<p>Gets the Configuration used by the EntityManager.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 137</div>
<h3 id="getConnection()">getConnection</h3>
<code class="signature">public Doctrine\DBAL\Connection <strong>getConnection</strong>()</code>
<div class="details">
<p>Gets the database connection object used by the EntityManager.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 494</div>
<h3 id="getEventManager()">getEventManager</h3>
<code class="signature">public Doctrine\Common\EventManager <strong>getEventManager</strong>()</code>
<div class="details">
<p>Gets the EventManager used by the EntityManager.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 165</div>
<h3 id="getExpressionBuilder()">getExpressionBuilder</h3>
<code class="signature">public ExpressionBuilder <strong>getExpressionBuilder</strong>()</code>
<div class="details">
<p>Gets an ExpressionBuilder used for object-oriented construction of query expressions.</p><p>Example:</p><p>[php]
$qb = $em->createQueryBuilder();
$expr = $em->getExpressionBuilder();
$qb->select('u')->from('User', 'u')
->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2)));</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 540</div>
<h3 id="getHydrator()">getHydrator</h3>
<code class="signature">public Doctrine\ORM\Internal\Hydration\AbstractHydrator <strong>getHydrator</strong>(int hydrationMode)</code>
<div class="details">
<p>Gets a hydrator for the given hydration mode.</p><p>This method caches the hydrator instances which is used for all queries that don't
selectively iterate over the result.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 147</div>
<h3 id="getMetadataFactory()">getMetadataFactory</h3>
<code class="signature">public Doctrine\ORM\Mapping\ClassMetadataFactory <strong>getMetadataFactory</strong>()</code>
<div class="details">
<p>Gets the metadata factory used to gather the metadata of classes.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 582</div>
<h3 id="getProxyFactory()">getProxyFactory</h3>
<code class="signature">public <a href="../../doctrine/orm/proxy/proxyfactory.html">ProxyFactory</a> <strong>getProxyFactory</strong>()</code>
<div class="details">
<p>Gets the proxy factory used by the EntityManager to create entity proxies.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 308</div>
<h3 id="getReference()">getReference</h3>
<code class="signature">public object <strong>getReference</strong>(mixed entityName, mixed identifier)</code>
<div class="details">
<p>Gets a reference to the entity identified by the given type and identifier
without actually loading it.</p><p>If partial objects are allowed, this method will return a partial object that only
has its identifier populated. Otherwise a proxy is returned that automatically
loads itself on first access.</p><dl>
<dt>Returns:</dt>
<dd>The entity reference.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 456</div>
<h3 id="getRepository()">getRepository</h3>
<code class="signature">public <a href="../../doctrine/orm/entityrepository.html">EntityRepository</a> <strong>getRepository</strong>(string entityName)</code>
<div class="details">
<p>Gets the repository for an entity class.</p><dl>
<dt>Parameters:</dt>
<dd>entityName - The name of the Entity.</dd>
<dt>Returns:</dt>
<dd>The repository.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 526</div>
<h3 id="getUnitOfWork()">getUnitOfWork</h3>
<code class="signature">public Doctrine\ORM\UnitOfWork <strong>getUnitOfWork</strong>()</code>
<div class="details">
<p>Gets the UnitOfWork used by the EntityManager to coordinate operations.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 429</div>
<h3 id="merge()">merge</h3>
<code class="signature">public object <strong>merge</strong>(object entity)</code>
<div class="details">
<p>Merges the state of a detached entity into the persistence context
of this EntityManager and returns the managed copy of the entity.
The entity passed to merge will not become associated/managed with this EntityManager.</p><dl>
<dt>Parameters:</dt>
<dd>entity - The detached entity to merge into the persistence context.</dd>
<dt>Returns:</dt>
<dd>The managed copy of the entity.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 555</div>
<h3 id="newHydrator()">newHydrator</h3>
<code class="signature">public Doctrine\ORM\Internal\Hydration\AbstractHydrator <strong>newHydrator</strong>(int hydrationMode)</code>
<div class="details">
<p>Create a new instance for the given hydration mode.</p></div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 363</div>
<h3 id="persist()">persist</h3>
<code class="signature">public void <strong>persist</strong>(mixed entity, object object)</code>
<div class="details">
<p>Tells the EntityManager to make an instance managed and persistent.</p><p>The entity will be entered into the database at or before transaction
commit or as a result of the flush operation.</p><p>NOTE: The persist operation always considers entities that are not yet known to
this EntityManager as NEW. Do not pass detached entities to the persist operation.</p><dl>
<dt>Parameters:</dt>
<dd>object - The instance to make managed and persistent.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 395</div>
<h3 id="refresh()">refresh</h3>
<code class="signature">public void <strong>refresh</strong>(object entity)</code>
<div class="details">
<p>Refreshes the persistent state of an entity from the database,
overriding any local changes that have not yet been persisted.</p><dl>
<dt>Parameters:</dt>
<dd>entity - The entity to refresh.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 380</div>
<h3 id="remove()">remove</h3>
<code class="signature">public void <strong>remove</strong>(object entity)</code>
<div class="details">
<p>Removes an entity instance.</p><p>A removed entity will be removed from the database at or before transaction commit
or as a result of the flush operation.</p><dl>
<dt>Parameters:</dt>
<dd>entity - The entity instance to remove.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/EntityManager.php at line 193</div>
<h3 id="rollback()">rollback</h3>
<code class="signature">public void <strong>rollback</strong>()</code>
<div class="details">
<p>Performs a rollback on the underlying database connection and closes the
EntityManager as it may now be in a corrupted state.</p></div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="../../doctrine/orm/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../doctrine/orm/package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../index.html" target="_top">Frames</a>
<a href="../../doctrine/orm/entitymanager.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>