URN_REGEXP URN_REGEXP = '/^urn:[a-z0-9][a-z0-9-]{1,31}:([a-z0-9()+,-.:=@;$_!*\']|%(0[1-9a-f]|[1-9a-f][0-9a-f]))+$/i' 符合 RFC 2141 的 URN正则规则.
$columns $columns : array 小米 URN 规范所包含的字段 <URN> ::= "urn:"<namespace>":"<type>":"<name>":"<value>[":"<vendor-product>":"<version>]. Type array
$baseColumns $baseColumns : array 预订义的小米 URN 规范所包含的字段 <URN> ::= "urn:"<namespace>":"<type>":"<name>":"<value>. Type array
$name $name : 有意义的单词或单词组合(小写字母) 多个单词用"-"间隔,比如:. temperature current-temperature device-name battery-level Type
$vendorProduct $vendorProduct : string 厂家+产品代号 (这个字段只有在设备实例定义里出现) 有意义的单词或单词组合(小写字母),用"-"间隔,比如:. philips-moonlight yeelink-c300 zhimi-vv benz-c63 Type string
__construct() __construct( $urn) Urn constructor. Parameters $urn Throws \MiotApi\Exception\SpecificationErrorException
setUrn() setUrn(mixed $urn) Parameters mixed $urn Throws \MiotApi\Exception\SpecificationErrorException
setNamespace() setNamespace(mixed $namespace) Parameters mixed $namespace Throws \MiotApi\Exception\SpecificationErrorException
setType() setType(mixed $type) Parameters mixed $type Throws \MiotApi\Exception\SpecificationErrorException
setName() setName(mixed $name) Parameters mixed $name Throws \MiotApi\Exception\SpecificationErrorException
setValue() setValue(mixed $value) Parameters mixed $value Throws \MiotApi\Exception\SpecificationErrorException
setVendorProduct() setVendorProduct(mixed $vendorProduct) Parameters mixed $vendorProduct Throws \MiotApi\Exception\SpecificationErrorException
setVersion() setVersion(mixed $version) Parameters mixed $version Throws \MiotApi\Exception\SpecificationErrorException