public function negotiate(string
$type, array
$supported, bool
$strictMatch = false
): string
{ if ($this->negotiator === null
) { $this->negotiator = Services::
negotiator($this, true
);
} switch (strtolower($type)) { case 'media':
return $this->negotiator->
media($supported,
$strictMatch);
case 'charset':
return $this->negotiator->
charset($supported);
case 'encoding':
return $this->negotiator->
encoding($supported);
case 'language':
return $this->negotiator->
language($supported);
} throw HTTPException::
forInvalidNegotiationType($type);
}