Class Media

Description

Represents some kind of media and provides common information.

Located in /src/Media.php (line 9)


	
			
Direct descendents
Class Description
Album Represents an album and provides different methods to query album information.
Artist Represents an artist and provides different methods to query artist information.
Track Represents a track and provides different methods to query track information.
User Represents a user and provides different methods to query user information.
Class Constant Summary
Method Summary
Media __construct (string $name, string $mbid, string $url,  $images, integer $listeners, integer $playCount)
string getImage (integer $size)
integer getListeners ()
string getMbid ()
string getName ()
integer getPlayCount ()
string getUrl ()
Methods
Constructor __construct (line 76)

Create a media object.

  • access: public
Media __construct (string $name, string $mbid, string $url,  $images, integer $listeners, integer $playCount)
  • string $name: Name for this medium.
  • string $mbid: MusicBrainz ID for this medium.
  • string $url: Last.fm URL for this medium.
  • array $images: An array of images of different sizes.
  • integer $listeners: Number of listeners for this medium.
  • integer $playCount: Play count of this medium.

Redefined in descendants as:
getImage (line 119)

Returns an image URL of the specified size of this medium.

  • return: An image URL.
  • access: public
string getImage (integer $size)
  • integer $size: Image size constant.
getListeners (line 128)

Returns the number of listeners of this medium.

  • return: Number of listeners.
  • access: public
integer getListeners ()
getMbid (line 100)

Returns the MusicBrainz ID of this medium.

  • return: MusicBrainz ID.
  • access: public
string getMbid ()
getName (line 91)

Returns the name of this medium.

  • return: The mediums name.
  • access: public
string getName ()
getPlayCount (line 137)

Returns the play count of this medium.

  • return: Play count.
  • access: public
integer getPlayCount ()
getUrl (line 109)

Returns the last.fm URL of this medium.

  • return: Last.fm URL.
  • access: public
string getUrl ()
Class Constants
IMAGE_EXTRALARGE = 4 (line 62)
IMAGE_HUGE = 3 (line 61)
IMAGE_LARGE = 2 (line 60)
IMAGE_MEDIUM = 1 (line 59)
IMAGE_ORIGINAL = 5 (line 63)
IMAGE_SMALL = 0 (line 58)
IMAGE_UNKNOWN = -1 (line 57)

Possible image sizes.

  • access: public

Documentation generated on Mon, 22 Dec 2008 16:57:39 +0100 by phpDocumentor 1.4.1