@@ -25,6 +25,9 @@ |
||
| 25 | 25 | |
| 26 | 26 | private $value_properties = array(); |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param string $class |
|
| 30 | + */ |
|
| 28 | 31 | function __construct($class, $field, $value) |
| 29 | 32 | { |
| 30 | 33 | parent::__construct($class); |
@@ -37,6 +37,9 @@ |
||
| 37 | 37 | //?? |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @return integer |
|
| 42 | + */ |
|
| 40 | 43 | public static function get_instance() |
| 41 | 44 | { |
| 42 | 45 | if (self::$instance === null) |
@@ -106,6 +106,9 @@ |
||
| 106 | 106 | return true; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | + /** |
|
| 110 | + * @param string $guid |
|
| 111 | + */ |
|
| 109 | 112 | public static function get_object_by_guid($guid) |
| 110 | 113 | { |
| 111 | 114 | if (!mgd_is_guid($guid)) |
@@ -22,6 +22,9 @@ |
||
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $operator |
|
| 27 | + */ |
|
| 25 | 28 | public function add_constraint($name, $operator, $value) |
| 26 | 29 | { |
| 27 | 30 | try |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | /** |
| 277 | - * @return boolean Indicating success |
|
| 277 | + * @return boolean|null Indicating success |
|
| 278 | 278 | */ |
| 279 | 279 | public static function import_from_xml($xml, $force = false) |
| 280 | 280 | { |
@@ -302,6 +302,9 @@ discard block |
||
| 302 | 302 | $blob->write_content($blob->content); |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | + /** |
|
| 306 | + * @return string|null |
|
| 307 | + */ |
|
| 305 | 308 | private static function resolve_link_id(ClassMetadata $cm, dbobject $object, $name) |
| 306 | 309 | { |
| 307 | 310 | if ($object->$name == 0) |
@@ -387,7 +390,7 @@ discard block |
||
| 387 | 390 | * |
| 388 | 391 | * @param SimpleXMLElement $node |
| 389 | 392 | * @param boolean $force |
| 390 | - * @return dbobject |
|
| 393 | + * @return blob |
|
| 391 | 394 | */ |
| 392 | 395 | private static function blob_from_xml(SimpleXMLElement $node, $force) |
| 393 | 396 | { |
@@ -398,6 +401,9 @@ discard block |
||
| 398 | 401 | return $blob; |
| 399 | 402 | } |
| 400 | 403 | |
| 404 | + /** |
|
| 405 | + * @param string $guid |
|
| 406 | + */ |
|
| 401 | 407 | private static function get_object_action($guid) |
| 402 | 408 | { |
| 403 | 409 | $result = connection::get_em() |
@@ -425,6 +431,9 @@ discard block |
||
| 425 | 431 | } |
| 426 | 432 | } |
| 427 | 433 | |
| 434 | + /** |
|
| 435 | + * @return string|null |
|
| 436 | + */ |
|
| 428 | 437 | private static function convert_value($value) |
| 429 | 438 | { |
| 430 | 439 | if ($value instanceof midgard_datetime) |
@@ -61,6 +61,9 @@ discard block |
||
| 61 | 61 | return true; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $classname |
|
| 66 | + */ |
|
| 64 | 67 | public static function create_class_storage($classname) |
| 65 | 68 | { |
| 66 | 69 | $em = connection::get_em(); |
@@ -95,6 +98,11 @@ discard block |
||
| 95 | 98 | $generator->generateProxyClass($cm, $filename); |
| 96 | 99 | } |
| 97 | 100 | |
| 101 | + /** |
|
| 102 | + * @param Doctrine\ORM\EntityManagerInterface $em |
|
| 103 | + * |
|
| 104 | + * @return ClassMetadata |
|
| 105 | + */ |
|
| 98 | 106 | private static function get_cm($em, $classname) |
| 99 | 107 | { |
| 100 | 108 | if (!class_exists($classname)) |
@@ -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; |
@@ -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) |
@@ -136,6 +139,9 @@ discard block |
||
| 136 | 139 | return true; |
| 137 | 140 | } |
| 138 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $key |
|
| 144 | + */ |
|
| 139 | 145 | private function convert_to_storage($key, $value) |
| 140 | 146 | { |
| 141 | 147 | if (is_bool($value)) |
@@ -239,6 +239,9 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | + /** |
|
| 243 | + * @param string $targetclass |
|
| 244 | + */ |
|
| 242 | 245 | protected function add_collection_join($current_table, $targetclass) |
| 243 | 246 | { |
| 244 | 247 | if (!array_key_exists($targetclass, $this->join_tables)) |
@@ -250,6 +253,9 @@ discard block |
||
| 250 | 253 | return $this->join_tables[$targetclass]; |
| 251 | 254 | } |
| 252 | 255 | |
| 256 | + /** |
|
| 257 | + * @param \midgard_reflection_property $mrp |
|
| 258 | + */ |
|
| 253 | 259 | protected function add_join($current_table, $mrp, $property) |
| 254 | 260 | { |
| 255 | 261 | $targetclass = $mrp->get_link_name($property); |