ENHANCE:MENT: Added binary data methods
This commit is contained in:
parent
58ff6714a9
commit
bd93903292
@ -70,4 +70,38 @@ class Pairing
|
||||
* @var int
|
||||
*/
|
||||
public $Round;
|
||||
|
||||
/**
|
||||
* Binary data that was read out of the pairing file
|
||||
*
|
||||
* @var bool|DateTime|int|string[]
|
||||
*/
|
||||
private $BinaryData = [];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,13 @@ class Round
|
||||
*/
|
||||
public $RoundNo;
|
||||
|
||||
/**
|
||||
* Binary data that was read out of the pairing file
|
||||
*
|
||||
* @var bool|DateTime|int|string[]
|
||||
*/
|
||||
private $BinaryData = [];
|
||||
|
||||
/**
|
||||
* Magic method to read out several fields. If field was not found it is being searched in the binary data fields
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user