Requests_Utility_CaseInsensitiveDictionary::offsetGet() WordPress Method
The offsetGet() method is a utility function provided by the Requests_Utility_CaseInsensitiveDictionary class. This function returns the value associated with the specified key from the dictionary, with the key being case-insensitive. This is useful when working with data that is not consistently formatted, such as when data is coming from a user-inputted form.
Requests_Utility_CaseInsensitiveDictionary::offsetGet( string $key ) #
Get the value for the item
Contents
Parameters
- $key
(string)(Required)Item key
Return
(string|null) Item value (null if offsetExists is false)
Source
File: wp-includes/Requests/Utility/CaseInsensitiveDictionary.php
public function offsetGet($key) { $key = strtolower($key); if (!isset($this->data[$key])) { return null; } return $this->data[$key]; }
Expand full source codeCollapse full source codeView on TracView on GitHub