function ArrayAccessGetterSetter::keys
Overrides PropagationGetterInterface::keys
File
-
vendor/
open-telemetry/ context/ Propagation/ ArrayAccessGetterSetter.php, line 39
Class
- ArrayAccessGetterSetter
- Default implementation of {This type is used if no custom getter/setter is provided to {
Namespace
OpenTelemetry\Context\PropagationCode
public function keys($carrier) : array {
if ($this->isSupportedCarrier($carrier)) {
$keys = [];
foreach ($carrier as $key => $_) {
$keys[] = (string) $key;
}
return $keys;
}
throw new InvalidArgumentException(sprintf('Unsupported carrier type: %s.', get_debug_type($carrier)));
}