1
0
mirror of synced 2024-12-14 07:06:04 +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);
}
public function save()
{
foreach ($data as $record) {
$record->save();
}
}
public function getFirst()
{
return $this->data[0];
@ -37,10 +30,17 @@ class Doctrine_Resource_Collection extends Doctrine_Access implements Countable,
public function toArray()
{
$array = array();
foreach($this->data as $key => $record) {
foreach ($this->data as $key => $record) {
$array[$key] = $record->toArray();
}
return $array;
}
public function save()
{
foreach ($this->data as $record) {
$record->save();
}
}
}