protected function importParams()
{
foreach ($this->uri['params'] as $key => $val) {
if (isset($this->{$key}) && is_bool($this->{$key})) {
$this->{$key} = (bool) $val;
continue;
}
if (!property_exists($this, $key)) {
Daemon::log(get_class($this) . ': unrecognized setting \'' . $key . '\'');
continue;
}
$this->{$key} = $val;
}
if (!$this->ctxname) {
return;
}
if (!isset(Daemon::$config->{'TransportContext:' . $this->ctxname})) {
Daemon::log(get_class($this) . ': undefined transport context \'' . $this->ctxname . '\'');
return;
}
$ctx = Daemon::$config->{'TransportContext:' . $this->ctxname};
foreach ($ctx as $key => $entry) {
$value = $entry instanceof Config\Entry\Generic ? $entry->value : $entry;
if (isset($this->{$key}) && is_bool($this->{$key})) {
$this->{$key} = (bool) $value;
continue;
}
if (!property_exists($this, $key)) {
Daemon::log(get_class($this) . ': unrecognized setting in transport context \'' . $this->ctxname . '\': \'' . $key . '\'');
continue;
}
$this->{$key} = $value;
}
}