Tidal
extends Track
in package
Representation of a track.
Table of Contents
Constants
- PREFIX : mixed = "x-sonos-http:" . self::UNIQUE
- SERVICE : mixed = "174"
- TRACK_HASH : mixed = "10036028track%2f"
- UNIQUE : mixed = "track"
Methods
- __construct() : mixed
- Create a Track object.
- createFromXml() : static
- Update the track properties using an xml element.
- fromId() : self
- getAlbum() : string
- Get the name of the album of the track.
- getAlbumArt() : string
- Get the full path to the album art for this track.
- getArtist() : string
- Get the name of the artist of the track.
- getMetaData() : string
- Get the metadata xml for this track.
- getNumber() : int
- Get the track number.
- getTitle() : string
- Get the name of the track.
- getUri() : string
- Get the URI for this track.
- setAlbum() : $this
- Set the album of the track.
- setAlbumArt() : $this
- Set the album art of the track.
- setArtist() : $this
- Set the artist of the track.
- setNumber() : $this
- Set the number of the track.
- setTitle() : $this
- Set the name of the track.
Constants
PREFIX
public
mixed
PREFIX
= "x-sonos-http:" . self::UNIQUE
SERVICE
private
mixed
SERVICE
= "174"
TRACK_HASH
private
mixed
TRACK_HASH
= "10036028track%2f"
UNIQUE
private
mixed
UNIQUE
= "track"
Methods
__construct()
Create a Track object.
public
__construct(string $uri) : mixed
Parameters
- $uri : string
-
The URI of the track or the Tidal ID of the track
createFromXml()
Update the track properties using an xml element.
public
static createFromXml(ElementInterface $xml, ControllerInterface $controller) : static
Parameters
- $xml : ElementInterface
-
The xml element representing the track meta data
- $controller : ControllerInterface
-
A controller instance to communicate with
Return values
staticfromId()
public
static fromId(string $id[, int $account = 1 ]) : self
Parameters
- $id : string
- $account : int = 1
Return values
selfgetAlbum()
Get the name of the album of the track.
public
getAlbum() : string
Return values
stringgetAlbumArt()
Get the full path to the album art for this track.
public
getAlbumArt() : string
Return values
string —The full path to the album art for this track.
getArtist()
Get the name of the artist of the track.
public
getArtist() : string
Return values
stringgetMetaData()
Get the metadata xml for this track.
public
getMetaData() : string
Return values
stringgetNumber()
Get the track number.
public
getNumber() : int
Return values
intgetTitle()
Get the name of the track.
public
getTitle() : string
Return values
stringgetUri()
Get the URI for this track.
public
getUri() : string
Return values
stringsetAlbum()
Set the album of the track.
public
setAlbum(string $album) : $this
Parameters
- $album : string
-
The album of the track
Return values
$thissetAlbumArt()
Set the album art of the track.
public
setAlbumArt(string $albumArt) : $this
Parameters
- $albumArt : string
-
The albumArt of the track
Return values
$thissetArtist()
Set the artist of the track.
public
setArtist(string $artist) : $this
Parameters
- $artist : string
-
The artist of the track
Return values
$thissetNumber()
Set the number of the track.
public
setNumber(int $number) : $this
Parameters
- $number : int
-
The number of the track
Return values
$thissetTitle()
Set the name of the track.
public
setTitle(string $title) : $this
Parameters
- $title : string
-
The title of the track