Example #1
0
 /**
  * Return all files associated with a publication.
  *
  * @internal
  *
  * @param string $eprintid The eprint id.
  */
 public function get_files($eprintid)
 {
     if (!isset($this->_internal_cache->{$eprintid . '_files'})) {
         $this->cache_files(array($eprintid));
     }
     $data = $this->_internal_cache->get($eprintid . '_files');
     if (!is_array($data)) {
         return;
     }
     $files = array();
     foreach ($data as $k => $v) {
         $files[] = File::create_from_api($this, $eprintid, $v);
     }
     return $files;
 }