startsWith() public static method

public static startsWith ( $prefix )
示例#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)))));
     });
 }