WpOrg\Requests\Utility

CaseInsensitiveDictionary::offsetExists │ public │ WP 1.0 │ ReturnTypeWillChange

Check if the given item exists

Method of the class: CaseInsensitiveDictionary{}

No Hooks.

Returns

boolean. Does the item exist?

Usage

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

CaseInsensitiveDictionary::offsetExists() code WP 7.1.2

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

	if ($offset === null) {
		$offset = '';
	}

	return isset($this->data[$offset]);
}