Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / common / lib / Doctrine / Common / Persistence / Mapping / ClassMetadataFactory.php
1 <?php
2 /*
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.
14  *
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>.
18  */
19
20 namespace Doctrine\Common\Persistence\Mapping;
21
22 /**
23  * Contract for a Doctrine persistence layer ClassMetadata class to implement.
24  *
25  * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
26  * @link    www.doctrine-project.org
27  * @since   2.1
28  * @author  Benjamin Eberlei <kontakt@beberlei.de>
29  * @author  Jonathan Wage <jonwage@gmail.com>
30  */
31 interface ClassMetadataFactory
32 {
33     /**
34      * Forces the factory to load the metadata of all classes known to the underlying
35      * mapping driver.
36      *
37      * @return array The ClassMetadata instances of all mapped classes.
38      */
39     function getAllMetadata();
40
41     /**
42      * Gets the class metadata descriptor for a class.
43      *
44      * @param string $className The name of the class.
45      * @return ClassMetadata
46      */
47     function getMetadataFor($className);
48
49     /**
50      * Checks whether the factory has the metadata for a class loaded already.
51      *
52      * @param string $className
53      * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
54      */
55     function hasMetadataFor($className);
56
57     /**
58      * Sets the metadata descriptor for a specific class.
59      *
60      * @param string $className
61      * @param ClassMetadata $class
62      */
63     function setMetadataFor($className, $class);
64
65     /**
66      * Whether the class with the specified name should have its metadata loaded.
67      * This is only the case if it is either mapped directly or as a
68      * MappedSuperclass.
69      *
70      * @param string $className
71      * @return boolean
72      */
73     function isTransient($className);
74 }