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


PHP Playlist::getName方法代码示例

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


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

示例1: showPlaylistItem

 private function showPlaylistItem(Playlist $item)
 {
     $donwloadLink = 'index.php?web&action=' . ViewPlaylistWebPageAction::getActionName() . '&subaction=' . ViewPlaylistWebPageAction::SUBACTION_PLAYLIST_DOWNLOAD . '&download=' . base64_encode($item->getFilename()) . '&PHPSESID=' . session_id();
     $itemLink = 'index.php?web&action=' . ViewPlaylistWebPageAction::getActionName() . '&subaction=' . ViewPlaylistWebPageAction::SUBACTION_PLAYLIST_OPEN . '&playlist=' . base64_encode($item->getFilename()) . '&PHPSESID=' . session_id();
     $deleteLink = 'index.php?web&action=' . ViewPlaylistWebPageAction::getActionName() . '&subaction=' . ViewPlaylistWebPageAction::SUBACTION_PLAYLIST_DELETE . '&path=' . base64_encode($item->getFilename()) . '&PHPSESID=' . session_id();
     $itemName = $item->getName() != null ? $item->getName() . " (" . utf8_decode($item->getFilename()) . ")" : utf8_decode($item->getFilename());
     echo '      <td width="24px"><img width="22px" height="22px" src="../resources/playlist/video.png" style="border:0px;" /></td>' . "\n";
     echo '      <td><a href="' . $itemLink . '">' . htmlentities($itemName) . '</a></td>' . "\n";
     echo '      <td width="24px"><a href="' . $donwloadLink . '" target="_blank"><img width="22px" height="22px" src="../resources/playlist/video_down.png" style="border:0px;" alt="Donwload Playlist" title="Donwload Playlist" /></a></td>' . "\n";
     echo '      <td width="24px"><a href="' . $itemLink . '"><img width="22px" height="22px" src="../resources/playlist/view.png" style="border:0px;" alt="Open Playlist" title="Open Playlist" /></a></td>' . "\n";
     echo '      <td width="24px"><img width="22px" height="22px" src="../resources/playlist/edit.png" style="border:0px;" alt="Edit Playlist" title="Edit Playlist" /></td>' . "\n";
     echo '      <td width="24px"><a href="' . $deleteLink . '"><img width="22px" height="22px" src="../resources/playlist/remove.png" style="border:0px;" alt="Remove Playlist" title="Remove Playlist"
         onclick="return confirm(\'Are you sure to delete playlist ' . htmlentities(utf8_decode($item->getFilename())) . '?\');" /></a></td>' . "\n";
 }
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:14,代码来源:PlaylistExploreWebTemplate.php

示例2: getPlaylistItem

 /**
  * Get bookmark rss link.
  */
 private function getPlaylistItem(Playlist $link, $itemid)
 {
     $itemLink = SERVER_HOST_AND_PATH . 'php/index.php?action=' . ViewPlaylistPageAction::getActionName() . URL_AMP . 'subaction=' . ViewPlaylistPageAction::SUBACTION_PLAYLIST_OPEN . URL_AMP . 'playlist=' . base64_encode($link->getFilename()) . URL_AMP . 'PHPSESID=' . session_id();
     $itemName = $link->getName() != null ? $link->getName() . " (" . $link->getFilename() . ")" : $link->getFilename();
     return '<item>' . "\n" . '   <title><![CDATA[' . $itemName . ']]></title>' . "\n" . '   <description><![CDATA[' . $link->getDescription() . ']]></description>' . "\n" . '   <link>' . $itemLink . '</link>' . "\n" . '   <image>' . XTREAMER_IMAGE_PATH . 'playlist/video.png</image>' . "\n" . '   <itemid>' . $itemid . '</itemid>' . "\n" . '</item>' . "\n";
 }
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:9,代码来源:PlaylistFolderTemplate.php

示例3: setPlaylist

 public function setPlaylist(Playlist $playlist)
 {
     $this->playlist = $playlist;
     $this->title = $playlist->getName();
     $this->description = $playlist->getDescription();
 }
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:6,代码来源:PlaylistTemplate.php

示例4: savePlaylist

 /**
  * Create playlist xml document and save to file.
  * @param $file     Ruta al archivo
  * @param $playlist Playlist.
  */
 private function savePlaylist($file, Playlist $playlist)
 {
     //Save to xml
     $simpleXml = new SimpleXmlElement('<?xml version="1.0" encoding="UTF-8"?><playlist name="' . utf8_encode($playlist->getName()) . '" description="' . utf8_encode($playlist->getDescription()) . '"></playlist>');
     $count = 1;
     foreach ($playlist->getPlaylistLinks() as $key => $playlistLink) {
         $element = $simpleXml->addChild("xfile");
         $element->addAttribute("key", $playlistLink->getKey());
         if ($playlistLink->getType() != null) {
             $element->addAttribute("type", $playlistLink->getType());
         } else {
             $element->addAttribute("type", $count);
             ++$count;
         }
         if ($playlistLink->getThumbnail() != null) {
             $element->addAttribute("thumbnail", $playlistLink->getThumbnail());
         }
         if ($playlistLink->getTitle() != null) {
             $element->addChild("title", "<![CDATA[" . $playlistLink->getTitle() . "]]>");
         }
         if ($playlistLink->getDescription() != null) {
             $element->addChild("description", "<![CDATA[" . $playlistLink->getDescription() . "]]>");
         }
         if ($playlistLink->getLink() != null) {
             $element->addChild("link", "<![CDATA[" . $playlistLink->getLink() . "]]>");
         }
         if ($playlistLink->getFormat() != null) {
             $element->addChild("format", "<![CDATA[" . $playlistLink->getFormat() . "]]>");
         }
         if ($playlistLink->getLanguage() != null) {
             $element->addChild("language", "<![CDATA[" . $playlistLink->getLanguage() . "]]>");
         }
         if (count($playlistLink->getIds()) > 0) {
             $elementId = $element->addChild("part");
             foreach ($playlistLink->getIds() as $order => $idValue) {
                 $temp = $elementId->addChild("id", $idValue);
                 $temp->addAttribute("order", $order);
             }
         }
     }
     $fp = fopen($file, 'w');
     fwrite($fp, html_entity_decode($this->xmlpp($simpleXml->asXML(), false)));
     fclose($fp);
 }
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:49,代码来源:ViewPlaylistWebPageAction.php


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