Свойство | Тип | Описание | |
---|---|---|---|
$controller | The Controller instance this queue is for. | ||
$id | string | The unique id of the queue. | |
$trackFactory | A factory to create tracks from. | ||
$updateId | The current update id to be issued with upnp requests. |
Метод | Описание | |
---|---|---|
__construct ( |
Create an instance of the Queue class. | |
addTrack ( string | duncan3dc\Sonos\Tracks\UriInterface $track, integer $position = null ) : boolean | Add a track to the queue. | |
addTracks ( array $tracks, integer $position = null ) : boolean | Add tracks to the queue. | |
clear ( ) : static | Remove all tracks from the queue. | |
count ( ) : integer | The the number of tracks in the queue. | |
getTracks ( integer $start, integer $total ) : duncan3dc\Sonos\Tracks\Track[] | Get tracks from the queue. | |
removeTrack ( integer $position ) : boolean | Remove a track from the queue. | |
removeTracks ( array $positions ) : boolean | Remove tracks from the queue. |
Метод | Описание | |
---|---|---|
addUris ( array $tracks, integer $position = null ) : boolean | Add multiple uris to the queue. | |
browse ( string $type, integer $start, integer $limit = 1 ) : mixed | Send a browse request to the controller to get queue info. | |
getNextPosition ( ) : integer | Calculate the position number to be used to add a track to the end of the queue. | |
getUpdateId ( ) : integer | Get the next update id, or used the previously cached one. | |
soap ( string $service, string $action, array $params = [] ) : mixed | Send a soap request to the controller for this queue. |
public __construct ( |
||
$controller | The Controller instance that this queue is for |
public addTrack ( string | duncan3dc\Sonos\Tracks\UriInterface $track, integer $position = null ) : boolean | ||
$track | string | duncan3dc\Sonos\Tracks\UriInterface | The URI of the track to add, or an object that implements the UriInterface |
$position | integer | The position to insert the track in the queue (zero-based), by default the track will be added to the end of the queue |
Результат | boolean |
public addTracks ( array $tracks, integer $position = null ) : boolean | ||
$tracks | array | An array where each element is either the URI of the tracks to add, or an object that implements the UriInterface |
$position | integer | The position to insert the tracks in the queue (zero-based), by default the tracks will be added to the end of the queue |
Результат | boolean |
public clear ( ) : static | ||
Результат | static |
protected getNextPosition ( ) : integer | ||
Результат | integer |
protected getUpdateId ( ) : integer | ||
Результат | integer |
public removeTrack ( integer $position ) : boolean | ||
$position | integer | The zero-based position of the track to remove |
Результат | boolean |
public removeTracks ( array $positions ) : boolean | ||
$positions | array | The zero-based positions of the tracks to remove |
Результат | boolean |
protected Controller,duncan3dc\Sonos $controller | ||
Результат |
protected Factory,duncan3dc\Sonos\Tracks $trackFactory | ||
Результат |