PHP 클래스 duncan3dc\Sonos\Device

파일 보기 프로젝트 열기: duncan3dc/sonos 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$ip string The IP address of the device.

보호된 프로퍼티들

프로퍼티 타입 설명
$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