MelonSong
class MelonSong extends Melon implements SongInterface
Fetches information about a song from the melon.com API.
Properties
| int | $id | from Melon | |
| protected Client | $client | from Melon | |
| protected array | $response | from Melon |
Methods
Fetches information about a song, a album or a artist from the melon.com API and saves it to $response and returns it.
Class constructor.
Class factory to make Melon instance.
Infer the default image for Melon as null
Get the song ID.
Get the song title.
Get the album ID.
Get the artwork image path.
Details
at line 21
array
parse()
Fetches information about a song, a album or a artist from the melon.com API and saves it to $response and returns it.
in
Melon at line 38
__construct(int $id, Client|null $client = null, bool $autoParse = true)
Class constructor.
in
Melon at line 56
void
offsetSet(mixed $offset, mixed $value)
Setter for ArrayAccess.
in
Melon at line 68
bool
offsetExists(mixed $offset)
Whether an offset exists
in
Melon at line 76
void
offsetUnset(mixed $offset)
Unset an offset
in
Melon at line 84
mixed
offsetGet(mixed $offset)
Offset to retrieve
in
Melon at line 96
static Melon
make(int $id, Client|null $client = null, bool $autoParse = true)
Class factory to make Melon instance.
in
Melon at line 109
static string|null
emptyToNull(string|null $path)
Infer the default image for Melon as null
at line 62
int
getId()
Get the song ID.
at line 70
string
getTitle()
Get the song title.
at line 78
int
getAlbumId()
Get the album ID.
at line 86
string|null
getArtworkImagePath()
Get the artwork image path.