Headers::getValues( string $offset ): array|null

In this article

Get all values for a given header

Parameters

$offsetstringrequired
Name of the header to retrieve.

Return

array|null Header values

Source

public function getValues($offset) {
	if (!is_string($offset) && !is_int($offset)) {
		throw InvalidArgument::create(1, '$offset', 'string|int', gettype($offset));
	}

	if (is_string($offset)) {
		$offset = strtolower($offset);
	}

	if (!isset($this->data[$offset])) {
		return null;
	}

	return $this->data[$offset];
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.