ENHANCE:MENT: Added binary data methods
This commit is contained in:
parent
58ff6714a9
commit
2758cb436d
@ -70,4 +70,31 @@ class Pairing
|
||||
* @var int
|
||||
*/
|
||||
public $Round;
|
||||
|
||||
/**
|
||||
* Magic method to read out several fields. If field was not found it is being searched in the binary data fields
|
||||
*
|
||||
* @param string $key
|
||||
*
|
||||
* @return bool|DateTime|int|string|null
|
||||
*/
|
||||
public function __get(string $key)
|
||||
{
|
||||
if (isset($this->BinaryData[ $key ])) {
|
||||
return $this->BinaryData[ $key ];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets binary data that is read out the pairing file but is not needed immediately
|
||||
*
|
||||
* @param string $key
|
||||
* @param bool|int|DateTime|string $value
|
||||
*/
|
||||
public function __set(string $key, $value): void
|
||||
{
|
||||
$this->BinaryData[ $key ] = $value;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user