1 | <?php |
||
7 | class JoinColumn |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $relation; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $joinColumn; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $referenceColumn; |
||
23 | |||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | protected $nullable = true; |
||
28 | |||
29 | /** |
||
30 | * @var bool |
||
31 | */ |
||
32 | protected $unique = false; |
||
33 | |||
34 | /** |
||
35 | * @var string|null |
||
36 | */ |
||
37 | protected $onDelete = null; |
||
38 | |||
39 | /** |
||
40 | * @var string|null |
||
41 | */ |
||
42 | protected $columnDefinition = null; |
||
43 | |||
44 | /** |
||
45 | * @var NamingStrategy |
||
46 | */ |
||
47 | protected $namingStrategy; |
||
48 | |||
49 | /** |
||
50 | * @param NamingStrategy $namingStrategy |
||
51 | * @param string $relation |
||
52 | * @param string|null $joinColumn |
||
53 | * @param string|null $referenceColumn |
||
54 | * @param bool $nullable |
||
55 | * @param bool $unique |
||
56 | * @param string|null $onDelete |
||
57 | * @param string|null $columnDefinition |
||
58 | */ |
||
59 | 139 | public function __construct( |
|
78 | |||
79 | /** |
||
80 | * @param string $foreignKey |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | 4 | public function foreignKey($foreignKey) |
|
90 | |||
91 | /** |
||
92 | * @param string $foreignKey |
||
93 | * |
||
94 | * @return $this |
||
95 | */ |
||
96 | 3 | public function target($foreignKey) |
|
100 | |||
101 | /** |
||
102 | * @param string $localKey |
||
103 | * |
||
104 | * @return $this |
||
105 | */ |
||
106 | 4 | public function localKey($localKey) |
|
112 | |||
113 | /** |
||
114 | * @param string $localKey |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | 3 | public function source($localKey) |
|
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | 61 | public function getJoinColumn() |
|
130 | |||
131 | /** |
||
132 | * @param string $joinColumn |
||
133 | * |
||
134 | * @return $this |
||
135 | */ |
||
136 | 1 | public function setJoinColumn($joinColumn) |
|
142 | |||
143 | /** |
||
144 | * @return string |
||
145 | */ |
||
146 | 61 | public function getReferenceColumn() |
|
150 | |||
151 | /** |
||
152 | * @param string $referenceColumn |
||
153 | * |
||
154 | * @return $this |
||
155 | */ |
||
156 | 1 | public function setReferenceColumn($referenceColumn) |
|
162 | |||
163 | /** |
||
164 | * @return $this |
||
165 | */ |
||
166 | 56 | public function nullable() |
|
172 | |||
173 | /** |
||
174 | * @return bool |
||
175 | */ |
||
176 | 59 | public function isNullable() |
|
180 | |||
181 | /** |
||
182 | * @return bool |
||
183 | */ |
||
184 | 59 | public function isUnique() |
|
188 | |||
189 | /** |
||
190 | * @return $this |
||
191 | */ |
||
192 | 2 | public function unique() |
|
198 | |||
199 | /** |
||
200 | * @return string|null |
||
201 | */ |
||
202 | 59 | public function getOnDelete() |
|
206 | |||
207 | /** |
||
208 | * @param string|null $onDelete |
||
209 | * |
||
210 | * @return $this |
||
211 | */ |
||
212 | 2 | public function onDelete($onDelete = null) |
|
218 | |||
219 | /** |
||
220 | * @return string|null |
||
221 | */ |
||
222 | 56 | public function getColumnDefinition() |
|
226 | } |
||
227 |