diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Mapping/NamingStrategy.php')
-rw-r--r-- | vendor/doctrine/orm/src/Mapping/NamingStrategy.php | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Mapping/NamingStrategy.php b/vendor/doctrine/orm/src/Mapping/NamingStrategy.php new file mode 100644 index 0000000..afedebe --- /dev/null +++ b/vendor/doctrine/orm/src/Mapping/NamingStrategy.php | |||
@@ -0,0 +1,71 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Mapping; | ||
6 | |||
7 | /** | ||
8 | * A set of rules for determining the physical column and table names | ||
9 | * | ||
10 | * @link www.doctrine-project.org | ||
11 | */ | ||
12 | interface NamingStrategy | ||
13 | { | ||
14 | /** | ||
15 | * Returns a table name for an entity class. | ||
16 | * | ||
17 | * @param class-string $className | ||
18 | */ | ||
19 | public function classToTableName(string $className): string; | ||
20 | |||
21 | /** | ||
22 | * Returns a column name for a property. | ||
23 | * | ||
24 | * @param class-string $className | ||
25 | */ | ||
26 | public function propertyToColumnName(string $propertyName, string $className): string; | ||
27 | |||
28 | /** | ||
29 | * Returns a column name for an embedded property. | ||
30 | * | ||
31 | * @param class-string $className | ||
32 | * @param class-string $embeddedClassName | ||
33 | */ | ||
34 | public function embeddedFieldToColumnName( | ||
35 | string $propertyName, | ||
36 | string $embeddedColumnName, | ||
37 | string $className, | ||
38 | string $embeddedClassName, | ||
39 | ): string; | ||
40 | |||
41 | /** | ||
42 | * Returns the default reference column name. | ||
43 | */ | ||
44 | public function referenceColumnName(): string; | ||
45 | |||
46 | /** | ||
47 | * Returns a join column name for a property. | ||
48 | * | ||
49 | * @param class-string $className | ||
50 | */ | ||
51 | public function joinColumnName(string $propertyName, string $className): string; | ||
52 | |||
53 | /** | ||
54 | * Returns a join table name. | ||
55 | * | ||
56 | * @param class-string $sourceEntity | ||
57 | * @param class-string $targetEntity | ||
58 | */ | ||
59 | public function joinTableName(string $sourceEntity, string $targetEntity, string $propertyName): string; | ||
60 | |||
61 | /** | ||
62 | * Returns the foreign key column name for the given parameters. | ||
63 | * | ||
64 | * @param class-string $entityName An entity. | ||
65 | * @param string|null $referencedColumnName A property name or null in | ||
66 | * case of a self-referencing | ||
67 | * entity with join columns | ||
68 | * defined in the mapping | ||
69 | */ | ||
70 | public function joinKeyColumnName(string $entityName, string|null $referencedColumnName): string; | ||
71 | } | ||