1 | <?php |
||
13 | class ObjectBeanPropertyDescriptor extends AbstractBeanPropertyDescriptor |
||
14 | { |
||
15 | /** |
||
16 | * @var ForeignKeyConstraint |
||
17 | */ |
||
18 | private $foreignKey; |
||
19 | |||
20 | /** |
||
21 | * @var SchemaAnalyzer |
||
22 | */ |
||
23 | private $schemaAnalyzer; |
||
24 | |||
25 | public function __construct(Table $table, ForeignKeyConstraint $foreignKey, SchemaAnalyzer $schemaAnalyzer) |
||
31 | |||
32 | /** |
||
33 | * Returns the foreignkey the column is part of, if any. null otherwise. |
||
34 | * |
||
35 | * @return ForeignKeyConstraint|null |
||
36 | */ |
||
37 | public function getForeignKey() |
||
41 | |||
42 | /** |
||
43 | * Returns the name of the class linked to this property or null if this is not a foreign key. |
||
44 | * |
||
45 | * @return null|string |
||
46 | */ |
||
47 | public function getClassName() |
||
51 | |||
52 | /** |
||
53 | * Returns the param annotation for this property (useful for constructor). |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getParamAnnotation() |
||
63 | |||
64 | public function getUpperCamelCaseName() |
||
92 | |||
93 | /** |
||
94 | * Returns true if the property is compulsory (and therefore should be fetched in the constructor). |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function isCompulsory() |
||
112 | |||
113 | /** |
||
114 | * Returns true if the property has a default value. |
||
115 | * |
||
116 | * @return bool |
||
117 | */ |
||
118 | public function hasDefault() |
||
122 | |||
123 | /** |
||
124 | * Returns the code that assigns a value to its default value. |
||
125 | * |
||
126 | * @return string |
||
127 | * |
||
128 | * @throws \TDBMException |
||
129 | */ |
||
130 | public function assignToDefaultCode() |
||
134 | |||
135 | /** |
||
136 | * Returns true if the property is the primary key. |
||
137 | * |
||
138 | * @return bool |
||
139 | */ |
||
140 | public function isPrimaryKey() |
||
150 | |||
151 | /** |
||
152 | * Returns the PHP code for getters and setters. |
||
153 | * |
||
154 | * @return string |
||
155 | */ |
||
156 | public function getGetterSetterCode() |
||
186 | |||
187 | /** |
||
188 | * Returns the part of code useful when doing json serialization. |
||
189 | * |
||
190 | * @return string |
||
191 | */ |
||
192 | public function getJsonSerializeCode() |
||
199 | } |
||
200 |