\duncan3dc\Sonos\InterfacesQueueInterface

Provides an interface for managing the queue of a controller.

Summary

Methods
Constants
getTracks()
addTrack()
addTracks()
removeTrack()
removeTracks()
clear()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getTracks()

getTracks(integer  $start, integer  $total) : array<mixed,\duncan3dc\Sonos\Interfaces\TrackInterface>

Get tracks from the queue.

Parameters

integer $start

The zero-based position in the queue to start from

integer $total

The maximum number of tracks to return

Returns

array<mixed,\duncan3dc\Sonos\Interfaces\TrackInterface>

addTrack()

addTrack(string|\duncan3dc\Sonos\Interfaces\UriInterface  $track, integer  $position = null) : \duncan3dc\Sonos\Interfaces\QueueInterface

Add a track to the queue.

Parameters

string|\duncan3dc\Sonos\Interfaces\UriInterface $track

The URI of the track to add, or an object that implements the UriInterface

integer $position

The position to insert the track in the queue (zero-based), by default the track will be added to the end of the queue

Returns

\duncan3dc\Sonos\Interfaces\QueueInterface

addTracks()

addTracks(array<mixed,string>|array<mixed,\duncan3dc\Sonos\Interfaces\UriInterface>  $tracks, integer  $position = null) : \duncan3dc\Sonos\Interfaces\QueueInterface

Add tracks to the queue.

Parameters

array<mixed,string>|array<mixed,\duncan3dc\Sonos\Interfaces\UriInterface> $tracks

An array where each element is either the URI of the tracks to add, or an object that implements the UriInterface

integer $position

The position to insert the tracks in the queue (zero-based), by default the tracks will be added to the end of the queue

Returns

\duncan3dc\Sonos\Interfaces\QueueInterface

removeTrack()

removeTrack(integer  $position) : boolean

Remove a track from the queue.

Parameters

integer $position

The zero-based position of the track to remove

Returns

boolean

removeTracks()

removeTracks(array<mixed,integer>  $positions) : boolean

Remove tracks from the queue.

Parameters

array<mixed,integer> $positions

The zero-based positions of the tracks to remove

Returns

boolean