WpOrg\Requests\Utility

CaseInsensitiveDictionary::offsetExistspublicWP 1.0ReturnTypeWillChange

Check if the given item exists

Method of the class: CaseInsensitiveDictionary{}

No Hooks.

Returns

true|false. Does the item exist?

Usage

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

CaseInsensitiveDictionary::offsetExists() code WP 7.0

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

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

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