Commit 63bca659 authored by zYne's avatar zYne

huge bug fix for new hydration algorithm

parent 240fdee5
This diff is collapsed.
......@@ -31,7 +31,7 @@
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Hydrate_Array
class Doctrine_Hydrate_Array
{
public function getElementCollection($component)
{
......@@ -48,6 +48,28 @@ class Doctrine_Hydrate_Array
public function registerCollection($coll)
{
}
public function initRelated(array &$data, $name)
{
if ( ! isset($data[$name])) {
$data[$name] = array();
}
return true;
}
public function search(array $element, array $data)
{
foreach ($data as $key => $val) {
$found = true;
foreach ($element as $k => $e) {
if ($val[$k] !== $e) {
$found = false;
}
}
if ($found) {
return $key;
}
}
return false;
}
public function flush()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment