1 | <?php |
||
11 | class Column |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Colunas dos bancos |
||
16 | * |
||
17 | * @author Pedro Alarcao <[email protected]> |
||
18 | */ |
||
19 | final private function __construct () |
||
22 | |||
23 | /** |
||
24 | * create instance |
||
25 | * |
||
26 | * @return \Classes\Db\Column |
||
27 | */ |
||
28 | public static function getInstance () |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $name; |
||
37 | |||
38 | /** |
||
39 | * @var \Classes\Db\Constrant[] |
||
40 | */ |
||
41 | private $primarykey; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $type; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $comment; |
||
52 | |||
53 | /** |
||
54 | * @var boolean |
||
55 | */ |
||
56 | private $nullable; |
||
57 | |||
58 | /** |
||
59 | * @var int |
||
60 | */ |
||
61 | private $max_length; |
||
62 | |||
63 | /** |
||
64 | * @var \Classes\Db\Constrant[] |
||
65 | */ |
||
66 | private $dependences; |
||
67 | |||
68 | /** |
||
69 | * @var \Classes\Db\Constrant |
||
70 | */ |
||
71 | private $refForeingkey; |
||
72 | |||
73 | /** |
||
74 | * @type string |
||
75 | */ |
||
76 | private $sequence; |
||
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getName () |
||
85 | |||
86 | /** |
||
87 | * popula o |
||
88 | * |
||
89 | * @param $array |
||
90 | */ |
||
91 | public function populate ( $array ) |
||
100 | |||
101 | /** |
||
102 | * @return boolean |
||
103 | */ |
||
104 | public function isPrimaryKey () |
||
108 | |||
109 | /** |
||
110 | * @return boolean |
||
111 | */ |
||
112 | public function isForeingkey () |
||
116 | |||
117 | /** |
||
118 | * @return boolean |
||
119 | */ |
||
120 | public function hasDependence () |
||
124 | |||
125 | /** |
||
126 | * @return string |
||
127 | */ |
||
128 | public function getType () |
||
132 | |||
133 | /** |
||
134 | * @return string |
||
135 | */ |
||
136 | public function getComment () |
||
140 | |||
141 | /** |
||
142 | * @param string $comment |
||
143 | */ |
||
144 | public function setComment ( $comment ) |
||
150 | |||
151 | /** |
||
152 | * @param \Classes\Db\Constrant $primarykey |
||
153 | */ |
||
154 | public function setPrimaryKey ( Constrant $primarykey ) |
||
160 | |||
161 | /** |
||
162 | * @param \Classes\Db\Constrant $dependece |
||
163 | */ |
||
164 | public function addDependece ( Constrant $dependece ) |
||
170 | |||
171 | /** |
||
172 | * @param $constraint_name |
||
173 | * @param $table_name |
||
174 | * @param $column_name |
||
175 | * |
||
176 | * @return $this |
||
177 | */ |
||
178 | public function createDependece ( $constraint_name , $table_name , $column_name , $schema = null ) |
||
194 | |||
195 | /** |
||
196 | * @param \Classes\Db\Constrant $reference |
||
197 | */ |
||
198 | public function addRefFk ( Constrant $reference ) |
||
204 | |||
205 | /** |
||
206 | * retorna as foreingkeys |
||
207 | * |
||
208 | * @return \Classes\Db\Constrant |
||
209 | */ |
||
210 | public function getFks () |
||
214 | |||
215 | /** |
||
216 | * Retorna as dependencias da tabela |
||
217 | * |
||
218 | * @return \Classes\Db\Constrant[] |
||
219 | */ |
||
220 | public function getDependences () |
||
224 | |||
225 | /** |
||
226 | * @return bool |
||
227 | */ |
||
228 | public function hasDependences () |
||
232 | |||
233 | /** |
||
234 | * Retorna a constrant da primarykey da tabela |
||
235 | * |
||
236 | * @return \Classes\Db\Constrant[] |
||
237 | */ |
||
238 | public function getPrimaryKey () |
||
242 | |||
243 | /** |
||
244 | * |
||
245 | */ |
||
246 | public function getMaxLength () |
||
250 | |||
251 | /** |
||
252 | * @return bool |
||
253 | */ |
||
254 | public function hasSequence () |
||
258 | |||
259 | /** |
||
260 | * @return string |
||
261 | */ |
||
262 | public function getSequence () |
||
266 | |||
267 | /** |
||
268 | * @param string $sequence |
||
269 | */ |
||
270 | public function setSequence ( $sequence ) |
||
274 | |||
275 | /** |
||
276 | * @return boolean |
||
277 | */ |
||
278 | public function isNullable () |
||
282 | |||
283 | } |
||
284 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..