MB_Release Class Reference

Release class. More...

List of all members.

Public Member Functions

 new ()
 Constructor.
MB_Track getTracks (@filter)
 Get tracks attached to this release.

Public Attributes

 id
 Unique ID to identify a single release.
 artist
 The artist that the release belongs to. This matches artist.id.
 name
 Release name (title).
 gid
 GID, this field is a 36 digit (32 hexidecimal digits + 4 x '-') and is unique to every table.
 modpending
 1 if there is an edit pending on this release, other wise 0
 attributes
 Album attributes.
 page
 Page?
 language
 Language.
 script
 Script.
 modpending_lang
 ?


Detailed Description

Release class.

Class for holding release information.


Member Function Documentation

MB_Release::new (  ) 

Constructor.

Construct new MB_Release object;

$release = MB_Release->new;

MB_Track MB_Release::getTracks ( filter  ) 

Get tracks attached to this release.

  use MB_MySQL;

  $mb = MB_MySQL->new;

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

  $release = $mb->getRelease(id => 507231);
  @tracks = $release->getTracks();

  foreach $track (@tracks) {
    print $track->id . " " . $track->name . "\n";
  }

Available filters:
limit - Eg. limit => 10


Member Data Documentation

MB_Release::id

Unique ID to identify a single release.

MB_Release::artist

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

MB_Release::name

Release name (title).

MB_Release::gid

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

MB_Release::modpending

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

MB_Release::attributes

Album attributes.

Array of atrributes for a release. Contains information about the type and status of a release.

    @attrs = $release->attributes;
$attrs[0]: ?

$attrs[1]: Release type. See REL_TYPE

$attrs[2]: Release status. See REL_STATUS

Example:

    if($release->attributes->[1] == $REL_TYPE{'EP'}) {
      # is EP
    }

MB_Release::page

Page?

MB_Release::language

Language.

Language. See ::languages

MB_Release::script

Script.

Script. See ::scripts

MB_Release::modpending_lang

?


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