예제 #1
0
 public static function getHeaders()
 {
     foreach ($_SERVER as $name => $value) {
         if (strncmp($name, 'HTTP_', 5) === 0) {
             $name = StringUtil::dasherize(StringUtil::humanize(strtolower(substr($name, 5))));
             (yield $name => $value);
         }
     }
 }
예제 #2
0
 public static function getHeadersFromEnvironment()
 {
     self::_validateWebEnvironment();
     foreach ($_SERVER as $name => $value) {
         if (strncmp($name, 'HTTP_', 5) === 0) {
             $name = StringUtil::dasherize(StringUtil::humanize(strtolower(substr($name, 5))));
             (yield $name => $value);
         }
     }
 }