NetworkInterface
in
Provides methods to locate speakers/controllers/playlists on the current network.
Table of Contents
Methods
- createPlaylist() : PlaylistInterface
- Create a new playlist.
- getAlarmById() : AlarmInterface
- Get the alarm from the specified id.
- getAlarms() : array<string|int, AlarmInterface>
- Get all the alarms available on the network.
- getController() : ControllerInterface
- Get a Controller instance from the network.
- getControllerByIp() : ControllerInterface
- Get the coordinator for the specified ip address.
- getControllerByRoom() : ControllerInterface
- Get the coordinator for the specified room name.
- getControllers() : array<string|int, ControllerInterface>
- Get all the coordinators on the network.
- getPlaylistById() : PlaylistInterface
- Get the playlist with the specified id.
- getPlaylistByName() : PlaylistInterface
- Get the playlist with the specified name.
- getPlaylists() : array<string|int, PlaylistInterface>
- Get all the playlists available on the network.
- getRadio() : RadioInterface
- Get a Radio instance for the network.
- getSpeakerByRoom() : SpeakerInterface
- Get a speaker with the specified room name.
- getSpeakers() : array<string|int, SpeakerInterface>
- Get all the speakers on the network.
- getSpeakersByRoom() : array<string|int, SpeakerInterface>
- Get all the speakers with the specified room name.
- hasPlaylist() : bool
- Check if a playlist with the specified name exists on this network.
Methods
createPlaylist()
Create a new playlist.
public
createPlaylist(string $name) : PlaylistInterface
Parameters
- $name : string
-
The name to give to the playlist
Return values
PlaylistInterfacegetAlarmById()
Get the alarm from the specified id.
public
getAlarmById(int $id) : AlarmInterface
Parameters
- $id : int
Return values
AlarmInterfacegetAlarms()
Get all the alarms available on the network.
public
getAlarms() : array<string|int, AlarmInterface>
Return values
array<string|int, AlarmInterface>getController()
Get a Controller instance from the network.
public
getController() : ControllerInterface
Useful for managing playlists/alarms, as these need a controller but it doesn't matter which one.
Return values
ControllerInterfacegetControllerByIp()
Get the coordinator for the specified ip address.
public
getControllerByIp(string $ip) : ControllerInterface
Parameters
- $ip : string
-
The ip address of the speaker
Return values
ControllerInterfacegetControllerByRoom()
Get the coordinator for the specified room name.
public
getControllerByRoom(string $room) : ControllerInterface
Parameters
- $room : string
-
The name of the room to look for
Return values
ControllerInterfacegetControllers()
Get all the coordinators on the network.
public
getControllers() : array<string|int, ControllerInterface>
Return values
array<string|int, ControllerInterface>getPlaylistById()
Get the playlist with the specified id.
public
getPlaylistById(string $id) : PlaylistInterface
Parameters
- $id : string
-
The ID of the playlist (eg SQ:123)
Return values
PlaylistInterfacegetPlaylistByName()
Get the playlist with the specified name.
public
getPlaylistByName(string $name) : PlaylistInterface
If no case-sensitive match is found it will return a case-insensitive match.
Parameters
- $name : string
Return values
PlaylistInterfacegetPlaylists()
Get all the playlists available on the network.
public
getPlaylists() : array<string|int, PlaylistInterface>
Return values
array<string|int, PlaylistInterface>getRadio()
Get a Radio instance for the network.
public
getRadio() : RadioInterface
Return values
RadioInterfacegetSpeakerByRoom()
Get a speaker with the specified room name.
public
getSpeakerByRoom(string $room) : SpeakerInterface
Parameters
- $room : string
-
The name of the room to look for
Return values
SpeakerInterfacegetSpeakers()
Get all the speakers on the network.
public
getSpeakers() : array<string|int, SpeakerInterface>
Return values
array<string|int, SpeakerInterface>getSpeakersByRoom()
Get all the speakers with the specified room name.
public
getSpeakersByRoom(string $room) : array<string|int, SpeakerInterface>
Parameters
- $room : string
-
The name of the room to look for
Return values
array<string|int, SpeakerInterface>hasPlaylist()
Check if a playlist with the specified name exists on this network.
public
hasPlaylist(string $name) : bool
If no case-sensitive match is found it will return a case-insensitive match.
Parameters
- $name : string
-
The name of the playlist