Documentation

Network
in package
implements NetworkInterface, LoggerAwareInterface

FinalYes

Provides methods to locate speakers/controllers/playlists on the current network.

Table of Contents

Interfaces

NetworkInterface
Provides methods to locate speakers/controllers/playlists on the current network.
LoggerAwareInterface

Properties

$alarms  : array<string|int, AlarmInterface>|null
$playlists  : array<string|int, PlaylistInterface>|null
$speakers  : array<string|int, Speaker>|null
$collection  : CollectionInterface

Methods

__construct()  : mixed
Create a new instance.
createAlarm()  : AlarmInterface
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.
getLogger()  : LoggerInterface
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.
setLogger()  : void

Properties

$alarms

protected array<string|int, AlarmInterface>|null $alarms = null

Alarms that are available on the current network.

$playlists

protected array<string|int, PlaylistInterface>|null $playlists = null

Playlists that are available on the current network.

$speakers

protected array<string|int, Speaker>|null $speakers = null

Speakers that are available on the current network.

Methods

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
ControllerInterface

getControllerByRoom()

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
ControllerInterface

getLogger()

public getLogger() : LoggerInterface
Return values
LoggerInterface

getPlaylistByName()

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
PlaylistInterface

getSpeakerByRoom()

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
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

Return values
bool

setLogger()

public setLogger(LoggerInterface $logger) : void
Parameters
$logger : LoggerInterface
On this page

Search results