MP3_Playlist
[ class tree: MP3_Playlist ] [ index: MP3_Playlist ] [ all elements ]

Class: MP3_Playlist

Source Location: /MP3_Playlist-0.5.0alpha1/MP3/Playlist.php

Class Overview


Class MP3_Playlist


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • Copyright (c) 2004-2005 David Costa

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 84]
Class MP3_Playlist

A playlist can be used for both local use and remote streaming.

The m3u playlist format is supported by Winamp, XMMS, Noatunes and several other players.

The Smil playlist format is supported by Real Media Player, Quicktime and others XHTML allows you to display a fully formatted page or just the tables to be included in your own template.

RSS allows you to syndicate the playlist on the fly. The Sqlite function allows you to backup the list in an existing sqlite database or to create a database and the table on the fly.



[ Top ]


Class Variables

$debug =  false

[line 158]

Debug value
  • Access: public

Type:   string


[ Top ]

$drivers = array(
        'm3u'   => array(
            'file'  => 'M3U.php',
            'class' => 'MP3_Playlist_M3U'
        ),'smil'=>array('file'=>'SMIL.php','class'=>'MP3_Playlist_SMIL'),'xml'=>array('file'=>'XML.php','class'=>'MP3_Playlist_XML'),'xhtml'=>array('file'=>'XHTML.php','class'=>'MP3_Playlist_XHTML'),'rss'=>array('file'=>'RSS.php','class'=>'MP3_Playlist_RSS'),'sqlite'=>array('file'=>'SQLite.php','class'=>'MP3_Playlist_SQLite'))

[line 119]

  • Access: public

Type:   mixed


[ Top ]

$fileName =  'playlist'

[line 152]

Name of the playlist. suffix is added automatically as per method used
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 226]

TRUE|PEAR_Error __construct( string $dir, string $outdir, string $baseurl, [bool $debug = false])

Instantiate a new MP3_Playlist object.

Expects a reading directory, the output directory where the playlist will be saved and the directory or URL to be used within the playlist.


Parameters:

string   $dir   —  The directory to scan
string   $outdir   —  The directory where to save the playlist file
string   $baseurl   —  The base url to append on the playlist file
bool   $debug   —  (optional) Whether print debug message or not, default FALSE

[ Top ]

fixPath   [line 284]

string fixPath( string $dir)

Convert Windows directory separator to Unix style and fix ending slash.
  • Return: result.
  • Access: public

Parameters:

string   $dir   —  Directory.

[ Top ]

getList   [line 465]

array getList( )

Get list of songs in an array, formatted after parsing.
  • Access: public

[ Top ]

getMerged   [line 480]

array getMerged( )

Get list of files including append directory, location and ID3 tags for XML and other manipulation.
  • See: MP3_Playlist::mergeList()
  • Access: public

[ Top ]

make   [line 520]

bool make( string $type, [array $params = array()], [bool $shuffle = false])

Generates the playlist according to selected format.

Parameters:

string   $type   —  Format type, use one of constants
 MP3_Playlist::TYPE_M3U       M3U playlist
 MP3_Playlist::TYPE_SMILL     SMILL playlist
 MP3_Playlist::TYPE_XML       XML format
 MP3_Playlist::TYPE_XHTML     XHTML output
 MP3_Playlist::TYPE_RSS       RSS output
 MP3_Playlist::TYPE_SQLITE    Save to SQLite database
array   $params   —  (optional) Parameters, an associative array contains values depend on the format.
bool   $shuffle   —  (optional) Whether to shuffle the list or not. This parameter only affect on formats M3U, SMILL and XHTML

[ Top ]

save   [line 545]

bool save( )

Save the generated playlist into file.

[ Top ]

send   [line 564]

bool send( )

Send the generated playlist to browser directly.

[ Top ]

show   [line 582]

void show( )

Show the generated playlist result

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:15:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.