예제 #1
0
 /**
  * 미디어에서 사진 추출
  *
  * @param Media $media image instance
  * @return string 이미지 content
  * @throws WrongInstanceException
  */
 public function getPicture(Media $media)
 {
     if (!$media instanceof Image) {
         throw new WrongInstanceException();
     }
     return $media->getContent();
 }
예제 #2
0
 /**
  * 미디어에서 사진 추출
  *
  * @param Media $media media instance
  * @return null|string 이미지 content
  * @throws WrongInstanceException
  */
 public function getPicture(Media $media)
 {
     if (!$media instanceof Video) {
         throw new WrongInstanceException();
     }
     $snapshot = $this->extension->getSnapshot($media->getContent(), $this->fromSecond);
     return $snapshot;
 }