$collection
$collection : \duncan3dc\Sonos\Interfaces\Devices\CollectionInterface
$collection : \duncan3dc\Sonos\Interfaces\Devices\CollectionInterface
__construct(\duncan3dc\Sonos\Interfaces\Devices\CollectionInterface $collection)
Create a new instance.
\duncan3dc\Sonos\Interfaces\Devices\CollectionInterface | $collection | The device collection to actually use |
setNetworkInterface(string|integer $networkInterface) : $this
Set the network interface to use for SSDP discovery.
See the documentation on IP_MULTICAST_IF at http://php.net/manual/en/function.socket-get-option.php
string|integer | $networkInterface | The interface to use |
addDevice(\duncan3dc\Sonos\Interfaces\Devices\DeviceInterface $device) : $this
Add a device to this collection.
\duncan3dc\Sonos\Interfaces\Devices\DeviceInterface | $device | The device to add |
getDevices() : array<mixed,\duncan3dc\Sonos\Interfaces\Devices\DeviceInterface>
Get all of the devices on the current network
discoverDevices(\duncan3dc\Sonos\Interfaces\Utils\SocketInterface $socket) : void
Get all the devices on the current network.
\duncan3dc\Sonos\Interfaces\Utils\SocketInterface | $socket | An instance to send the discovery request via |