Exemple #1
0
 /**
  * @param VideoInterface $video
  * @return YouTubeMeta
  * @throws VideoException
  */
 public function createMeta(VideoInterface $video)
 {
     if ($video->getType() === VideoInterface::TYPE_YOUTUBE) {
         return new YouTubeMeta($video, $this);
     }
     throw new VideoException(sprintf('No meta class available for %s video types', $video->getType()));
 }
 /**
  * AbstractMeta constructor.
  * @param VideoInterface $video
  * @param MetaFactory $factory
  */
 public function __construct(VideoInterface $video, MetaFactory $factory)
 {
     $this->assertSupportsType($video->getType());
     $this->video = $video;
     $this->factory = $factory;
 }