4 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 * This software consists of voluntary contributions made by many individuals
17 * and is licensed under the MIT license. For more information, see
18 * <http://www.doctrine-project.org>.
21 namespace Doctrine\ORM\Mapping;
24 * A set of rules for determining the physical column and table names
27 * @link www.doctrine-project.org
29 * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
31 interface NamingStrategy
34 * Return a table name for an entity class
36 * @param string $className The fully-qualified class name
37 * @return string A table name
39 function classToTableName($className);
42 * Return a column name for a property
44 * @param string $propertyName A property
45 * @return string A column name
47 function propertyToColumnName($propertyName);
50 * Return the default reference column name
52 * @return string A column name
54 function referenceColumnName();
57 * Return a join column name for a property
59 * @param string $propertyName A property
60 * @return string A join column name
62 function joinColumnName($propertyName);
65 * Return a join table name
67 * @param string $sourceEntity The source entity
68 * @param string $targetEntity The target entity
69 * @param string $propertyName A property
70 * @return string A join table name
72 function joinTableName($sourceEntity, $targetEntity, $propertyName = null);
75 * Return the foreign key column name for the given parameters
77 * @param string $entityName A entity
78 * @param string $referencedColumnName A property
79 * @return string A join column name
81 function joinKeyColumnName($entityName, $referencedColumnName = null);