startsWith() public static method

public static startsWith ( $prefix )
Beispiel #1
0
 public function getRequestHeaders()
 {
     $headers = Arrays::filterByKeys($_SERVER, Functions::startsWith('HTTP_'));
     return Arrays::mapKeys($headers, function ($key) {
         return str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))));
     });
 }