本文整理汇总了PHP中Zend_Gdata_YouTube_VideoEntry::setMediaGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_YouTube_VideoEntry::setMediaGroup方法的具体用法?PHP Zend_Gdata_YouTube_VideoEntry::setMediaGroup怎么用?PHP Zend_Gdata_YouTube_VideoEntry::setMediaGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Gdata_YouTube_VideoEntry
的用法示例。
在下文中一共展示了Zend_Gdata_YouTube_VideoEntry::setMediaGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$published = new Zend_Gdata_App_Extension_Published("2011-10-21 12:00:00");
$updated = new Zend_Gdata_App_Extension_Updated("2011-10-21 12:20:00");
$id = new Zend_Gdata_App_Extension_Id("Az2cv12");
$rating = new Zend_Gdata_Extension_Rating(4, 1, 5, 200, 4);
$duration = new Zend_Gdata_YouTube_Extension_Duration(80);
$player = new Zend_Gdata_Media_Extension_MediaPlayer();
$player->setUrl("coucou");
$stat = new Zend_Gdata_YouTube_Extension_Statistics();
$stat->setViewCount("5");
$thumb = new Zend_Gdata_Media_Extension_MediaThumbnail('une url', '120', '90');
$media = new Zend_Gdata_YouTube_Extension_MediaGroup();
$media->setPlayer([$player]);
$media->setDuration($duration);
$media->setVideoId($id);
$media->setThumbnail([$thumb]);
$entry = new Zend_Gdata_YouTube_VideoEntry();
$entry->setMajorProtocolVersion(2);
$entry->setMediaGroup($media);
$entry->setStatistics($stat);
$entry->setRating($rating);
$entry->setVideoCategory("category");
$entry->setVideoDescription("one description");
$entry->setVideoPrivate();
$entry->setVideoTags(['tags']);
$entry->setVideoTitle("hellow");
$entry->setUpdated($updated);
$entry->setPublished($published);
$this->object = new Bridge_Api_Youtube_Element($entry, 'video');
}
示例2: testGetVideoIdV2
public function testGetVideoIdV2()
{
$v2VideoEntry = new Zend_Gdata_YouTube_VideoEntry();
$v2VideoEntry->setMajorProtocolVersion(2);
$v2MediaGroup = new Zend_Gdata_YouTube_Extension_MediaGroup();
$v2MediaGroup->setVideoId(new Zend_Gdata_YouTube_Extension_VideoId('UMFI1hdm96E'));
$v2VideoEntry->setMediaGroup($v2MediaGroup);
$this->assertEquals('UMFI1hdm96E', $v2VideoEntry->getVideoId());
}