Example #1
0
 /**
  * @param string $name
  * @return mixed
  * @throws \phpcouch\UnexpectedValueException
  */
 public function retrieveAttachment($name)
 {
     if ($this->hasAttachment($name)) {
         return $this->database->retrieveAttachment($name, $this);
     } else {
         throw new UnexpectedValueException(sprintf('Unknown attachment "%s".', $name));
     }
 }