1 | <?php |
||
14 | class DoctrineCollector |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $associations; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $indexes; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $uniques; |
||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $discriminators; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $discriminatorColumns; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $inheritanceTypes; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $overrides; |
||
50 | |||
51 | /** |
||
52 | * @var DoctrineCollector |
||
53 | */ |
||
54 | private static $instance; |
||
55 | |||
56 | public function __construct() |
||
60 | |||
61 | /** |
||
62 | * @return DoctrineCollector |
||
63 | */ |
||
64 | public static function getInstance() |
||
72 | |||
73 | /** |
||
74 | * Add a discriminator to a class. |
||
75 | * |
||
76 | * @param string $class The Class |
||
77 | * @param string $key Key is the database value and values are the classes |
||
78 | * @param string $discriminatorClass The mapped class |
||
79 | */ |
||
80 | public function addDiscriminator($class, $key, $discriminatorClass) |
||
90 | |||
91 | /** |
||
92 | * Add the Discriminator Column. |
||
93 | * |
||
94 | * @param string $class |
||
95 | * @param array $columnDef |
||
96 | */ |
||
97 | public function addDiscriminatorColumn($class, array $columnDef) |
||
103 | |||
104 | /** |
||
105 | * @param string $class |
||
106 | * @param string $type |
||
107 | */ |
||
108 | public function addInheritanceType($class, $type) |
||
114 | |||
115 | /** |
||
116 | * @param string $class |
||
117 | * @param string $type |
||
118 | * @param array $options |
||
119 | */ |
||
120 | public function addAssociation($class, $type, array $options) |
||
132 | |||
133 | /** |
||
134 | * @param string $class |
||
135 | * @param string $name |
||
136 | * @param array $columns |
||
137 | */ |
||
138 | public function addIndex($class, $name, array $columns) |
||
150 | |||
151 | /** |
||
152 | * @param string $class |
||
153 | * @param string $name |
||
154 | * @param array $columns |
||
155 | */ |
||
156 | public function addUnique($class, $name, array $columns) |
||
168 | |||
169 | /** |
||
170 | * Adds new override. |
||
171 | * |
||
172 | * @param string $class |
||
173 | * @param string $type |
||
174 | * @param array $options |
||
175 | */ |
||
176 | final public function addOverride($class, $type, array $options) |
||
188 | |||
189 | /** |
||
190 | * @return array |
||
191 | */ |
||
192 | public function getAssociations() |
||
196 | |||
197 | /** |
||
198 | * @return array |
||
199 | */ |
||
200 | public function getDiscriminators() |
||
204 | |||
205 | /** |
||
206 | * @return array |
||
207 | */ |
||
208 | public function getDiscriminatorColumns() |
||
212 | |||
213 | /** |
||
214 | * @return array |
||
215 | */ |
||
216 | public function getInheritanceTypes() |
||
220 | |||
221 | /** |
||
222 | * @return array |
||
223 | */ |
||
224 | public function getIndexes() |
||
228 | |||
229 | /** |
||
230 | * @return array |
||
231 | */ |
||
232 | public function getUniques() |
||
236 | |||
237 | /** |
||
238 | * Get all overrides. |
||
239 | * |
||
240 | * @return array |
||
241 | */ |
||
242 | final public function getOverrides() |
||
246 | |||
247 | public function clear() |
||
251 | |||
252 | private function initialize() |
||
262 | } |
||
263 |