public function getContents() { $contents = []; for ($i = 0; $i < $this->getSize(); ++$i) { $contents[$i] = $this->getItem($i); } return $contents; }