1 | <?php |
||
12 | class ScalarBeanPropertyDescriptor extends AbstractBeanPropertyDescriptor |
||
13 | { |
||
14 | /** |
||
15 | * @var Column |
||
16 | */ |
||
17 | private $column; |
||
18 | |||
19 | /** |
||
20 | * ScalarBeanPropertyDescriptor constructor. |
||
21 | * @param Table $table |
||
22 | * @param Column $column |
||
23 | * @param NamingStrategyInterface $namingStrategy |
||
24 | */ |
||
25 | public function __construct(Table $table, Column $column, NamingStrategyInterface $namingStrategy) |
||
31 | |||
32 | /** |
||
33 | * Returns the foreign-key the column is part of, if any. null otherwise. |
||
34 | * |
||
35 | * @return ForeignKeyConstraint|null |
||
36 | */ |
||
37 | public function getForeignKey() |
||
41 | |||
42 | /** |
||
43 | * Returns the param annotation for this property (useful for constructor). |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getParamAnnotation() |
||
56 | |||
57 | /** |
||
58 | * Returns the name of the class linked to this property or null if this is not a foreign key. |
||
59 | * |
||
60 | * @return null|string |
||
61 | */ |
||
62 | public function getClassName() |
||
66 | |||
67 | /** |
||
68 | * Returns true if the property is compulsory (and therefore should be fetched in the constructor). |
||
69 | * |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function isCompulsory() |
||
76 | |||
77 | /** |
||
78 | * Returns true if the property has a default value. |
||
79 | * |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function hasDefault() |
||
86 | |||
87 | /** |
||
88 | * Returns the code that assigns a value to its default value. |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | public function assignToDefaultCode() |
||
106 | |||
107 | /** |
||
108 | * Returns true if the property is the primary key. |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | public function isPrimaryKey() |
||
116 | |||
117 | /** |
||
118 | * Returns the PHP code for getters and setters. |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getGetterSetterCode() |
||
178 | |||
179 | /** |
||
180 | * Returns the part of code useful when doing json serialization. |
||
181 | * |
||
182 | * @return string |
||
183 | */ |
||
184 | public function getJsonSerializeCode() |
||
195 | |||
196 | /** |
||
197 | * Returns the column name. |
||
198 | * |
||
199 | * @return string |
||
200 | */ |
||
201 | public function getColumnName() |
||
205 | } |
||
206 |