Enabled configuration of EMSI tunables in setup
This commit is contained in:
@@ -37,23 +37,11 @@ class Setup extends Model
|
||||
|
||||
public const MAX_MSGS_PKT = 50;
|
||||
|
||||
// Our non model attributes and values
|
||||
private array $internal = [];
|
||||
|
||||
protected $casts = [
|
||||
'options' => 'array',
|
||||
'servers' => 'array',
|
||||
];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
|
||||
/* EMSI SETTINGS */
|
||||
$this->do_prevent = 1; /* EMSI - send an immediate EMSI_INQ on connect */
|
||||
$this->ignore_nrq = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -83,10 +71,6 @@ class Setup extends Model
|
||||
case 'emsi_options':
|
||||
return Arr::get($this->servers,str_replace('_','.',$key));
|
||||
|
||||
case 'ignore_nrq':
|
||||
case 'do_prevent':
|
||||
return $this->internal[$key] ?? FALSE;
|
||||
|
||||
case 'msgs_pkt':
|
||||
return Arr::get($this->options,$key,self::MAX_MSGS_PKT);
|
||||
|
||||
@@ -115,11 +99,6 @@ class Setup extends Model
|
||||
case 'emsi_options':
|
||||
return Arr::set($this->servers,str_replace('_','.',$key),$value);
|
||||
|
||||
case 'ignore_nrq':
|
||||
case 'do_prevent':
|
||||
$this->internal[$key] = $value;
|
||||
break;
|
||||
|
||||
default:
|
||||
parent::__set($key,$value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user