WpOrg\Requests\Utility

CaseInsensitiveDictionary::offsetGetpublicWP 1.0ReturnTypeWillChange

Get the value for the item

Method of the class: CaseInsensitiveDictionary{}

No Hooks.

Returns

String|null. Item value (null if the item key doesn't exist)

Usage

$CaseInsensitiveDictionary = new CaseInsensitiveDictionary();
$CaseInsensitiveDictionary->offsetGet( $offset );
$offset(string) (required)
Item key.

CaseInsensitiveDictionary::offsetGet() code WP 6.9

public function offsetGet($offset) {
	if (is_string($offset)) {
		$offset = strtolower($offset);
	}

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

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