当前位置: 首页>>代码示例>>PHP>>正文


PHP Playlist::Delete方法代码示例

本文整理汇总了PHP中Playlist::Delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Playlist::Delete方法的具体用法?PHP Playlist::Delete怎么用?PHP Playlist::Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Playlist的用法示例。


在下文中一共展示了Playlist::Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testAddAndRemovePlaylist

 function testAddAndRemovePlaylist()
 {
     // Create a playlist
     $playlist = new Playlist();
     $playlist->create("Scheduler Unit Test " . uniqid());
     $result = $playlist->addAudioClip($this->storedFile->getId());
     $result = $playlist->addAudioClip($this->storedFile2->getId());
     $result = $playlist->addAudioClip($this->storedFile2->getId());
     $i = new ScheduleGroup();
     $this->groupIdCreated = $i->add('2010-11-11 01:30:23', null, $playlist->getId());
     if (PEAR::isError($this->groupIdCreated)) {
         $this->fail("Failed to create scheduled item: " . $this->groupIdCreated->getMessage());
     }
     $group = new ScheduleGroup($this->groupIdCreated);
     if ($group->count() != 3) {
         $this->fail("Wrong number of items added.");
     }
     $items = $group->getItems();
     if (!is_array($items) || $items[1]["starts"] != "2010-11-11 01:30:34.231") {
         $this->fail("Wrong start time for 2nd item.");
     }
     $result = $group->remove();
     if ($result != 1) {
         $this->fail("Did not remove item.");
     }
     Playlist::Delete($playlist->getId());
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:27,代码来源:SchedulerTests.php

示例2: deleteActiveAction

 public function deleteActiveAction()
 {
     $pl = $this->getPlaylist();
     Playlist::Delete($pl->getId());
     $pl_sess = $this->pl_sess;
     unset($pl_sess->id);
     $this->view->html = $this->view->render('playlist/index.phtml');
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:8,代码来源:PlaylistController.php


注:本文中的Playlist::Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。