$speakers
$speakers : array<mixed,\duncan3dc\Sonos\Speaker>|null
Provides methods to locate speakers/controllers/playlists on the current network.
$speakers : array<mixed,\duncan3dc\Sonos\Speaker>|null
$playlists : array<mixed,\duncan3dc\Sonos\Interfaces\PlaylistInterface>|null
$alarms : array<mixed,\duncan3dc\Sonos\Interfaces\AlarmInterface>|null
$collection : \duncan3dc\Sonos\Interfaces\Devices\CollectionInterface
__construct(\duncan3dc\Sonos\Interfaces\Devices\CollectionInterface $collection = null)
Create a new instance.
\duncan3dc\Sonos\Interfaces\Devices\CollectionInterface | $collection | The collection of devices on this network |
getSpeakers() : array<mixed,\duncan3dc\Sonos\Interfaces\SpeakerInterface>
Get all the speakers on the network.
getController() : \duncan3dc\Sonos\Interfaces\ControllerInterface
Get a Controller instance from the network.
Useful for managing playlists/alarms, as these need a controller but it doesn't matter which one.
getSpeakerByRoom(string $room) : \duncan3dc\Sonos\Interfaces\SpeakerInterface
Get a speaker with the specified room name.
string | $room | The name of the room to look for |
getSpeakersByRoom(string $room) : array<mixed,\duncan3dc\Sonos\Interfaces\SpeakerInterface>
Get all the speakers with the specified room name.
string | $room | The name of the room to look for |
getControllers() : array<mixed,\duncan3dc\Sonos\Interfaces\ControllerInterface>
Get all the coordinators on the network.
getControllerByRoom(string $room) : \duncan3dc\Sonos\Interfaces\ControllerInterface
Get the coordinator for the specified room name.
string | $room | The name of the room to look for |
getControllerByIp(string $ip) : \duncan3dc\Sonos\Interfaces\ControllerInterface
Get the coordinator for the specified ip address.
string | $ip | The ip address of the speaker |
getPlaylists() : array<mixed,\duncan3dc\Sonos\Interfaces\PlaylistInterface>
Get all the playlists available on the network.
getPlaylistByName(string $name) : \duncan3dc\Sonos\Interfaces\PlaylistInterface
Get the playlist with the specified name.
If no case-sensitive match is found it will return a case-insensitive match.
string | $name | The name of the playlist |
getPlaylistById(string $id) : \duncan3dc\Sonos\Interfaces\PlaylistInterface
Get the playlist with the specified id.
string | $id | The ID of the playlist (eg SQ:123) |
createPlaylist(string $name) : \duncan3dc\Sonos\Interfaces\PlaylistInterface
Create a new playlist.
string | $name | The name to give to the playlist |
getAlarms() : array<mixed,\duncan3dc\Sonos\Interfaces\AlarmInterface>
Get all the alarms available on the network.
getAlarmById(integer $id) : \duncan3dc\Sonos\Interfaces\AlarmInterface
Get the alarm from the specified id.
integer | $id | The ID of the alarm |
getRadio() : \duncan3dc\Sonos\Interfaces\Services\RadioInterface
Get a Radio instance for the network.