PHP Класс duncan3dc\Sonos\Device

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$ip string The IP address of the device.

Защищенные свойства (Protected)

Свойство Тип Описание
$cache Doctrine\Common\Cache\Cache The long-lived cache object from the Network instance.
$logger Psr\Log\LoggerInterface The logging object.
$model string The model of the device.

Открытые методы

Метод Описание
__construct ( string $ip, Doctrine\Common\Cache\Cache $cache = null, Psr\Log\LoggerInterface $logger = null ) Create an instance of the Device class.
getModel ( ) : string Get the model of this device.
getXml ( string $url ) : duncan3dc\DomParser\XmlParser Retrieve some xml from the device.
isSpeaker ( ) : boolean Check if this sonos device is a speaker.
soap ( string $service, string $action, array $params = [] ) : mixed Send a soap request to the device.

Описание методов

__construct() публичный Метод

Create an instance of the Device class.
public __construct ( string $ip, Doctrine\Common\Cache\Cache $cache = null, Psr\Log\LoggerInterface $logger = null )
$ip string The ip address that the device is listening on
$cache Doctrine\Common\Cache\Cache The cache object to use for the expensive multicast discover to find Sonos devices on the network
$logger Psr\Log\LoggerInterface A logging object

getModel() публичный Метод

Get the model of this device.
public getModel ( ) : string
Результат string

getXml() публичный Метод

Retrieve some xml from the device.
public getXml ( string $url ) : duncan3dc\DomParser\XmlParser
$url string The url to retrieve
Результат duncan3dc\DomParser\XmlParser

isSpeaker() публичный Метод

Check if this sonos device is a speaker.
public isSpeaker ( ) : boolean
Результат boolean

soap() публичный Метод

Send a soap request to the device.
public soap ( string $service, string $action, array $params = [] ) : mixed
$service string The service to send the request to
$action string The action to call
$params array The parameters to pass
Результат mixed

Описание свойств

$cache защищенное свойство

The long-lived cache object from the Network instance.
protected Cache,Doctrine\Common\Cache $cache
Результат Doctrine\Common\Cache\Cache

$ip публичное свойство

The IP address of the device.
public string $ip
Результат string

$logger защищенное свойство

The logging object.
protected LoggerInterface,Psr\Log $logger
Результат Psr\Log\LoggerInterface

$model защищенное свойство

The model of the device.
protected string $model
Результат string