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() |
||
66 | |||
67 | /** |
||
68 | * @return DoctrineCollector |
||
69 | */ |
||
70 | public static function getInstance() |
||
78 | |||
79 | /** |
||
80 | * Add a discriminator to a class. |
||
81 | * |
||
82 | * @param string $class The Class |
||
83 | * @param string $key Key is the database value and values are the classes |
||
84 | * @param string $discriminatorClass The mapped class |
||
85 | */ |
||
86 | public function addDiscriminator($class, $key, $discriminatorClass) |
||
96 | |||
97 | /** |
||
98 | * Add the Discriminator Column. |
||
99 | * |
||
100 | * @param string $class |
||
101 | * @param array $columnDef |
||
102 | */ |
||
103 | public function addDiscriminatorColumn($class, array $columnDef) |
||
109 | |||
110 | /** |
||
111 | * @param string $class |
||
112 | * @param string $type |
||
113 | */ |
||
114 | public function addInheritanceType($class, $type) |
||
120 | |||
121 | /** |
||
122 | * @param string $class |
||
123 | * @param string $type |
||
124 | * @param array $options |
||
125 | */ |
||
126 | public function addAssociation($class, $type, array $options) |
||
138 | |||
139 | /** |
||
140 | * @param string $class |
||
141 | * @param string $name |
||
142 | * @param array $columns |
||
143 | */ |
||
144 | public function addIndex($class, $name, array $columns) |
||
156 | |||
157 | /** |
||
158 | * @param string $class |
||
159 | * @param string $name |
||
160 | * @param array $columns |
||
161 | */ |
||
162 | public function addUnique($class, $name, array $columns) |
||
174 | |||
175 | /** |
||
176 | * Adds new override. |
||
177 | * |
||
178 | * @param string $class |
||
179 | * @param string $type |
||
180 | * @param array $options |
||
181 | */ |
||
182 | final public function addOverride($class, $type, array $options) |
||
194 | |||
195 | /** |
||
196 | * @return array |
||
197 | */ |
||
198 | public function getAssociations() |
||
202 | |||
203 | /** |
||
204 | * @return array |
||
205 | */ |
||
206 | public function getDiscriminators() |
||
210 | |||
211 | /** |
||
212 | * @return array |
||
213 | */ |
||
214 | public function getDiscriminatorColumns() |
||
218 | |||
219 | /** |
||
220 | * @return array |
||
221 | */ |
||
222 | public function getInheritanceTypes() |
||
226 | |||
227 | /** |
||
228 | * @return array |
||
229 | */ |
||
230 | public function getIndexes() |
||
234 | |||
235 | /** |
||
236 | * @return array |
||
237 | */ |
||
238 | public function getUniques() |
||
242 | |||
243 | /** |
||
244 | * Get all overrides. |
||
245 | * |
||
246 | * @return array |
||
247 | */ |
||
248 | final public function getOverrides() |
||
252 | } |
||
253 |