@@ -31,6 +31,9 @@ |
||
31 | 31 | return null; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $content |
|
36 | + */ |
|
34 | 37 | public function write_content($content) |
35 | 38 | { |
36 | 39 | return file_put_contents($this->get_path(), $content) !== false; |
@@ -56,6 +56,9 @@ discard block |
||
56 | 56 | return true; |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $classname |
|
61 | + */ |
|
59 | 62 | public static function create_class_storage($classname) |
60 | 63 | { |
61 | 64 | $em = connection::get_em(); |
@@ -87,6 +90,11 @@ discard block |
||
87 | 90 | $generator->generateProxyClass($cm, $filename); |
88 | 91 | } |
89 | 92 | |
93 | + /** |
|
94 | + * @param Doctrine\ORM\EntityManager $em |
|
95 | + * |
|
96 | + * @return ClassMetadata |
|
97 | + */ |
|
90 | 98 | private static function get_cm($em, $classname) |
91 | 99 | { |
92 | 100 | if (!class_exists($classname)) { |
@@ -29,6 +29,9 @@ |
||
29 | 29 | |
30 | 30 | private $replication_enabled = true; |
31 | 31 | |
32 | + /** |
|
33 | + * @return integer |
|
34 | + */ |
|
32 | 35 | public static function get_instance() |
33 | 36 | { |
34 | 37 | if (self::$instance === null) { |
@@ -96,6 +96,9 @@ |
||
96 | 96 | return true; |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param string $guid |
|
101 | + */ |
|
99 | 102 | public static function get_object_by_guid($guid) |
100 | 103 | { |
101 | 104 | if (!mgd_is_guid($guid)) { |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
243 | - * @return boolean Indicating success |
|
243 | + * @return boolean|null Indicating success |
|
244 | 244 | */ |
245 | 245 | public static function import_from_xml($xml, $force = false) |
246 | 246 | { |
@@ -264,6 +264,9 @@ discard block |
||
264 | 264 | $blob->write_content($blob->content); |
265 | 265 | } |
266 | 266 | |
267 | + /** |
|
268 | + * @return string|null |
|
269 | + */ |
|
267 | 270 | private static function resolve_link_id(ClassMetadata $cm, dbobject $object, $name) |
268 | 271 | { |
269 | 272 | if ($object->$name == 0) { |
@@ -339,7 +342,7 @@ discard block |
||
339 | 342 | * |
340 | 343 | * @param SimpleXMLElement $node |
341 | 344 | * @param boolean $force |
342 | - * @return dbobject |
|
345 | + * @return blob |
|
343 | 346 | */ |
344 | 347 | private static function blob_from_xml(SimpleXMLElement $node, $force) |
345 | 348 | { |
@@ -350,6 +353,9 @@ discard block |
||
350 | 353 | return $blob; |
351 | 354 | } |
352 | 355 | |
356 | + /** |
|
357 | + * @param string $guid |
|
358 | + */ |
|
353 | 359 | private static function get_object_action($guid) |
354 | 360 | { |
355 | 361 | $result = connection::get_em() |
@@ -376,6 +382,9 @@ discard block |
||
376 | 382 | } |
377 | 383 | } |
378 | 384 | |
385 | + /** |
|
386 | + * @return string|null |
|
387 | + */ |
|
379 | 388 | private static function convert_value($value) |
380 | 389 | { |
381 | 390 | if ($value instanceof midgard_datetime) { |
@@ -30,6 +30,9 @@ discard block |
||
30 | 30 | public $cachedir = '/var/cache/midgard2'; |
31 | 31 | public $gdathreads = false; |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $path |
|
35 | + */ |
|
33 | 36 | public function read_file_at_path($path) |
34 | 37 | { |
35 | 38 | if ( !file_exists($path) |
@@ -122,6 +125,9 @@ discard block |
||
122 | 125 | return true; |
123 | 126 | } |
124 | 127 | |
128 | + /** |
|
129 | + * @param string $key |
|
130 | + */ |
|
125 | 131 | private function convert_to_storage($key, $value) |
126 | 132 | { |
127 | 133 | if (is_bool($value)) { |
@@ -205,6 +205,9 @@ discard block |
||
205 | 205 | } |
206 | 206 | } |
207 | 207 | |
208 | + /** |
|
209 | + * @param string $targetclass |
|
210 | + */ |
|
208 | 211 | protected function add_collection_join($current_table, $targetclass) |
209 | 212 | { |
210 | 213 | if (!array_key_exists($targetclass, $this->join_tables)) { |
@@ -215,6 +218,9 @@ discard block |
||
215 | 218 | return $this->join_tables[$targetclass]; |
216 | 219 | } |
217 | 220 | |
221 | + /** |
|
222 | + * @param \midgard_reflection_property $mrp |
|
223 | + */ |
|
218 | 224 | protected function add_join($current_table, $mrp, $property) |
219 | 225 | { |
220 | 226 | $targetclass = $mrp->get_link_name($property); |
@@ -123,6 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | /** |
125 | 125 | * Toggle autostart |
126 | + * @param boolean $autostart |
|
126 | 127 | */ |
127 | 128 | public static function set_autostart($autostart) |
128 | 129 | { |
@@ -156,6 +157,9 @@ discard block |
||
156 | 157 | } |
157 | 158 | } |
158 | 159 | |
160 | + /** |
|
161 | + * @param string $name |
|
162 | + */ |
|
159 | 163 | public static function get_parameter($name) |
160 | 164 | { |
161 | 165 | if (!array_key_exists($name, self::$parameters)) { |
@@ -65,6 +65,7 @@ discard block |
||
65 | 65 | * This is basically a workaround for some quirks when merging detached entities with changed associations |
66 | 66 | * |
67 | 67 | * @todo: This may or may not be a bug in Doctrine |
68 | + * @param dbobject $source |
|
68 | 69 | */ |
69 | 70 | private function copy_associations($source, $target) |
70 | 71 | { |
@@ -222,6 +223,9 @@ discard block |
||
222 | 223 | return $entity; |
223 | 224 | } |
224 | 225 | |
226 | + /** |
|
227 | + * @param dbobject $target |
|
228 | + */ |
|
225 | 229 | private function copy_metadata($source, $target, $action = 'update') |
226 | 230 | { |
227 | 231 | if (!$source instanceof metadata) { |