PHP Class Phue\Condition

Afficher le fichier Open project: sqmk/phue

Protected Properties

Свойство Type Description
$attribute string Attribute to target condition
$operator Operator
$sensorId string Sensor Id
$value string Value to match

Méthodes publiques

Méthode Description
__construct ( stdClass $condition = null ) Construct a condition object
changed ( ) : self Set operator to changed
equals ( ) : self Set operator to equals
export ( ) : stdClass Export for API request
getAttribute ( ) : string Get attribute
getOperator ( ) : string Get operator
getSensorId ( ) : string Get sensor Id
getValue ( ) : string Get value
greaterThan ( ) : self Set operator to greater than
import ( stdClass $condition ) : self Import from API response
lessThan ( ) : self Set operator to less than
setAttribute ( string $attribute ) : self Set attribute to target condition
setOperator ( string $operator ) : self Set operator
setSensorId ( mixed $sensorId ) : self Set sensor Id
setValue ( string $value ) : self Set value to match

Method Details

__construct() public méthode

Construct a condition object
public __construct ( stdClass $condition = null )
$condition stdClass Condition attributes

changed() public méthode

Set operator to changed
public changed ( ) : self
Résultat self This object

equals() public méthode

Set operator to equals
public equals ( ) : self
Résultat self This object

export() public méthode

Export for API request
public export ( ) : stdClass
Résultat stdClass Result object

getAttribute() public méthode

Get attribute
public getAttribute ( ) : string
Résultat string Attribute

getOperator() public méthode

Get operator
public getOperator ( ) : string
Résultat string Operator

getSensorId() public méthode

Get sensor Id
public getSensorId ( ) : string
Résultat string Sensor Id

getValue() public méthode

Get value
public getValue ( ) : string
Résultat string Value

greaterThan() public méthode

Set operator to greater than
public greaterThan ( ) : self
Résultat self This object

import() public méthode

Import from API response
public import ( stdClass $condition ) : self
$condition stdClass Condition values
Résultat self This object

lessThan() public méthode

Set operator to less than
public lessThan ( ) : self
Résultat self This object

setAttribute() public méthode

Set attribute to target condition
public setAttribute ( string $attribute ) : self
$attribute string Attribute
Résultat self This object

setOperator() public méthode

Set operator
public setOperator ( string $operator ) : self
$operator string Operator
Résultat self This object

setSensorId() public méthode

Set sensor Id
public setSensorId ( mixed $sensorId ) : self
$sensorId mixed Sensor Id or Sensor object
Résultat self This object

setValue() public méthode

Set value to match
public setValue ( string $value ) : self
$value string Value
Résultat self This object

Property Details

$attribute protected_oe property

Attribute to target condition
protected string $attribute
Résultat string

$operator protected_oe property

Operator
protected $operator

$sensorId protected_oe property

Sensor Id
protected string $sensorId
Résultat string

$value protected_oe property

Value to match
protected string $value
Résultat string