1 | <?php |
||
21 | class ManyToMany extends AbstractRelation |
||
22 | { |
||
23 | use ManyTo, Owning, Ownable, Orderable, Indexable, Macroable, QueuesMacros; |
||
24 | |||
25 | /** |
||
26 | * @var ManyToManyAssociationBuilder |
||
27 | */ |
||
28 | protected $association; |
||
29 | |||
30 | /** |
||
31 | * @param ClassMetadataBuilder $builder |
||
32 | * @param string $relation |
||
33 | * @param string $entity |
||
34 | * |
||
35 | * @return OneToManyAssociationBuilder |
||
36 | */ |
||
37 | 49 | protected function createAssociation(ClassMetadataBuilder $builder, $relation, $entity) |
|
41 | |||
42 | /** |
||
43 | * @param string $table |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | 3 | public function joinTable($table) |
|
53 | |||
54 | /** |
||
55 | * @param string $joinColumn |
||
56 | * @param string $references |
||
57 | * @param bool $unique |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | 8 | public function joinColumn($joinColumn, $references = 'id', $unique = false) |
|
67 | |||
68 | /** |
||
69 | * @param string $foreignKey |
||
70 | * @param string $references |
||
71 | * @param bool $unique |
||
72 | * |
||
73 | * @return $this |
||
74 | */ |
||
75 | 2 | public function foreignKey($foreignKey, $references = 'id', $unique = false) |
|
79 | |||
80 | /** |
||
81 | * @param string $foreignKey |
||
82 | * @param string $references |
||
83 | * @param bool $unique |
||
84 | * |
||
85 | * @return $this |
||
86 | */ |
||
87 | 4 | public function source($foreignKey, $references = 'id', $unique = false) |
|
91 | |||
92 | /** |
||
93 | * @param string $inverseKey |
||
94 | * @param string $references |
||
95 | * @param bool $unique |
||
96 | * |
||
97 | * @return $this |
||
98 | */ |
||
99 | 5 | public function inverseKey($inverseKey, $references = 'id', $unique = false) |
|
105 | |||
106 | /** |
||
107 | * @param string $inverseKey |
||
108 | * @param string $references |
||
109 | * @param bool $unique |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | 3 | public function target($inverseKey, $references = 'id', $unique = false) |
|
117 | |||
118 | /** |
||
119 | * Magic call method works as a proxy for the Doctrine associationBuilder |
||
120 | * |
||
121 | * @param string $method |
||
122 | * @param array $args |
||
123 | * |
||
124 | * @throws \BadMethodCallException |
||
125 | * @return $this |
||
126 | */ |
||
127 | 19 | public function __call($method, $args) |
|
135 | } |
||
136 |