MB_Track Class Reference

Track class. More...

List of all members.

Public Member Functions

 new ()
 Constructor.
MB_PUID getPUIDs (@args)
 Get PUID(s) attached to this track.
MB_TRM getTRMs (@args)
 Get TRM(s) attached to this track.

Public Attributes

 id
 Unique ID to identify a single track.
 artist
 The artist that the track belongs to. This matches artist.id.
 name
 Track name (title).
 gid
 GID, this field is a 36 digit (32 hexidecimal digits + 4 x '-') and is unique to every table.
 length
 Length of the track (in milliseconds). Divide by 1000 to get time in seconds.
 year
 Year.
 modpending
 1 if there is an edit pending on this track, other wise 0


Detailed Description

Track class.

Class for holding release information.


Member Function Documentation

MB_Track::new (  ) 

Constructor.

Construct new MB_Track object;

  $track = MB_Track->new;

MB_PUID MB_Track::getPUIDs ( args  ) 

Get PUID(s) attached to this track.

  use MB_MySQL;

  $mb = MB_MySQL->new;

  $mb->connect('root', 'pass');

  $track = $mb->getTrack(id => 2943025);
  @puids = $track->getPUIDs();

  foreach $puid (@puids) {
    print $puid->puid . " (" . $puid->lookupcount . ")\n";
  }

Available filters:
limit - Eg. limit => 10

MB_TRM MB_Track::getTRMs ( args  ) 

Get TRM(s) attached to this track.

  use MB_MySQL;

  $mb = MB_MySQL->new;

  $mb->connect('root', 'pass');

  $track = $mb->getTrack(id => 2943025);
  @trms = $track->getTRMs();

  foreach $trm (@trms) {
    print $trm->trm . " (" . $trm->lookupcount . ")\n";
  }

Available filters:
limit - Eg. limit => 10

By default, the TRMs are returned sorted by lookupcount where the highest lookupcount is at the top.


Member Data Documentation

MB_Track::id

Unique ID to identify a single track.

MB_Track::artist

The artist that the track belongs to. This matches artist.id.

MB_Track::name

Track name (title).

MB_Track::gid

GID, this field is a 36 digit (32 hexidecimal digits + 4 x '-') and is unique to every table.

MB_Track::length

Length of the track (in milliseconds). Divide by 1000 to get time in seconds.

MB_Track::year

Year.

MB_Track::modpending

1 if there is an edit pending on this track, other wise 0


The documentation for this class was generated from the following file:
Generated on Tue Jan 30 15:04:38 2007 for MB_MySQL by  doxygen 1.5.1-p1