Artist
in package
Artist class
Table of Contents
- $id : string
- $name : string
- $picture : string
- $songs : array<string|int, mixed>
- __construct() : mixed
- addSong() : void
- Add song to song list
- getId() : string
- Get Spotify ID
- getName() : string
- Get artist's name
- getNumberOfTracks() : int
- Get number of tracks by artist
- getPicture() : string
- Get artist's picture
- getTracks() : array<string|int, Track>
- Get tracks
- removeSong() : void
- Remove song from song list
Properties
$id
private
string
$id
Artist spotify ID
$name
private
string
$name
Artist name
$picture
private
string
$picture
Artist picture
$songs
private
array<string|int, mixed>
$songs
= []
Artist songs
Methods
__construct()
public
__construct(string $id, string $name, string $picture[, array<string|int, mixed>|null $songs = null ]) : mixed
Parameters
- $id : string
- $name : string
- $picture : string
- $songs : array<string|int, mixed>|null = null
Return values
mixed —addSong()
Add song to song list
public
addSong(Track $track) : void
Parameters
- $track : Track
Return values
void —getId()
Get Spotify ID
public
getId() : string
Return values
string —getName()
Get artist's name
public
getName() : string
Return values
string —getNumberOfTracks()
Get number of tracks by artist
public
getNumberOfTracks() : int
Return values
int —getPicture()
Get artist's picture
public
getPicture() : string
Return values
string —getTracks()
Get tracks
public
getTracks() : array<string|int, Track>
Return values
array<string|int, Track> —removeSong()
Remove song from song list
public
removeSong(Track $track) : void
Parameters
- $track : Track