1
0
mirror of synced 2024-12-15 07:36:03 +03:00

Moved save.

This commit is contained in:
Jonathan.Wage 2007-09-21 18:34:10 +00:00
parent 208fa1eef8
commit d59dce8607

View File

@ -22,13 +22,6 @@ class Doctrine_Resource_Collection extends Doctrine_Access implements Countable,
return new ArrayIterator($data); return new ArrayIterator($data);
} }
public function save()
{
foreach ($data as $record) {
$record->save();
}
}
public function getFirst() public function getFirst()
{ {
return $this->data[0]; return $this->data[0];
@ -37,10 +30,17 @@ class Doctrine_Resource_Collection extends Doctrine_Access implements Countable,
public function toArray() public function toArray()
{ {
$array = array(); $array = array();
foreach($this->data as $key => $record) { foreach ($this->data as $key => $record) {
$array[$key] = $record->toArray(); $array[$key] = $record->toArray();
} }
return $array; return $array;
} }
public function save()
{
foreach ($this->data as $record) {
$record->save();
}
}
} }