Class ID3v1

Description

This class represents a file containing ID3v1 headers as described in The ID3-Tag Specification Appendix.

Located in /ID3v1.php (line 54)


	
			
Variable Summary
static Array $genres
Method Summary
ID3v1 __construct ([string $filename = false])
string getAlbum ()
string getArtist ()
string getComment ()
string getGenre ()
string getTitle ()
integer getTrack ()
string getYear ()
void setAlbum (string $album)
void setArtist (string $artist)
void setComment (string $comment)
void setGenre (integer $genre)
void setTitle (string $title)
void setTrack (integer $track)
void setYear (string $year)
void write ([string $filename = false])
mixed __get (string $name)
mixed __set (string $name, string $value)
Variables
static Array $genres = array
("Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
"Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
"Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
"Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient",
"Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
"Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise",
"AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative",
"Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave",
"Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream",
"Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap",
"Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave",
"Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal",
"Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll",
"Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion",
"Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock",
"Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour",
"Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony",
"Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club",
"Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul",
"Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House",
"Dance Hall", 255 => "Unknown")
(line 82)

The genre list.

  • access: public
Methods
Constructor __construct (line 119)

Constructs the ID3v1 class with given file. The file is not mandatory argument and may be omitted. A new tag can be written to a file also by giving the filename to the #write method of this class.

  • access: public
ID3v1 __construct ([string $filename = false])
  • string $filename: The path to the file.
getAlbum (line 186)

Returns the album field.

  • access: public
string getAlbum ()
getArtist (line 171)

Returns the artist field.

  • access: public
string getArtist ()
getComment (line 216)

Returns the comment field.

  • access: public
string getComment ()
getGenre (line 248)

Returns the genre.

  • access: public
string getGenre ()
getTitle (line 156)

Returns the title field.

  • access: public
string getTitle ()
getTrack (line 232)

Returns the track field.

  • since: ID3v1.1
  • access: public
integer getTrack ()
getYear (line 201)

Returns the year field.

  • access: public
string getYear ()
setAlbum (line 194)

Sets a new value for the album field. The field cannot exceed 30 characters in length.

  • access: public
void setAlbum (string $album)
  • string $album: The album.
setArtist (line 179)

Sets a new value for the artist field. The field cannot exceed 30 characters in length.

  • access: public
void setArtist (string $artist)
  • string $artist: The artist.
setComment (line 224)

Sets a new value for the comment field. The field cannot exceed 30 characters in length.

  • access: public
void setComment (string $comment)
  • string $comment: The comment.
setGenre (line 265)

Sets a new value for the genre field. The value may either be a numerical code representing one of the genres, or its string variant.

The genre is set to unknown (code 255) in case the string is not found from the static $genres array of this class.

  • access: public
void setGenre (integer $genre)
  • integer $genre: The genre.
setTitle (line 164)

Sets a new value for the title field. The field cannot exceed 30 characters in length.

  • access: public
void setTitle (string $title)
  • string $title: The title.
setTrack (line 241)

Sets a new value for the track field. By setting this field you enforce the 1.1 version to be used.

  • since: ID3v1.1
  • access: public
void setTrack (integer $track)
  • integer $track: The track number.
setYear (line 209)

Sets a new value for the year field. The field cannot exceed 4 characters in length.

  • access: public
void setYear (string $year)
  • string $year: The year.
write (line 282)

Writes the possibly altered ID3v1 tag back to the file where it was read.

If the class was constructed without a file name, one can be provided here as an argument. Regardless, the write operation will override previous tag information, if found.

  • access: public
void write ([string $filename = false])
  • string $filename: The optional path to the file.
__get (line 303)

Magic function so that $obj->value will work.

  • access: public
mixed __get (string $name)
  • string $name: The field name.
__set (line 317)

Magic function so that assignments with $obj->value will work.

  • access: public
mixed __set (string $name, string $value)
  • string $name: The field name.
  • string $value: The field value.

Documentation generated on Tue, 15 Apr 2008 03:33:10 +0300 by phpDocumentor 1.4.1