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


PHP Playlist::getId方法代码示例

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


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

 function setup()
 {
     global $CC_CONFIG, $CC_DBC;
     // Clear the files table
     $sql = "DELETE FROM " . $CC_CONFIG["filesTable"];
     $CC_DBC->query($sql);
     // Add a file
     $values = array("filepath" => dirname(__FILE__) . "/test10001.mp3");
     $this->storedFile = StoredFile::Insert($values, false);
     // Add a file
     $values = array("filepath" => dirname(__FILE__) . "/test10002.mp3");
     $this->storedFile2 = StoredFile::Insert($values, false);
     // Clear the schedule table
     $sql = "DELETE FROM " . $CC_CONFIG["scheduleTable"];
     $CC_DBC->query($sql);
     // Create a playlist
     $playlist = new Playlist();
     $playlist->create("Scheduler Unit Test");
     $result = $playlist->addAudioClip($this->storedFile->getId());
     $result = $playlist->addAudioClip($this->storedFile2->getId());
     $result = $playlist->addAudioClip($this->storedFile2->getId());
     // Schedule it
     $i = new ScheduleGroup();
     $this->groupIdCreated = $i->add('2010-11-11 01:30:23', null, $playlist->getId());
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:25,代码来源:SchedulerExportTests.php

示例3: newAction

 public function newAction()
 {
     $pl_sess = $this->pl_sess;
     $userInfo = Zend_Auth::getInstance()->getStorage()->read();
     $pl = new Playlist();
     $pl->create("Untitled Playlist");
     $pl->setPLMetaData('dc:creator', $userInfo->login);
     $this->changePlaylist($pl->getId());
     $form = new Application_Form_PlaylistMetadata();
     $this->view->fieldset = $form;
     $this->view->form = $this->view->render('playlist/new.phtml');
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:12,代码来源:PlaylistController.php

示例4: executeCreate

 public function executeCreate(sfWebRequest $request)
 {
     $playlist = Doctrine::getTable('Playlist')->findOneByTitle($request->getPostParameter("title"));
     if ($playlist == NULL) {
         $playlist = new Playlist();
         $playlist->title = $request->getPostParameter("title");
         $playlist->save();
         echo $playlist->getId();
     } else {
         echo 'error';
     }
     exit;
 }
开发者ID:nass600,项目名称:homeCENTER,代码行数:13,代码来源:actions.class.php

示例5: addPlaylist

 /**
  * Add a playlist
  *
  * @param playlist_name     str: new playlist name
  * @param scan_id           int: the scan id for a service scanner
  * @param service_name      str: the name of the service this playlist comes from eg.itunes
  * @param service_unique_id str: any metadata key string to make the playlist more unique
  * @return                  int: insert row id
  */
 public function addPlaylist($playlist_name, $scan_id = 0, $service_name = null, $service_unique_id = null)
 {
     $playlist = new Playlist();
     if ($scan_id > 0) {
         $playlist->scan_id = (int) $scan_id;
     }
     if (strlen($service_name) > 0) {
         $playlist->service_name = $service_name;
     }
     if (strlen($service_unique_id) > 0) {
         $playlist->service_unique_id = $service_unique_id;
     }
     $playlist->name = $playlist_name;
     $playlist->mtime = time();
     $playlist->save();
     $id = $playlist->getId();
     $playlist->free();
     unset($playlist);
     return (int) $id;
 }
开发者ID:Alenpiera,项目名称:streeme,代码行数:29,代码来源:PlaylistTable.class.php

示例6: getPlaylistId

 public function getPlaylistId()
 {
     return $this->playlist != null ? $this->playlist->getId() : null;
 }
开发者ID:radioCKUT,项目名称:digital-logsheets,代码行数:4,代码来源:Episode.php


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