1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/lib/api/doctrine/orm/tools/schematool.html
2010-04-14 17:13:14 +02:00

221 lines
9.0 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:06 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>SchemaTool (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/tools/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/orm/tools/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/tools/schematool.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\Tools\SchemaTool</div>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 44</div>
<h1>Class SchemaTool</h1>
<pre class="tree"><strong>SchemaTool</strong><br /></pre>
<hr>
<p class="signature">public class <strong>SchemaTool</strong></p>
<div class="comment" id="overview_description"><p>The SchemaTool is a tool to create/drop/update database schemas based on
<tt>ClassMetadata</tt> class descriptors.</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>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
<dd>Benjamin Eberlei <kontakt@beberlei.de></dd>
</dl>
<hr>
<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#SchemaTool()">SchemaTool</a>(Doctrine\ORM\EntityManager em)</p><p class="description">Initializes a new SchemaTool instance that uses the connection of the
provided EntityManager.</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="#createSchema()">createSchema</a>(array classes)</p><p class="description">Creates the database schema for the given array of ClassMetadata instances.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#dropSchema()">dropSchema</a>(array classes)</p><p class="description">Drops the database schema for the given classes.
</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getCreateSchemaSql()">getCreateSchemaSql</a>(array classes)</p><p class="description">Gets the list of DDL statements that are required to create the database schema for
the given list of ClassMetadata instances.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getDropSchemaSql()">getDropSchemaSql</a>(array classes)</p><p class="description">Gets the SQL needed to drop the database schema for the given classes.</p></td>
</tr>
<tr>
<td class="type"> <a href="../../../doctrine/dbal/schema/schema.html">Schema</a></td>
<td class="description"><p class="name"><a href="#getSchemaFromMetadata()">getSchemaFromMetadata</a>(array classes)</p><p class="description">From a given set of metadata classes this method creates a Schema instance.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getUpdateSchemaSql()">getUpdateSchemaSql</a>(array classes, mixed saveMode)</p><p class="description">Gets the sequence of SQL statements that need to be performed in order
to bring the given class mappings in-synch with the relational schema.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#updateSchema()">updateSchema</a>(array classes, mixed saveMode)</p><p class="description">Updates the database schema of the given classes by comparing the ClassMetadata
instances to the current database schema that is inspected.</p></td>
</tr>
</table>
<h2 id="detail_constr">Constructor Detail</h2>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 62</div>
<h3 id="SchemaTool()">SchemaTool</h3>
<code class="signature">public <strong>SchemaTool</strong>(Doctrine\ORM\EntityManager em)</code>
<div class="details">
<p>Initializes a new SchemaTool instance that uses the connection of the
provided EntityManager.</p></div>
<hr>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 73</div>
<h3 id="createSchema()">createSchema</h3>
<code class="signature">public void <strong>createSchema</strong>(array classes)</code>
<div class="details">
<p>Creates the database schema for the given array of ClassMetadata instances.</p></div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 469</div>
<h3 id="dropSchema()">dropSchema</h3>
<code class="signature">public void <strong>dropSchema</strong>(array classes)</code>
<div class="details">
<p>Drops the database schema for the given classes.</p><p>In any way when an exception is thrown it is supressed since drop was
issued for all classes of the schema and some probably just don't exist.</p></div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 90</div>
<h3 id="getCreateSchemaSql()">getCreateSchemaSql</h3>
<code class="signature">public array <strong>getCreateSchemaSql</strong>(array classes)</code>
<div class="details">
<p>Gets the list of DDL statements that are required to create the database schema for
the given list of ClassMetadata instances.</p><dl>
<dt>Returns:</dt>
<dd>$sql The SQL statements needed to create the schema for the classes.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 485</div>
<h3 id="getDropSchemaSql()">getDropSchemaSql</h3>
<code class="signature">public array <strong>getDropSchemaSql</strong>(array classes)</code>
<div class="details">
<p>Gets the SQL needed to drop the database schema for the given classes.</p></div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 102</div>
<h3 id="getSchemaFromMetadata()">getSchemaFromMetadata</h3>
<code class="signature">public <a href="../../../doctrine/dbal/schema/schema.html">Schema</a> <strong>getSchemaFromMetadata</strong>(array classes)</code>
<div class="details">
<p>From a given set of metadata classes this method creates a Schema instance.</p></div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 573</div>
<h3 id="getUpdateSchemaSql()">getUpdateSchemaSql</h3>
<code class="signature">public array <strong>getUpdateSchemaSql</strong>(array classes, mixed saveMode)</code>
<div class="details">
<p>Gets the sequence of SQL statements that need to be performed in order
to bring the given class mappings in-synch with the relational schema.</p><dl>
<dt>Parameters:</dt>
<dd>classes - The classes to consider.</dd>
<dt>Returns:</dt>
<dd>The sequence of SQL statements.</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/Tools/SchemaTool.php at line 556</div>
<h3 id="updateSchema()">updateSchema</h3>
<code class="signature">public void <strong>updateSchema</strong>(array classes, mixed saveMode)</code>
<div class="details">
<p>Updates the database schema of the given classes by comparing the ClassMetadata
instances to the current database schema that is inspected.</p></div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/orm/tools/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/orm/tools/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/tools/schematool.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>