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

Class: Stats

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

Class Overview


Stats this class handles the object_count Stuff, before this was done in the user class but that's not good, all done through here.


Variables

Methods



Class Details

[line 28]
Stats this class handles the object_count Stuff, before this was done in the user class but that's not good, all done through here.



[ Top ]


Class Variables

$date =

[line 34]


Type:   mixed


[ Top ]

$id =

[line 31]


Type:   mixed


[ Top ]

$object_id =

[line 33]


Type:   mixed


[ Top ]

$object_type =

[line 32]


Type:   mixed


[ Top ]

$user =

[line 35]


Type:   mixed


[ Top ]



Class Methods


static method get_last_song [line 77]

static void get_last_song( [ $user_id = ''])

get_last_song

This returns the full data for the last song that was played, including when it was played, this is used by, among other things, the LastFM plugin to figure out if we should re-submit or if this is a duplicate / if it's too soon. This takes an optional user_id because when streaming we don't have $GLOBALS()




Tags:

access:  public


Parameters:

   $user_id  

[ Top ]

static method get_newest [line 221]

static void get_newest( $type, [ $limit = ''])

get_newest

This returns an array of the newest artists/albums/whatever in this ampache instance




Tags:

access:  public


Parameters:

   $type  
   $limit  

[ Top ]

static method get_object_history [line 97]

static void get_object_history( [ $user_id = ''], $time)

get_object_history

This returns the objects that have happened for $user_id sometime after $time used primarly by the democratic cooldown code




Tags:

access:  public


Parameters:

   $user_id  
   $time  

[ Top ]

static method get_top [line 124]

static void get_top( $type, [ $count = ''], [ $threshold = ''])

get_top

This returns the top X for type Y from the last conf('stats_threshold') days




Tags:

access:  public


Parameters:

   $type  
   $count  
   $threshold  

[ Top ]

static method get_user [line 160]

static void get_user( $count, $type, $user, [ $full = ''])

get_user

This gets all stats for atype based on user with thresholds and all If full is passed, doesn't limit based on date




Tags:

access:  public


Parameters:

   $count  
   $type  
   $user  
   $full  

[ Top ]

static method insert [line 53]

static void insert( $type, $oid, $user)

insert

This inserts a new record for the specified object with the specified information, amazing!




Tags:

access:  public


Parameters:

   $type  
   $oid  
   $user  

[ Top ]

static method validate_type [line 196]

static void validate_type( $type)

validate_type

This function takes a type and returns only those which are allowed, ensures good data gets put into the db




Tags:

access:  public


Parameters:

   $type  

[ Top ]

constructor __construct [line 42]

Stats __construct( )

Constructor

This doesn't do anything currently




Tags:

access:  public


[ Top ]


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