\duncan3dc\Sonos\TracksTrack

Representation of a track.

Summary

Methods
Properties
Constants
__construct()
getUri()
getMetaData()
setTitle()
getTitle()
setArtist()
getArtist()
setAlbum()
getAlbum()
setNumber()
getNumber()
setAlbumArt()
getAlbumArt()
createFromXml()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$uri
$title
$artist
$album
$number
$albumArt
$itemId
N/A

Properties

$uri

$uri : string

Type

string — The uri of the track.

$title

$title : string

Type

string — The name of the track.

$artist

$artist : string

Type

string — The name of the artist of the track.

$album

$album : string

Type

string — The name of the album of the track.

$number

$number : integer

Type

integer — The number of the track.

$albumArt

$albumArt : string

Type

string — The full path to the album art for this track.

$itemId

$itemId : string

Type

string — The id of the item.

Methods

__construct()

__construct(string  $uri) 

Create a Track object.

Parameters

string $uri

The URI of the track

getUri()

getUri() : string

Get the URI for this track.

Returns

string

getMetaData()

getMetaData() : string

Get the metadata xml for this track.

Returns

string

setTitle()

setTitle(string  $title) : $this

Set the name of the track.

Parameters

string $title

The title of the track

Returns

$this

getTitle()

getTitle() : string

Get the name of the track.

Returns

string

setArtist()

setArtist(string  $artist) : $this

Set the artist of the track.

Parameters

string $artist

The artist of the track

Returns

$this

getArtist()

getArtist() : string

Get the name of the artist of the track.

Returns

string

setAlbum()

setAlbum(string  $album) : $this

Set the album of the track.

Parameters

string $album

The album of the track

Returns

$this

getAlbum()

getAlbum() : string

Get the name of the album of the track.

Returns

string

setNumber()

setNumber(integer  $number) : $this

Set the number of the track.

Parameters

integer $number

The number of the track

Returns

$this

getNumber()

getNumber() : integer

Get the track number.

Returns

integer

setAlbumArt()

setAlbumArt(string  $albumArt) : $this

Set the album art of the track.

Parameters

string $albumArt

The albumArt of the track

Returns

$this

getAlbumArt()

getAlbumArt() : string

Returns

string

createFromXml()

createFromXml(\duncan3dc\DomParser\XmlElement  $xml, \duncan3dc\Sonos\Interfaces\ControllerInterface  $controller) : static

Update the track properties using an xml element.

Parameters

\duncan3dc\DomParser\XmlElement $xml

The xml element representing the track meta data

\duncan3dc\Sonos\Interfaces\ControllerInterface $controller

A controller instance to communicate with

Returns

static