File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
CodeIgniter/Framework/core Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ public function has($index = null, $xss_clean = false)
283283
284284 return false ;
285285 }
286-
286+
287287 /**
288288 * Fetch only items from the REQUEST array
289289 *
@@ -1222,6 +1222,18 @@ public function getRequestHeader($index, $xss_clean = false)
12221222 return $ this ->get_request_header ($ index , $ xss_clean );
12231223 }
12241224
1225+ /**
1226+ * Check if a specific header exists.
1227+ *
1228+ * @param string $header
1229+ * @return bool
1230+ */
1231+ public function hasHeader ($ header )
1232+ {
1233+ $ headers = $ this ->requestHeaders ();
1234+ return (bool ) array_key_exists (strtolower ($ header ), $ headers );
1235+ }
1236+
12251237 // --------------------------------------------------------------------
12261238
12271239 /**
You can’t perform that action at this time.
0 commit comments