public function setSnapshots($snapshots)
{
if (gettype($snapshots) == "array") {
$snapshots = new ArrayCollection($snapshots);
} elseif (!$snapshots instanceof ArrayCollection) {
$snapshots = new ArrayCollection(array($snapshots));
}
foreach ($snapshots as $snapshot) {
$snapshot->setPage($this);
}
$this->snapshots = $snapshots;
return $this;
}