notes = $data['notes']; $this->items = array(); if (isset($data['baseurl'])) { $this->baseUrl = $data['baseurl']; } if (isset($data['entries'])) { foreach ($data['entries'] as $type => $item) { parent::toArray($item); if ($type == 'file') { foreach ($item as $file) { $this->items[] = new File($file, $this->baseUrl); } } elseif ($type == 'link') { foreach ($item as $link) { $this->items[] = new WebLink($link); } } } } } /* Get the optional notes. */ public function getNotes() { return $this->notes; } /* Get the list of items. */ public function getItems() { return $this->items; } }