This commit is contained in:
parent
cc01ca4686
commit
b969552cc2
@ -40,6 +40,10 @@ class Doctrine_Hydrate_Array
|
|||||||
public function getElement(array $data, $component)
|
public function getElement(array $data, $component)
|
||||||
{
|
{
|
||||||
return $data;
|
return $data;
|
||||||
|
}
|
||||||
|
public function registerCollection($coll)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
public function flush()
|
public function flush()
|
||||||
{
|
{
|
||||||
|
@ -44,6 +44,15 @@ class Doctrine_Hydrate_Record
|
|||||||
|
|
||||||
return $coll;
|
return $coll;
|
||||||
}
|
}
|
||||||
|
public function registerCollection($coll)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( ! is_object($coll)) {
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
$this->_collections[] = $coll;
|
||||||
|
|
||||||
|
}
|
||||||
public function getElement(array $data, $component)
|
public function getElement(array $data, $component)
|
||||||
{
|
{
|
||||||
$record = new $component();
|
$record = new $component();
|
||||||
@ -56,8 +65,8 @@ class Doctrine_Hydrate_Record
|
|||||||
public function flush()
|
public function flush()
|
||||||
{
|
{
|
||||||
// take snapshots from all initialized collections
|
// take snapshots from all initialized collections
|
||||||
foreach (array_unique($this->_collections) as $c) {
|
foreach (array_unique($this->_collections) as $key => $coll) {
|
||||||
$c->takeSnapshot();
|
$coll->takeSnapshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->_records as $record) {
|
foreach ($this->_records as $record) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user