Speakers
in package
implements
CollectionInterface
FinalYes
Use discovery but only for known speaker models
Table of Contents
Interfaces
- CollectionInterface
- Manage a group of devices.
Constants
- MODELS : mixed = ["S1" => "PLAY:1", "S12" => "PLAY:1", "S3" => "...
Properties
Methods
- __construct() : mixed
- addDevice() : $this
- Add a device to this collection.
- addIp() : $this
- Add a device to this collection using its IP address
- clear() : $this
- Remove all devices from this collection.
- getDevices() : array<string|int, DeviceInterface>
- Get all of the devices that can be used as speakers on the current network
- getLogger() : LoggerInterface
- Get the logger currently in use.
- setLogger() : void
- isSpeaker() : bool
Constants
MODELS
private
mixed
MODELS
= ["S1" => "PLAY:1", "S12" => "PLAY:1", "S3" => "PLAY:3", "S5" => "PLAY:5", "S6" => "PLAY:5", "S24" => "PLAY:5", "S9" => "PLAYBAR", "S11" => "PLAYBASE", "S13" => "ONE", "S18" => "ONE", "S14" => "BEAM", "S31" => "BEAM", "S15" => "CONNECT", "S17" => "Move", "S19" => "ARC", "S20" => "SYMFONISK Table Lamp", "S21" => "SYMFONISK Bookshelf", "S33" => "SYMFONISK Bookshelf", "S29" => "SYMFONISK Picture Frame", "S22" => "ONE SL", "S38" => "ONE SL", "S23" => "PORT", "S27" => "ROAM", "S35" => "ROAM SL", "ZP80" => "ZONEPLAYER", "ZP90" => "CONNECT", "S16" => "CONNECT:AMP", "ZP100" => "CONNECT:AMP", "ZP120" => "CONNECT:AMP"]
Properties
$collection
private
CollectionInterface
$collection
Methods
__construct()
public
__construct(CollectionInterface $collection) : mixed
Parameters
- $collection : CollectionInterface
addDevice()
Add a device to this collection.
public
addDevice(DeviceInterface $device) : $this
Parameters
- $device : DeviceInterface
-
The device to add
Return values
$thisaddIp()
Add a device to this collection using its IP address
public
addIp(string $address) : $this
Parameters
- $address : string
-
The IP address of the device to add
Return values
$thisclear()
Remove all devices from this collection.
public
clear() : $this
Return values
$thisgetDevices()
Get all of the devices that can be used as speakers on the current network
public
getDevices() : array<string|int, DeviceInterface>
Return values
array<string|int, DeviceInterface>getLogger()
Get the logger currently in use.
public
getLogger() : LoggerInterface
Return values
LoggerInterfacesetLogger()
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
isSpeaker()
private
isSpeaker(DeviceInterface $device) : bool
Parameters
- $device : DeviceInterface