示例#1
0
 /**
  * @return string
  */
 public function getImage()
 {
     return $this->thumbnails ? $this->thumbnails->getMedium()->getUrl() : null;
 }
示例#2
0
 /**
  * @param \Google_Service_YouTube_ThumbnailDetails $source
  *
  * @return \C2iS\SocialWall\YouTube\Model\ThumbnailCollection
  */
 protected function createThumbnailCollection($source)
 {
     $thumbnailCollection = new ThumbnailCollection();
     if ($source->getDefault()) {
         $thumbnailCollection->setDefault($this->createThumbnail($source->getDefault()));
     }
     if ($source->getHigh()) {
         $thumbnailCollection->setHigh($this->createThumbnail($source->getHigh()));
     }
     if ($source->getMaxres()) {
         $thumbnailCollection->setMaxRes($this->createThumbnail($source->getMaxres()));
     }
     if ($source->getMedium()) {
         $thumbnailCollection->setMedium($this->createThumbnail($source->getMedium()));
     }
     if ($source->getStandard()) {
         $thumbnailCollection->setStandard($this->createThumbnail($source->getStandard()));
     }
     return $thumbnailCollection;
 }