/** @return $files [urn => OmekaFile] Fetches all files that belong to this Item. Obeys Omeka->$dbUsage. */ public function getFiles() { if ($this->files === null) { if (Config::getOmeka()->getDbUsage()) { $this->files = OmekaFile::getFilesFromDbByItem($this); } else { $this->files = array(); $url = $this->data['files']['url']; foreach (Config::getOmeka()->httpGet($url) as $fData) { $file = new OmekaFile($fData); $this->files[$file->getUrn()] = $file; } } } return $this->files; }