3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\Common\Persistence\Mapping;
23 * Contract for a Doctrine persistence layer ClassMetadata class to implement.
25 * @link www.doctrine-project.org
27 * @author Benjamin Eberlei <kontakt@beberlei.de>
28 * @author Jonathan Wage <jonwage@gmail.com>
30 interface ClassMetadataFactory
33 * Forces the factory to load the metadata of all classes known to the underlying
36 * @return array The ClassMetadata instances of all mapped classes.
38 public function getAllMetadata();
41 * Gets the class metadata descriptor for a class.
43 * @param string $className The name of the class.
45 * @return ClassMetadata
47 public function getMetadataFor($className);
50 * Checks whether the factory has the metadata for a class loaded already.
52 * @param string $className
54 * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
56 public function hasMetadataFor($className);
59 * Sets the metadata descriptor for a specific class.
61 * @param string $className
63 * @param ClassMetadata $class
65 public function setMetadataFor($className, $class);
68 * Returns whether the class with the specified name should have its metadata loaded.
69 * This is only the case if it is either mapped directly or as a MappedSuperclass.
71 * @param string $className
75 public function isTransient($className);