本文整理匯總了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());
}