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

Class: tmpPlaylist

Source Location: /lib/class/tmpplaylist.class.php

Class Overview


TempPlaylist Class


Variables

Methods


Child classes:

Democratic
Democratic

Class Details

[line 28]
TempPlaylist Class

This class handles the temporary playlists in ampache, it handles the tmp_playlist and tmp_playlist_data tables, and sneaks out at night to visit user_vote from time to time




[ Top ]


Class Variables

$base_playlist =

[line 35]



Tags:

access:  public

Type:   mixed


[ Top ]

$id =

[line 31]



Tags:

access:  public

Type:   mixed


[ Top ]

$items = array()

[line 38]



Tags:

access:  public

Type:   mixed


[ Top ]

$object_type =

[line 34]



Tags:

access:  public

Type:   mixed


[ Top ]

$session =

[line 32]



Tags:

access:  public

Type:   mixed


[ Top ]

$type =

[line 33]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method create [line 204]

static void create( $sessid, $type, $object_type)

create

This function initializes a new tmpPlaylist it is assoicated with the current session rather then a user, as you could have same user multiple locations




Tags:

access:  public


Overridden in child classes as:

Democratic::create()
create

Parameters:

   $sessid  
   $type  
   $object_type  

[ Top ]

static method delete [line 250]

static void delete( $sessid, $id)

delete

This deletes any other tmp_playlists assoicated with this session




Tags:

access:  public


Overridden in child classes as:

Democratic::delete()
delete

Parameters:

   $sessid  
   $id  

[ Top ]

static method get_from_session [line 81]

static void get_from_session( $session_id)

get_from_session

This returns a playlist object based on the session that is passed to us this is used by the load_playlist on user for the most part




Tags:

access:  public


Parameters:

   $session_id  

[ Top ]

static method get_from_userid [line 105]

static void get_from_userid( $user_id)

get_from_userid

This returns a tmp playlist object based on a userid passed this is used for the user profiles page




Tags:

access:  public


Parameters:

   $user_id  

[ Top ]

static method prune_playlists [line 269]

static void prune_playlists( )

prune_playlists

This deletes and playlists that don't have an assoicated session




Tags:

access:  public


[ Top ]

static method prune_tracks [line 285]

static void prune_tracks( )

prune_tracks

This prunes tracks that don't have playlists or don't have votes




Tags:

access:  public


Overridden in child classes as:

Democratic::prune_tracks()
prune_tracks

[ Top ]

constructor __construct [line 45]

tmpPlaylist __construct( [ $playlist_id = ''])

Constructor

This takes a playlist_id as an optional argument and gathers the information if not playlist_id is passed returns false (or if it isn't found




Tags:

access:  public


Overridden in child classes as:

Democratic::__construct()
constructor

Parameters:

   $playlist_id  

[ Top ]

method add_object [line 300]

void add_object( $object_id, $object_type)

add_object

This adds the object of $this->object_type to this tmp playlist it takes an optional type, default is song




Tags:

access:  public


Parameters:

   $object_id  
   $object_type  

[ Top ]

method clear [line 190]

void clear( )

clear

This clears all the objects out of a single playlist




Tags:

access:  public


Overridden in child classes as:

Democratic::clear()
clear This is really just a wrapper function, it clears the entire playlist including all votes etc.

[ Top ]

method count_items [line 175]

void count_items( )

count_items

This returns a count of the total number of tracks that are in this tmp playlist




Tags:

access:  public


[ Top ]

method delete_track [line 350]

void delete_track( $id)

delete_track

This deletes a track from the tmpplaylist




Tags:

access:  public


Parameters:

   $id  

[ Top ]

method get_items [line 128]

void get_items( )

get_items

This returns an array of all object_ids currently in this tmpPlaylist. This has gotten a little more complicated because of type, the values are an array

  1. being ID 1 being TYPE




Tags:

access:  public


Overridden in child classes as:

Democratic::get_items()
get_items

[ Top ]

method get_next_object [line 156]

void get_next_object( )

get_next_object

This returns the next object in the tmp_playlist most of the time this will just be the top entry, but if there is a base_playlist and no items in the playlist then it returns a random entry from the base_playlist




Tags:

access:  public


Overridden in child classes as:

Democratic::get_next_object()
get_next_object

[ Top ]

method get_vote [line 318]

void get_vote( $object_id)

get_vote

This returns the current count for a specific song on this tmp_playlist




Tags:

access:  public


Parameters:

   $object_id  

[ Top ]

method update_playlist [line 233]

void update_playlist( $playlist_id)

update_playlist

This updates the base_playlist on this tmp_playlist




Tags:

access:  public


Parameters:

   $playlist_id  

[ Top ]

method vote_active [line 337]

void vote_active( )

vote_active

This checks to see if this playlist is a voting playlist and if it is active




Tags:

access:  public


[ Top ]


Documentation generated on Thu, 12 Feb 2009 08:00:11 +0900 by phpDocumentor 1.4.2