public final function getFile($key) { if (!$this->hasImage($key)) { throw new \Exception(__CLASS__ . ' with ID ' . $this->id . ' does not have image ' . $key); } $retval = File::fromId($this->getImageId($key)); return $retval; }