\MiotApi\Contract\SpecificationDeviceSpecification

设备是一个独立的有意义的设备,比如:灯泡、插座、风扇。 描述一个设备,需要说清楚:是什么设备?有哪些服务可用?

Class DeviceSpecification

Summary

Methods
Properties
Constants
__construct()
init()
getUrn()
getType()
getDescription()
toContext()
toCollection()
toJson()
toArray()
__get()
__call()
getRequiredServices()
getOptionalServices()
No public properties found
No constants found
No protected methods found
$collection
$urn
$description
$requiredServices
$optionalServices
N/A
No private methods found
No private properties found
N/A

Properties

$collection

$collection : 

Type

$urn

$urn : 

Type

$description

$description : 

描述: 纯文本字段.

Type

$requiredServices

$requiredServices : 

必选服务

Type

$optionalServices

$optionalServices : 

可选服务

Type

Methods

__construct()

__construct(  $urn) 

Specification constructor.

Parameters

$urn

Throws

\MiotApi\Exception\SpecificationErrorException

init()

init() 

Throws

\MiotApi\Exception\SpecificationErrorException

getUrn()

getUrn() 

getType()

getType() 

getDescription()

getDescription() 

toContext()

toContext() 

toCollection()

toCollection() 

toJson()

toJson() 

toArray()

toArray() 

__get()

__get(  $key) 

Parameters

$key

__call()

__call(string  $method, array  $parameters) : mixed

Proxy a method call onto the collection items.

Parameters

string $method
array $parameters

Returns

mixed

getRequiredServices()

getRequiredServices() : mixed

获取 必选服务

Returns

mixed

getOptionalServices()

getOptionalServices() : mixed

获取 可选服务

Returns

mixed