Documentation

Collection
in package
implements CollectionInterface

FinalYes

Table of Contents

Interfaces

CollectionInterface
Manage a group of devices.

Properties

$devices  : array<string|int, DeviceInterface>
$factory  : FactoryInterface
$logger  : LoggerInterface|null

Methods

__construct()  : mixed
Create a new instance.
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 in this collection.
getLogger()  : LoggerInterface
Get the logger currently in use.
setLogger()  : void

Properties

$logger

private LoggerInterface|null $logger = null

Methods

addIp()

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

clear()

Remove all devices from this collection.

public clear() : $this
Return values
$this

getLogger()

Get the logger currently in use.

public getLogger() : LoggerInterface
Return values
LoggerInterface

setLogger()

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

Search results