1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/lib/api/doctrine/orm/tools/classmetadatareader.html

175 lines
7.2 KiB
HTML
Raw Normal View History

2010-04-14 19:13:14 +04:00
<!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>ClassMetadataReader (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/classmetadatareader.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\ClassMetadataReader</div>
<div class="location">/Doctrine/ORM/Tools/ClassMetadataReader.php at line 54</div>
<h1>Class ClassMetadataReader</h1>
<pre class="tree"><strong>ClassMetadataReader</strong><br /></pre>
<hr>
<p class="signature">public class <strong>ClassMetadataReader</strong></p>
<div class="comment" id="overview_description"><p>Class to read metadata mapping information from multiple sources into an array
of ClassMetadataInfo instances.</p><p>The difference between this class and the ClassMetadataFactory is that this
is just a tool for reading in the mapping information from files without
having it bound to the actual ORM and the mapping information referenced by
the EntityManager. This allows us to read any source of mapping information
and return a single array of aggregated ClassMetadataInfo instances.</p><p>These arrays are used for exporting the mapping information to the supported
mapping drivers, generating entities, generating repositories, etc.</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_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#addMappingSource()">addMappingSource</a>(string source, string type)</p><p class="description">Add a new mapping directory to the array of directories to convert and export
to another format</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getMetadatas()">getMetadatas</a>(bool autoload)</p><p class="description">Get an array of ClassMetadataInfo instances for all the configured mapping
directories. </p></td>
</tr>
<tr>
<td class="type">static void</td>
<td class="description"><p class="name"><a href="#registerMappingDriver()">registerMappingDriver</a>(string name, string class)</p><p class="description">Register a new mapping driver class under a specified name</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setEntityManager()">setEntityManager</a>(<a href="../../../doctrine/orm/entitymanager.html">EntityManager</a> em)</p><p class="description">Optionally set the EntityManager instance to get the AnnotationDriver
from instead of creating a new instance of the AnnotationDriver</p></td>
</tr>
</table>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/ORM/Tools/ClassMetadataReader.php at line 139</div>
<h3 id="addMappingSource()">addMappingSource</h3>
<code class="signature">public void <strong>addMappingSource</strong>(string source, string type)</code>
<div class="details">
<p>Add a new mapping directory to the array of directories to convert and export
to another format</p><dl>
<dt>Parameters:</dt>
<dd>source - The source for the mapping</dd>
<dd>type - The type of mapping files (yml, xml, etc.)</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/Tools/ClassMetadataReader.php at line 104</div>
<h3 id="getMetadatas()">getMetadatas</h3>
<code class="signature">public array <strong>getMetadatas</strong>(bool autoload)</code>
<div class="details">
<p>Get an array of ClassMetadataInfo instances for all the configured mapping
directories. Reads the mapping directories and populates ClassMetadataInfo
instances.</p><p>If you specify $autoload = true then this method will return ClassMetadata
instances instead of ClassMetadataInfo instances. Keep in mind that if you
specify it to autoload and it doesn't find the class your autoloader may
throw an error.</p><dl>
<dt>Parameters:</dt>
<dd>autoload - Whether or to try and autoload the classes</dd>
<dt>Returns:</dt>
<dd>$classes</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/ORM/Tools/ClassMetadataReader.php at line 74</div>
<h3 id="registerMappingDriver()">registerMappingDriver</h3>
<code class="signature">public static void <strong>registerMappingDriver</strong>(string name, string class)</code>
<div class="details">
<p>Register a new mapping driver class under a specified name</p></div>
<hr>
<div class="location">/Doctrine/ORM/Tools/ClassMetadataReader.php at line 86</div>
<h3 id="setEntityManager()">setEntityManager</h3>
<code class="signature">public void <strong>setEntityManager</strong>(<a href="../../../doctrine/orm/entitymanager.html">EntityManager</a> em)</code>
<div class="details">
<p>Optionally set the EntityManager instance to get the AnnotationDriver
from instead of creating a new instance of the AnnotationDriver</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/classmetadatareader.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>