PHP Class duncan3dc\Sonos\State

Inheritance: extends duncan3dc\Sonos\Tracks\Track
Datei anzeigen Open project: duncan3dc/sonos Class Usage Examples

Public Properties

Property Type Description
$duration string The duration of the currently active track (hh:mm:ss).
$position string The position of the currently active track (hh:mm:ss).
$queueNumber integer The zero-based number of the track in the queue.
$stream string | null The name of the stream currently currently playing (or null if we are not on a stream).
$trackNumber integer The number of the track on it's album.

Public Methods

Method Description
__construct ( $uri = null ) Create a Track object.
createFromXml ( duncan3dc\DomParser\XmlElement $xml, Controller $controller ) : static Update the track properties using an xml element.

Method Details

__construct() public method

Create a Track object.
public __construct ( $uri = null )

createFromXml() public static method

Update the track properties using an xml element.
public static createFromXml ( duncan3dc\DomParser\XmlElement $xml, Controller $controller ) : static
$xml duncan3dc\DomParser\XmlElement The xml element representing the track meta data.
$controller Controller A controller instance on the playlist's network
return static

Property Details

$duration public_oe property

The duration of the currently active track (hh:mm:ss).
public string $duration
return string

$position public_oe property

The position of the currently active track (hh:mm:ss).
public string $position
return string

$queueNumber public_oe property

The zero-based number of the track in the queue.
public int $queueNumber
return integer

$stream public_oe property

The name of the stream currently currently playing (or null if we are not on a stream).
public string|null $stream
return string | null

$trackNumber public_oe property

The number of the track on it's album.
public int $trackNumber
return integer