Class Artist

Description

The Artist object represents an artist.

Artists are identified usign a key, which is a normalized version of the artist name. For example, the key for Pink Floyd is pink_floyd.

Located in /music.php (line 586)


	
			
Variable Summary
string $key
string $name
Method Summary
Artist Artist (string $key)
Album get_album (string $album_key)
Album get_artist (string $key)
Song get_song (integer $track)
string itunes_link ()
string link ([string $text = NULL], [string $stuff = NULL])
string name ()
array tracks ()
array track_ids ()
Variables
string $key (line 591)

The primary key for the artist.

string $name (line 598)

The name of the artist. Use name() to make sure that the artist has been initialized.

Methods
Constructor Artist (line 635)

Creates an Artist object.

Don't call this constructor method directly; instead use:

Artist Artist (string $key)
  • string $key: the artist key
artwork (line 727)

Returns an Artwork object for the artist.

This will normally show the first album, either alphabetically or by year. A future version of iTunes Catalog will include support for "favorite" albums.

  • return: the artwork
Artwork artwork ()
get_album (line 774)

Returns an Album object for an album by the artist.

Album get_album (string $album_key)
  • string $album_key: the album key
get_artist (line 648)

Returns an Artist object.

This method uses caching to avoid creating multiple instances of the same album.

  • see: albums()
Album get_artist (string $key)
  • string $key: the artist key
get_song (line 802)

Returns a Song object for a song by the artist.

Song get_song (integer $track)
  • integer $track: the track id
itunes_link (line 833)

Returns a URL to search the iTunes Store for the artist.

  • return: a URL starting with itms://
string itunes_link ()
link (line 822)

Returns a hyperlink to show the artist.

If the link text is not specified, uses the artist name.

The link refers to the JavaScript function showArtist(), as found in the home.php and songs.php pages.

  • return: a link like <a href="javascript:showArtist('white_stripes');">The White Stripes</a>
  • see: hyperlink()
string link ([string $text = NULL], [string $stuff = NULL])
  • string $text: the text or image to be linked
  • string $stuff: extra attributes to be included in the tag
name (line 681)

The name of the artist.

  • return: the artist name
string name ()
tracks (line 738)

Returns an array of songs for the artist, sorted by album.

Sends add_time_and_size() to each of the songs.

  • return: an array of Songs, indexed by track id
array tracks ()
track_ids (line 757)

Returns an array of track ids for the artist.

  • return: an array of integers
array track_ids ()

Documentation generated on Sun, 12 Feb 2006 19:27:54 +0100 by phpDocumentor 1.2.3